#pragma once

/**
 * \file
 * Contains declarations of all functions and types which represent a public TDLib interface.
 */
#include "td/tl/TlObject.h"

#include <cstdint>
#include <utility>
#include <vector>

#include <jni.h>

#include <string>

namespace td {
class TlStorerToString;

namespace td_api {

/**
 * This type is used to store 32-bit signed integers, which can be represented as Number in JSON.
 */
using int32 = std::int32_t;
/**
 * This type is used to store 53-bit signed integers, which can be represented as Number in JSON.
 */
using int53 = std::int64_t;
/**
 * This type is used to store 64-bit signed integers, which can't be represented as Number in JSON and are represented as String instead.
 */
using int64 = std::int64_t;

/**
 * This type is used to store UTF-8 strings.
 */
using string = std::string;

/**
 * This type is used to store arbitrary sequences of bytes. In JSON interface the bytes are base64-encoded.
 */
using bytes = std::string;

/**
 * This type is used to store a list of objects of any type and is represented as Array in JSON.
 */
template <class Type>
using array = std::vector<Type>;

class Object;
/**
 * This class is a base class for all TDLib API classes and functions.
 */
using BaseObject = Object;

/**
 * A smart wrapper to store a pointer to a TDLib API object. Can be treated as an analogue of std::unique_ptr.
 */
template <class Type>
using object_ptr = ::td::tl_object_ptr<Type>;

/**
 * A function to create a dynamically allocated TDLib API object. Can be treated as an analogue of std::make_unique.
 * Usage example:
 * \code
 * auto get_me_request = td::td_api::make_object<td::td_api::getMe>();
 * auto message_text = td::td_api::make_object<td::td_api::formattedText>("Hello, world!!!",
 *                     td::td_api::array<td::td_api::object_ptr<td::td_api::textEntity>>());
 * auto send_message_request = td::td_api::make_object<td::td_api::sendMessage>(chat_id, nullptr, nullptr, nullptr, nullptr,
 *      td::td_api::make_object<td::td_api::inputMessageText>(std::move(message_text), nullptr, true));
 * \endcode
 *
 * \tparam Type Type of object to construct.
 * \param[in] args Arguments to pass to the object constructor.
 * \return Wrapped pointer to the created object.
 */
template <class Type, class... Args>
object_ptr<Type> make_object(Args &&... args) {
  return object_ptr<Type>(new Type(std::forward<Args>(args)...));
}

/**
 * A function to cast a wrapped in td::td_api::object_ptr TDLib API object to its subclass or superclass.
 * Casting an object to an incorrect type will lead to undefined behaviour.
 * Usage example:
 * \code
 * td::td_api::object_ptr<td::td_api::callState> call_state = ...;
 * switch (call_state->get_id()) {
 *   case td::td_api::callStatePending::ID: {
 *     auto state = td::td_api::move_object_as<td::td_api::callStatePending>(call_state);
 *     // use state
 *     break;
 *   }
 *   case td::td_api::callStateExchangingKeys::ID: {
 *     // no additional fields, no casting is needed
 *     break;
 *   }
 *   case td::td_api::callStateReady::ID: {
 *     auto state = td::td_api::move_object_as<td::td_api::callStateReady>(call_state);
 *     // use state
 *     break;
 *   }
 *   case td::td_api::callStateHangingUp::ID: {
 *     // no additional fields, no casting is needed
 *     break;
 *   }
 *   case td::td_api::callStateDiscarded::ID: {
 *     auto state = td::td_api::move_object_as<td::td_api::callStateDiscarded>(call_state);
 *     // use state
 *     break;
 *   }
 *   case td::td_api::callStateError::ID: {
 *     auto state = td::td_api::move_object_as<td::td_api::callStateError>(call_state);
 *     // use state
 *     break;
 *   }
 *   default:
 *     assert(false);
 * }
 * \endcode
 *
 * \tparam ToType Type of TDLib API object to move to.
 * \tparam FromType Type of TDLib API object to move from, this is auto-deduced.
 * \param[in] from Wrapped in td::td_api::object_ptr pointer to a TDLib API object.
 */
template <class ToType, class FromType>
object_ptr<ToType> move_object_as(FromType &&from) {
  return object_ptr<ToType>(static_cast<ToType *>(from.release()));
}

/**
 * Returns a string representation of a TDLib API object.
 * \param[in] value The object.
 * \return Object string representation.
 */
std::string to_string(const BaseObject &value);

/**
 * Returns a string representation of a TDLib API object.
 * \tparam T Object type, auto-deduced.
 * \param[in] value The object.
 * \return Object string representation.
 */
template <class T>
std::string to_string(const object_ptr<T> &value) {
  if (value == nullptr) {
    return "null";
  }

  return to_string(*value);
}

/**
 * Returns a string representation of a list of TDLib API objects.
 * \tparam T Object type, auto-deduced.
 * \param[in] values The objects.
 * \return Objects string representation.
 */
template <class T>
std::string to_string(const std::vector<object_ptr<T>> &values) {
  std::string result = "{\n";
  for (const auto &value : values) {
    if (value == nullptr) {
      result += "null\n";
    } else {
      result += to_string(*value);
    }
  }
  result += "}\n";
  return result;
}

const char *&get_package_name_ref();
const char *get_git_commit_hash();

/**
 * This class is a base class for all TDLib API classes.
 */
class Object {
 public:
  virtual ~Object() {
  }

  virtual void store(JNIEnv *env, jobject &s) const {
  }

  virtual void store(TlStorerToString &s, const char *field_name) const = 0;

  static jclass Class;

  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  virtual std::int32_t get_id() const = 0;

  static object_ptr<Object> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is a base class for all TDLib API functions.
 */
class Function: public Object {
 public:
  static jclass Class;

  static object_ptr<Function> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about supported accent color for user/chat name, background of empty chat photo, replies to messages and link previews.
 */
class accentColor final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Accent color identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// Identifier of a built-in color to use in places, where only one color is needed; 0-6.
  int32 built_in_accent_color_id_;
  static jfieldID built_in_accent_color_id_fieldID;
  /// The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes.
  array<int32> light_theme_colors_;
  static jfieldID light_theme_colors_fieldID;
  /// The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes.
  array<int32> dark_theme_colors_;
  static jfieldID dark_theme_colors_fieldID;
  /// The minimum chat boost level required to use the color in a channel chat.
  int32 min_channel_chat_boost_level_;
  static jfieldID min_channel_chat_boost_level_fieldID;

  /**
   * Contains information about supported accent color for user/chat name, background of empty chat photo, replies to messages and link previews.
   */
  accentColor();

  /**
   * Contains information about supported accent color for user/chat name, background of empty chat photo, replies to messages and link previews.
   *
   * \param[in] id_ Accent color identifier.
   * \param[in] built_in_accent_color_id_ Identifier of a built-in color to use in places, where only one color is needed; 0-6.
   * \param[in] light_theme_colors_ The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes.
   * \param[in] dark_theme_colors_ The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes.
   * \param[in] min_channel_chat_boost_level_ The minimum chat boost level required to use the color in a channel chat.
   */
  accentColor(int32 id_, int32 built_in_accent_color_id_, array<int32> &&light_theme_colors_, array<int32> &&dark_theme_colors_, int32 min_channel_chat_boost_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -496870680;

  static object_ptr<accentColor> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes gift types that are accepted by a user.
 */
class acceptedGiftTypes final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if unlimited regular gifts are accepted.
  bool unlimited_gifts_;
  static jfieldID unlimited_gifts_fieldID;
  /// True, if limited regular gifts are accepted.
  bool limited_gifts_;
  static jfieldID limited_gifts_fieldID;
  /// True, if upgraded gifts and regular gifts that can be upgraded for free are accepted.
  bool upgraded_gifts_;
  static jfieldID upgraded_gifts_fieldID;
  /// True, if gifts from channels are accepted subject to other restrictions.
  bool gifts_from_channels_;
  static jfieldID gifts_from_channels_fieldID;
  /// True, if Telegram Premium subscription is accepted.
  bool premium_subscription_;
  static jfieldID premium_subscription_fieldID;

  /**
   * Describes gift types that are accepted by a user.
   */
  acceptedGiftTypes();

  /**
   * Describes gift types that are accepted by a user.
   *
   * \param[in] unlimited_gifts_ True, if unlimited regular gifts are accepted.
   * \param[in] limited_gifts_ True, if limited regular gifts are accepted.
   * \param[in] upgraded_gifts_ True, if upgraded gifts and regular gifts that can be upgraded for free are accepted.
   * \param[in] gifts_from_channels_ True, if gifts from channels are accepted subject to other restrictions.
   * \param[in] premium_subscription_ True, if Telegram Premium subscription is accepted.
   */
  acceptedGiftTypes(bool unlimited_gifts_, bool limited_gifts_, bool upgraded_gifts_, bool gifts_from_channels_, bool premium_subscription_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1288451078;

  static object_ptr<acceptedGiftTypes> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains basic information about another user who started a chat with the current user.
 */
class accountInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Month when the user was registered in Telegram; 0-12; may be 0 if unknown.
  int32 registration_month_;
  static jfieldID registration_month_fieldID;
  /// Year when the user was registered in Telegram; 0-9999; may be 0 if unknown.
  int32 registration_year_;
  static jfieldID registration_year_fieldID;
  /// A two-letter ISO 3166-1 alpha-2 country code based on the phone number of the user; may be empty if unknown.
  string phone_number_country_code_;
  static jfieldID phone_number_country_code_fieldID;
  /// Point in time (Unix timestamp) when the user changed name last time; 0 if unknown.
  int32 last_name_change_date_;
  static jfieldID last_name_change_date_fieldID;
  /// Point in time (Unix timestamp) when the user changed photo last time; 0 if unknown.
  int32 last_photo_change_date_;
  static jfieldID last_photo_change_date_fieldID;

  /**
   * Contains basic information about another user who started a chat with the current user.
   */
  accountInfo();

  /**
   * Contains basic information about another user who started a chat with the current user.
   *
   * \param[in] registration_month_ Month when the user was registered in Telegram; 0-12; may be 0 if unknown.
   * \param[in] registration_year_ Year when the user was registered in Telegram; 0-9999; may be 0 if unknown.
   * \param[in] phone_number_country_code_ A two-letter ISO 3166-1 alpha-2 country code based on the phone number of the user; may be empty if unknown.
   * \param[in] last_name_change_date_ Point in time (Unix timestamp) when the user changed name last time; 0 if unknown.
   * \param[in] last_photo_change_date_ Point in time (Unix timestamp) when the user changed photo last time; 0 if unknown.
   */
  accountInfo(int32 registration_month_, int32 registration_year_, string const &phone_number_country_code_, int32 last_name_change_date_, int32 last_photo_change_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1803492711;

  static object_ptr<accountInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about the period of inactivity after which the current user's account will automatically be deleted.
 */
class accountTtl final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of days of inactivity before the account will be flagged for deletion; 30-730 days.
  int32 days_;
  static jfieldID days_fieldID;

  /**
   * Contains information about the period of inactivity after which the current user's account will automatically be deleted.
   */
  accountTtl();

  /**
   * Contains information about the period of inactivity after which the current user's account will automatically be deleted.
   *
   * \param[in] days_ Number of days of inactivity before the account will be flagged for deletion; 30-730 days.
   */
  explicit accountTtl(int32 days_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1324495492;

  static object_ptr<accountTtl> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes state of active stories posted by a chat.
 */
class ActiveStoryState: public Object {
 public:
  static jclass Class;

  static object_ptr<ActiveStoryState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat has an active live story.
 */
class activeStoryStateLive final : public ActiveStoryState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the active live story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * The chat has an active live story.
   */
  activeStoryStateLive();

  /**
   * The chat has an active live story.
   *
   * \param[in] story_id_ Identifier of the active live story.
   */
  explicit activeStoryStateLive(int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -292947851;

  static object_ptr<ActiveStoryState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat has some unread active stories.
 */
class activeStoryStateUnread final : public ActiveStoryState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat has some unread active stories.
   */
  activeStoryStateUnread();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1903622483;

  static object_ptr<ActiveStoryState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat has active stories, all of which were read.
 */
class activeStoryStateRead final : public ActiveStoryState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat has active stories, all of which were read.
   */
  activeStoryStateRead();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 153525350;

  static object_ptr<ActiveStoryState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class addedProxy;

/**
 * Represents a list of added proxy servers.
 */
class addedProxies final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of proxy servers.
  array<object_ptr<addedProxy>> proxies_;
  static jfieldID proxies_fieldID;

  /**
   * Represents a list of added proxy servers.
   */
  addedProxies();

  /**
   * Represents a list of added proxy servers.
   *
   * \param[in] proxies_ List of proxy servers.
   */
  explicit addedProxies(array<object_ptr<addedProxy>> &&proxies_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 833708853;

  static object_ptr<addedProxies> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class proxy;

/**
 * Contains information about a proxy server added to the list of proxies.
 */
class addedProxy final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the proxy.
  int32 id_;
  static jfieldID id_fieldID;
  /// Point in time (Unix timestamp) when the proxy was last used; 0 if never.
  int32 last_used_date_;
  static jfieldID last_used_date_fieldID;
  /// True, if the proxy is enabled now.
  bool is_enabled_;
  static jfieldID is_enabled_fieldID;
  /// Comment for the proxy added by the user.
  string comment_;
  static jfieldID comment_fieldID;
  /// The proxy.
  object_ptr<proxy> proxy_;
  static jfieldID proxy_fieldID;

  /**
   * Contains information about a proxy server added to the list of proxies.
   */
  addedProxy();

  /**
   * Contains information about a proxy server added to the list of proxies.
   *
   * \param[in] id_ Unique identifier of the proxy.
   * \param[in] last_used_date_ Point in time (Unix timestamp) when the proxy was last used; 0 if never.
   * \param[in] is_enabled_ True, if the proxy is enabled now.
   * \param[in] comment_ Comment for the proxy added by the user.
   * \param[in] proxy_ The proxy.
   */
  addedProxy(int32 id_, int32 last_used_date_, bool is_enabled_, string const &comment_, object_ptr<proxy> &&proxy_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2076257392;

  static object_ptr<addedProxy> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ReactionType;

/**
 * Represents a reaction applied to a message.
 */
class addedReaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  static jfieldID type_fieldID;
  /// Identifier of the chat member, applied the reaction.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// True, if the reaction was added by the current user.
  bool is_outgoing_;
  static jfieldID is_outgoing_fieldID;
  /// Point in time (Unix timestamp) when the reaction was added.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Represents a reaction applied to a message.
   */
  addedReaction();

  /**
   * Represents a reaction applied to a message.
   *
   * \param[in] type_ Type of the reaction.
   * \param[in] sender_id_ Identifier of the chat member, applied the reaction.
   * \param[in] is_outgoing_ True, if the reaction was added by the current user.
   * \param[in] date_ Point in time (Unix timestamp) when the reaction was added.
   */
  addedReaction(object_ptr<ReactionType> &&type_, object_ptr<MessageSender> &&sender_id_, bool is_outgoing_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1258586525;

  static object_ptr<addedReaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class addedReaction;

/**
 * Represents a list of reactions added to a message.
 */
class addedReactions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The total number of found reactions.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of added reactions.
  array<object_ptr<addedReaction>> reactions_;
  static jfieldID reactions_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of reactions added to a message.
   */
  addedReactions();

  /**
   * Represents a list of reactions added to a message.
   *
   * \param[in] total_count_ The total number of found reactions.
   * \param[in] reactions_ The list of added reactions.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  addedReactions(int32 total_count_, array<object_ptr<addedReaction>> &&reactions_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 226352304;

  static object_ptr<addedReactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an address.
 */
class address final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  static jfieldID country_code_fieldID;
  /// State, if applicable.
  string state_;
  static jfieldID state_fieldID;
  /// City.
  string city_;
  static jfieldID city_fieldID;
  /// First line of the address.
  string street_line1_;
  static jfieldID street_line1_fieldID;
  /// Second line of the address.
  string street_line2_;
  static jfieldID street_line2_fieldID;
  /// Address postal code.
  string postal_code_;
  static jfieldID postal_code_fieldID;

  /**
   * Describes an address.
   */
  address();

  /**
   * Describes an address.
   *
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code.
   * \param[in] state_ State, if applicable.
   * \param[in] city_ City.
   * \param[in] street_line1_ First line of the address.
   * \param[in] street_line2_ Second line of the address.
   * \param[in] postal_code_ Address postal code.
   */
  address(string const &country_code_, string const &state_, string const &city_, string const &street_line1_, string const &street_line2_, string const &postal_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2043654342;

  static object_ptr<address> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

/**
 * Information about the sponsor of an advertisement.
 */
class advertisementSponsor final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the sponsor to be opened when the advertisement is clicked.
  string url_;
  static jfieldID url_fieldID;
  /// Photo of the sponsor; may be null if must not be shown.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Additional optional information about the sponsor to be shown along with the advertisement.
  string info_;
  static jfieldID info_fieldID;

  /**
   * Information about the sponsor of an advertisement.
   */
  advertisementSponsor();

  /**
   * Information about the sponsor of an advertisement.
   *
   * \param[in] url_ URL of the sponsor to be opened when the advertisement is clicked.
   * \param[in] photo_ Photo of the sponsor; may be null if must not be shown.
   * \param[in] info_ Additional optional information about the sponsor to be shown along with the advertisement.
   */
  advertisementSponsor(string const &url_, object_ptr<photo> &&photo_, string const &info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1388914159;

  static object_ptr<advertisementSponsor> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starAmount;

/**
 * Contains information about an affiliate that received commission from a Telegram Star transaction.
 */
class affiliateInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// Identifier of the chat which received the commission.
  int53 affiliate_chat_id_;
  static jfieldID affiliate_chat_id_fieldID;
  /// The Telegram Star amount that was received by the affiliate; can be negative for refunds.
  object_ptr<starAmount> star_amount_;
  static jfieldID star_amount_fieldID;

  /**
   * Contains information about an affiliate that received commission from a Telegram Star transaction.
   */
  affiliateInfo();

  /**
   * Contains information about an affiliate that received commission from a Telegram Star transaction.
   *
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner.
   * \param[in] affiliate_chat_id_ Identifier of the chat which received the commission.
   * \param[in] star_amount_ The Telegram Star amount that was received by the affiliate; can be negative for refunds.
   */
  affiliateInfo(int32 commission_per_mille_, int53 affiliate_chat_id_, object_ptr<starAmount> &&star_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1312695046;

  static object_ptr<affiliateInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class affiliateProgramParameters;

class starAmount;

/**
 * Contains information about an active affiliate program.
 */
class affiliateProgramInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Parameters of the affiliate program.
  object_ptr<affiliateProgramParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// Point in time (Unix timestamp) when the affiliate program will be closed; 0 if the affiliate program isn't scheduled to be closed. If positive, then the program can't be connected using connectAffiliateProgram, but active connections will work until the date.
  int32 end_date_;
  static jfieldID end_date_fieldID;
  /// The amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program.
  object_ptr<starAmount> daily_revenue_per_user_amount_;
  static jfieldID daily_revenue_per_user_amount_fieldID;

  /**
   * Contains information about an active affiliate program.
   */
  affiliateProgramInfo();

  /**
   * Contains information about an active affiliate program.
   *
   * \param[in] parameters_ Parameters of the affiliate program.
   * \param[in] end_date_ Point in time (Unix timestamp) when the affiliate program will be closed; 0 if the affiliate program isn't scheduled to be closed. If positive, then the program can't be connected using connectAffiliateProgram, but active connections will work until the date.
   * \param[in] daily_revenue_per_user_amount_ The amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program.
   */
  affiliateProgramInfo(object_ptr<affiliateProgramParameters> &&parameters_, int32 end_date_, object_ptr<starAmount> &&daily_revenue_per_user_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1761810251;

  static object_ptr<affiliateProgramInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes parameters of an affiliate program.
 */
class affiliateProgramParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner; getOption(&quot;affiliate_program_commission_per_mille_min&quot;)-getOption(&quot;affiliate_program_commission_per_mille_max&quot;).
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// Number of months the program will be active; 0-36. If 0, then the program is eternal.
  int32 month_count_;
  static jfieldID month_count_fieldID;

  /**
   * Describes parameters of an affiliate program.
   */
  affiliateProgramParameters();

  /**
   * Describes parameters of an affiliate program.
   *
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner; getOption(&quot;affiliate_program_commission_per_mille_min&quot;)-getOption(&quot;affiliate_program_commission_per_mille_max&quot;).
   * \param[in] month_count_ Number of months the program will be active; 0-36. If 0, then the program is eternal.
   */
  affiliateProgramParameters(int32 commission_per_mille_, int32 month_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1642662996;

  static object_ptr<affiliateProgramParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the order of the found affiliate programs.
 */
class AffiliateProgramSortOrder: public Object {
 public:
  static jclass Class;

  static object_ptr<AffiliateProgramSortOrder> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The affiliate programs must be sorted by the profitability.
 */
class affiliateProgramSortOrderProfitability final : public AffiliateProgramSortOrder {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The affiliate programs must be sorted by the profitability.
   */
  affiliateProgramSortOrderProfitability();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1963282585;

  static object_ptr<AffiliateProgramSortOrder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The affiliate programs must be sorted by creation date.
 */
class affiliateProgramSortOrderCreationDate final : public AffiliateProgramSortOrder {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The affiliate programs must be sorted by creation date.
   */
  affiliateProgramSortOrderCreationDate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1558628083;

  static object_ptr<AffiliateProgramSortOrder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The affiliate programs must be sorted by the expected revenue.
 */
class affiliateProgramSortOrderRevenue final : public AffiliateProgramSortOrder {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The affiliate programs must be sorted by the expected revenue.
   */
  affiliateProgramSortOrderRevenue();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1923269304;

  static object_ptr<AffiliateProgramSortOrder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of affiliate for an affiliate program.
 */
class AffiliateType: public Object {
 public:
  static jclass Class;

  static object_ptr<AffiliateType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The affiliate is the current user.
 */
class affiliateTypeCurrentUser final : public AffiliateType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The affiliate is the current user.
   */
  affiliateTypeCurrentUser();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1453785589;

  static object_ptr<AffiliateType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The affiliate is a bot owned by the current user.
 */
class affiliateTypeBot final : public AffiliateType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * The affiliate is a bot owned by the current user.
   */
  affiliateTypeBot();

  /**
   * The affiliate is a bot owned by the current user.
   *
   * \param[in] user_id_ User identifier of the bot.
   */
  explicit affiliateTypeBot(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1032587200;

  static object_ptr<AffiliateType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The affiliate is a channel chat where the current user has can_post_messages administrator right.
 */
class affiliateTypeChannel final : public AffiliateType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The affiliate is a channel chat where the current user has can_post_messages administrator right.
   */
  affiliateTypeChannel();

  /**
   * The affiliate is a channel chat where the current user has can_post_messages administrator right.
   *
   * \param[in] chat_id_ Identifier of the channel chat.
   */
  explicit affiliateTypeChannel(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -683939735;

  static object_ptr<AffiliateType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes parameters for age verification of the current user.
 */
class ageVerificationParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The minimum age required to view restricted content.
  int32 min_age_;
  static jfieldID min_age_fieldID;
  /// Username of the bot which main Web App may be used to verify age of the user.
  string verification_bot_username_;
  static jfieldID verification_bot_username_fieldID;
  /// Unique name for the country or region, which legislation required age verification. May be used to get the corresponding localization key.
  string country_;
  static jfieldID country_fieldID;

  /**
   * Describes parameters for age verification of the current user.
   */
  ageVerificationParameters();

  /**
   * Describes parameters for age verification of the current user.
   *
   * \param[in] min_age_ The minimum age required to view restricted content.
   * \param[in] verification_bot_username_ Username of the bot which main Web App may be used to verify age of the user.
   * \param[in] country_ Unique name for the country or region, which legislation required age verification. May be used to get the corresponding localization key.
   */
  ageVerificationParameters(int32 min_age_, string const &verification_bot_username_, string const &country_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2050025833;

  static object_ptr<ageVerificationParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Describes an alternative re-encoded quality of a video file.
 */
class alternativeVideo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the alternative video, which is used in the HLS file.
  int64 id_;
  static jfieldID id_fieldID;
  /// Video width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Video height.
  int32 height_;
  static jfieldID height_fieldID;
  /// Codec used for video file encoding, for example, &quot;h264&quot;, &quot;h265&quot;, &quot;av1&quot;, or &quot;av01&quot;.
  string codec_;
  static jfieldID codec_fieldID;
  /// HLS file describing the video.
  object_ptr<file> hls_file_;
  static jfieldID hls_file_fieldID;
  /// File containing the video.
  object_ptr<file> video_;
  static jfieldID video_fieldID;

  /**
   * Describes an alternative re-encoded quality of a video file.
   */
  alternativeVideo();

  /**
   * Describes an alternative re-encoded quality of a video file.
   *
   * \param[in] id_ Unique identifier of the alternative video, which is used in the HLS file.
   * \param[in] width_ Video width.
   * \param[in] height_ Video height.
   * \param[in] codec_ Codec used for video file encoding, for example, &quot;h264&quot;, &quot;h265&quot;, &quot;av1&quot;, or &quot;av01&quot;.
   * \param[in] hls_file_ HLS file describing the video.
   * \param[in] video_ File containing the video.
   */
  alternativeVideo(int64 id_, int32 width_, int32 height_, string const &codec_, object_ptr<file> &&hls_file_, object_ptr<file> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 483379470;

  static object_ptr<alternativeVideo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Animated variant of a chat photo in MPEG4 format.
 */
class animatedChatPhoto final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Animation width and height.
  int32 length_;
  static jfieldID length_fieldID;
  /// Information about the animation file.
  object_ptr<file> file_;
  static jfieldID file_fieldID;
  /// Timestamp of the frame, used as a static chat photo.
  double main_frame_timestamp_;
  static jfieldID main_frame_timestamp_fieldID;

  /**
   * Animated variant of a chat photo in MPEG4 format.
   */
  animatedChatPhoto();

  /**
   * Animated variant of a chat photo in MPEG4 format.
   *
   * \param[in] length_ Animation width and height.
   * \param[in] file_ Information about the animation file.
   * \param[in] main_frame_timestamp_ Timestamp of the frame, used as a static chat photo.
   */
  animatedChatPhoto(int32 length_, object_ptr<file> &&file_, double main_frame_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 191994926;

  static object_ptr<animatedChatPhoto> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class sticker;

/**
 * Describes an animated or custom representation of an emoji.
 */
class animatedEmoji final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker for the emoji; may be null if yet unknown for a custom emoji. If the sticker is a custom emoji, then it can have arbitrary format.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// Expected width of the sticker, which can be used if the sticker is null.
  int32 sticker_width_;
  static jfieldID sticker_width_fieldID;
  /// Expected height of the sticker, which can be used if the sticker is null.
  int32 sticker_height_;
  static jfieldID sticker_height_fieldID;
  /// Emoji modifier fitzpatrick type; 0-6; 0 if none.
  int32 fitzpatrick_type_;
  static jfieldID fitzpatrick_type_fieldID;
  /// File containing the sound to be played when the sticker is clicked; may be null. The sound is encoded with the Opus codec, and stored inside an OGG container.
  object_ptr<file> sound_;
  static jfieldID sound_fieldID;

  /**
   * Describes an animated or custom representation of an emoji.
   */
  animatedEmoji();

  /**
   * Describes an animated or custom representation of an emoji.
   *
   * \param[in] sticker_ Sticker for the emoji; may be null if yet unknown for a custom emoji. If the sticker is a custom emoji, then it can have arbitrary format.
   * \param[in] sticker_width_ Expected width of the sticker, which can be used if the sticker is null.
   * \param[in] sticker_height_ Expected height of the sticker, which can be used if the sticker is null.
   * \param[in] fitzpatrick_type_ Emoji modifier fitzpatrick type; 0-6; 0 if none.
   * \param[in] sound_ File containing the sound to be played when the sticker is clicked; may be null. The sound is encoded with the Opus codec, and stored inside an OGG container.
   */
  animatedEmoji(object_ptr<sticker> &&sticker_, int32 sticker_width_, int32 sticker_height_, int32 fitzpatrick_type_, object_ptr<file> &&sound_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1378918079;

  static object_ptr<animatedEmoji> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes an animation file. The animation must be encoded in GIF or MPEG4 format.
 */
class animation final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Duration of the animation, in seconds; as defined by the sender.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Width of the animation.
  int32 width_;
  static jfieldID width_fieldID;
  /// Height of the animation.
  int32 height_;
  static jfieldID height_fieldID;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  static jfieldID file_name_fieldID;
  /// MIME type of the file, usually &quot;image/gif&quot; or &quot;video/mp4&quot;.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets.
  bool has_stickers_;
  static jfieldID has_stickers_fieldID;
  /// Animation minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Animation thumbnail in JPEG or MPEG4 format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// File containing the animation.
  object_ptr<file> animation_;
  static jfieldID animation_fieldID;

  /**
   * Describes an animation file. The animation must be encoded in GIF or MPEG4 format.
   */
  animation();

  /**
   * Describes an animation file. The animation must be encoded in GIF or MPEG4 format.
   *
   * \param[in] duration_ Duration of the animation, in seconds; as defined by the sender.
   * \param[in] width_ Width of the animation.
   * \param[in] height_ Height of the animation.
   * \param[in] file_name_ Original name of the file; as defined by the sender.
   * \param[in] mime_type_ MIME type of the file, usually &quot;image/gif&quot; or &quot;video/mp4&quot;.
   * \param[in] has_stickers_ True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets.
   * \param[in] minithumbnail_ Animation minithumbnail; may be null.
   * \param[in] thumbnail_ Animation thumbnail in JPEG or MPEG4 format; may be null.
   * \param[in] animation_ File containing the animation.
   */
  animation(int32 duration_, int32 width_, int32 height_, string const &file_name_, string const &mime_type_, bool has_stickers_, object_ptr<minithumbnail> &&minithumbnail_, object_ptr<thumbnail> &&thumbnail_, object_ptr<file> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -872359106;

  static object_ptr<animation> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class animation;

/**
 * Represents a list of animations.
 */
class animations final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of animations.
  array<object_ptr<animation>> animations_;
  static jfieldID animations_fieldID;

  /**
   * Represents a list of animations.
   */
  animations();

  /**
   * Represents a list of animations.
   *
   * \param[in] animations_ List of animations.
   */
  explicit animations(array<object_ptr<animation>> &&animations_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 344216945;

  static object_ptr<animations> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains settings for automatic moving of chats to and from the Archive chat lists.
 */
class archiveChatListSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if new chats from non-contacts will be automatically archived and muted. Can be set to true only if the option &quot;can_archive_and_mute_new_chats_from_unknown_users&quot; is true.
  bool archive_and_mute_new_chats_from_unknown_users_;
  static jfieldID archive_and_mute_new_chats_from_unknown_users_fieldID;
  /// True, if unmuted chats will be kept in the Archive chat list when they get a new message.
  bool keep_unmuted_chats_archived_;
  static jfieldID keep_unmuted_chats_archived_fieldID;
  /// True, if unmuted chats, that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_unmuted_chats_archived == true.
  bool keep_chats_from_folders_archived_;
  static jfieldID keep_chats_from_folders_archived_fieldID;

  /**
   * Contains settings for automatic moving of chats to and from the Archive chat lists.
   */
  archiveChatListSettings();

  /**
   * Contains settings for automatic moving of chats to and from the Archive chat lists.
   *
   * \param[in] archive_and_mute_new_chats_from_unknown_users_ True, if new chats from non-contacts will be automatically archived and muted. Can be set to true only if the option &quot;can_archive_and_mute_new_chats_from_unknown_users&quot; is true.
   * \param[in] keep_unmuted_chats_archived_ True, if unmuted chats will be kept in the Archive chat list when they get a new message.
   * \param[in] keep_chats_from_folders_archived_ True, if unmuted chats, that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_unmuted_chats_archived == true.
   */
  archiveChatListSettings(bool archive_and_mute_new_chats_from_unknown_users_, bool keep_unmuted_chats_archived_, bool keep_chats_from_folders_archived_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1058499236;

  static object_ptr<archiveChatListSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class attachmentMenuBotColor;

class file;

/**
 * Represents a bot, which can be added to attachment or side menu.
 */
class attachmentMenuBot final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// True, if the bot supports opening from attachment menu in the chat with the bot.
  bool supports_self_chat_;
  static jfieldID supports_self_chat_fieldID;
  /// True, if the bot supports opening from attachment menu in private chats with ordinary users.
  bool supports_user_chats_;
  static jfieldID supports_user_chats_fieldID;
  /// True, if the bot supports opening from attachment menu in private chats with other bots.
  bool supports_bot_chats_;
  static jfieldID supports_bot_chats_fieldID;
  /// True, if the bot supports opening from attachment menu in basic group and supergroup chats.
  bool supports_group_chats_;
  static jfieldID supports_group_chats_fieldID;
  /// True, if the bot supports opening from attachment menu in channel chats.
  bool supports_channel_chats_;
  static jfieldID supports_channel_chats_fieldID;
  /// True, if the user must be asked for the permission to send messages to the bot.
  bool request_write_access_;
  static jfieldID request_write_access_fieldID;
  /// True, if the bot was explicitly added by the user. If the bot isn't added, then on the first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot must be added or removed.
  bool is_added_;
  static jfieldID is_added_fieldID;
  /// True, if the bot must be shown in the attachment menu.
  bool show_in_attachment_menu_;
  static jfieldID show_in_attachment_menu_fieldID;
  /// True, if the bot must be shown in the side menu.
  bool show_in_side_menu_;
  static jfieldID show_in_side_menu_fieldID;
  /// True, if a disclaimer, why the bot is shown in the side menu, is needed.
  bool show_disclaimer_in_side_menu_;
  static jfieldID show_disclaimer_in_side_menu_fieldID;
  /// Name for the bot in attachment menu.
  string name_;
  static jfieldID name_fieldID;
  /// Color to highlight selected name of the bot if appropriate; may be null.
  object_ptr<attachmentMenuBotColor> name_color_;
  static jfieldID name_color_fieldID;
  /// Default icon for the bot in SVG format; may be null.
  object_ptr<file> default_icon_;
  static jfieldID default_icon_fieldID;
  /// Icon for the bot in SVG format for the official iOS app; may be null.
  object_ptr<file> ios_static_icon_;
  static jfieldID ios_static_icon_fieldID;
  /// Icon for the bot in TGS format for the official iOS app; may be null.
  object_ptr<file> ios_animated_icon_;
  static jfieldID ios_animated_icon_fieldID;
  /// Icon for the bot in PNG format for the official iOS app side menu; may be null.
  object_ptr<file> ios_side_menu_icon_;
  static jfieldID ios_side_menu_icon_fieldID;
  /// Icon for the bot in TGS format for the official Android app; may be null.
  object_ptr<file> android_icon_;
  static jfieldID android_icon_fieldID;
  /// Icon for the bot in SVG format for the official Android app side menu; may be null.
  object_ptr<file> android_side_menu_icon_;
  static jfieldID android_side_menu_icon_fieldID;
  /// Icon for the bot in TGS format for the official native macOS app; may be null.
  object_ptr<file> macos_icon_;
  static jfieldID macos_icon_fieldID;
  /// Icon for the bot in PNG format for the official macOS app side menu; may be null.
  object_ptr<file> macos_side_menu_icon_;
  static jfieldID macos_side_menu_icon_fieldID;
  /// Color to highlight selected icon of the bot if appropriate; may be null.
  object_ptr<attachmentMenuBotColor> icon_color_;
  static jfieldID icon_color_fieldID;
  /// Default placeholder for opened Web Apps in SVG format; may be null.
  object_ptr<file> web_app_placeholder_;
  static jfieldID web_app_placeholder_fieldID;

  /**
   * Represents a bot, which can be added to attachment or side menu.
   */
  attachmentMenuBot();

  /**
   * Represents a bot, which can be added to attachment or side menu.
   *
   * \param[in] bot_user_id_ User identifier of the bot.
   * \param[in] supports_self_chat_ True, if the bot supports opening from attachment menu in the chat with the bot.
   * \param[in] supports_user_chats_ True, if the bot supports opening from attachment menu in private chats with ordinary users.
   * \param[in] supports_bot_chats_ True, if the bot supports opening from attachment menu in private chats with other bots.
   * \param[in] supports_group_chats_ True, if the bot supports opening from attachment menu in basic group and supergroup chats.
   * \param[in] supports_channel_chats_ True, if the bot supports opening from attachment menu in channel chats.
   * \param[in] request_write_access_ True, if the user must be asked for the permission to send messages to the bot.
   * \param[in] is_added_ True, if the bot was explicitly added by the user. If the bot isn't added, then on the first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot must be added or removed.
   * \param[in] show_in_attachment_menu_ True, if the bot must be shown in the attachment menu.
   * \param[in] show_in_side_menu_ True, if the bot must be shown in the side menu.
   * \param[in] show_disclaimer_in_side_menu_ True, if a disclaimer, why the bot is shown in the side menu, is needed.
   * \param[in] name_ Name for the bot in attachment menu.
   * \param[in] name_color_ Color to highlight selected name of the bot if appropriate; may be null.
   * \param[in] default_icon_ Default icon for the bot in SVG format; may be null.
   * \param[in] ios_static_icon_ Icon for the bot in SVG format for the official iOS app; may be null.
   * \param[in] ios_animated_icon_ Icon for the bot in TGS format for the official iOS app; may be null.
   * \param[in] ios_side_menu_icon_ Icon for the bot in PNG format for the official iOS app side menu; may be null.
   * \param[in] android_icon_ Icon for the bot in TGS format for the official Android app; may be null.
   * \param[in] android_side_menu_icon_ Icon for the bot in SVG format for the official Android app side menu; may be null.
   * \param[in] macos_icon_ Icon for the bot in TGS format for the official native macOS app; may be null.
   * \param[in] macos_side_menu_icon_ Icon for the bot in PNG format for the official macOS app side menu; may be null.
   * \param[in] icon_color_ Color to highlight selected icon of the bot if appropriate; may be null.
   * \param[in] web_app_placeholder_ Default placeholder for opened Web Apps in SVG format; may be null.
   */
  attachmentMenuBot(int53 bot_user_id_, bool supports_self_chat_, bool supports_user_chats_, bool supports_bot_chats_, bool supports_group_chats_, bool supports_channel_chats_, bool request_write_access_, bool is_added_, bool show_in_attachment_menu_, bool show_in_side_menu_, bool show_disclaimer_in_side_menu_, string const &name_, object_ptr<attachmentMenuBotColor> &&name_color_, object_ptr<file> &&default_icon_, object_ptr<file> &&ios_static_icon_, object_ptr<file> &&ios_animated_icon_, object_ptr<file> &&ios_side_menu_icon_, object_ptr<file> &&android_icon_, object_ptr<file> &&android_side_menu_icon_, object_ptr<file> &&macos_icon_, object_ptr<file> &&macos_side_menu_icon_, object_ptr<attachmentMenuBotColor> &&icon_color_, object_ptr<file> &&web_app_placeholder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1183966273;

  static object_ptr<attachmentMenuBot> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a color to highlight a bot added to attachment menu.
 */
class attachmentMenuBotColor final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Color in the RGB format for light themes.
  int32 light_color_;
  static jfieldID light_color_fieldID;
  /// Color in the RGB format for dark themes.
  int32 dark_color_;
  static jfieldID dark_color_fieldID;

  /**
   * Describes a color to highlight a bot added to attachment menu.
   */
  attachmentMenuBotColor();

  /**
   * Describes a color to highlight a bot added to attachment menu.
   *
   * \param[in] light_color_ Color in the RGB format for light themes.
   * \param[in] dark_color_ Color in the RGB format for dark themes.
   */
  attachmentMenuBotColor(int32 light_color_, int32 dark_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1680039612;

  static object_ptr<attachmentMenuBotColor> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes chance of the crafted gift to have the backdrop or symbol of one of the original gifts.
 */
class attributeCraftPersistenceProbability final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 4 numbers that describe probability of the craft result to have the same attribute as one of the original gifts if 1, 2, 3, or 4 gifts with the attribute are used in the craft. Each number represents the number of crafted gifts with the original attribute per 1000 successful craftings.
  array<int32> persistence_chance_per_mille_;
  static jfieldID persistence_chance_per_mille_fieldID;

  /**
   * Describes chance of the crafted gift to have the backdrop or symbol of one of the original gifts.
   */
  attributeCraftPersistenceProbability();

  /**
   * Describes chance of the crafted gift to have the backdrop or symbol of one of the original gifts.
   *
   * \param[in] persistence_chance_per_mille_ The 4 numbers that describe probability of the craft result to have the same attribute as one of the original gifts if 1, 2, 3, or 4 gifts with the attribute are used in the craft. Each number represents the number of crafted gifts with the original attribute per 1000 successful craftings.
   */
  explicit attributeCraftPersistenceProbability(array<int32> &&persistence_chance_per_mille_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -922780991;

  static object_ptr<attributeCraftPersistenceProbability> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a bid in an auction.
 */
class auctionBid final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of Telegram Stars that were put in the bid.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Point in time (Unix timestamp) when the bid was made.
  int32 bid_date_;
  static jfieldID bid_date_fieldID;
  /// Position of the bid in the list of all bids.
  int32 position_;
  static jfieldID position_fieldID;

  /**
   * Describes a bid in an auction.
   */
  auctionBid();

  /**
   * Describes a bid in an auction.
   *
   * \param[in] star_count_ The number of Telegram Stars that were put in the bid.
   * \param[in] bid_date_ Point in time (Unix timestamp) when the bid was made.
   * \param[in] position_ Position of the bid in the list of all bids.
   */
  auctionBid(int53 star_count_, int32 bid_date_, int32 position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1756434144;

  static object_ptr<auctionBid> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a round of an auction.
 */
class auctionRound final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// 1-based number of the round.
  int32 number_;
  static jfieldID number_fieldID;
  /// Duration of the round, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// The number of seconds for which the round will be extended if there are changes in the top winners.
  int32 extend_time_;
  static jfieldID extend_time_fieldID;
  /// The number of top winners who trigger round extension if changed.
  int32 top_winner_count_;
  static jfieldID top_winner_count_fieldID;

  /**
   * Describes a round of an auction.
   */
  auctionRound();

  /**
   * Describes a round of an auction.
   *
   * \param[in] number_ 1-based number of the round.
   * \param[in] duration_ Duration of the round, in seconds.
   * \param[in] extend_time_ The number of seconds for which the round will be extended if there are changes in the top winners.
   * \param[in] top_winner_count_ The number of top winners who trigger round extension if changed.
   */
  auctionRound(int32 number_, int32 duration_, int32 extend_time_, int32 top_winner_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -986948877;

  static object_ptr<auctionRound> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class auctionBid;

class auctionRound;

class userAuctionBid;

/**
 * This class is an abstract base class.
 * Describes state of an auction.
 */
class AuctionState: public Object {
 public:
  static jclass Class;

  static object_ptr<AuctionState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about an ongoing or scheduled auction.
 */
class auctionStateActive final : public AuctionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the auction started or will start.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) when the auction will be ended.
  int32 end_date_;
  static jfieldID end_date_fieldID;
  /// The minimum possible bid in the auction in Telegram Stars.
  int53 min_bid_;
  static jfieldID min_bid_fieldID;
  /// A sparse list of bids that were made in the auction.
  array<object_ptr<auctionBid>> bid_levels_;
  static jfieldID bid_levels_fieldID;
  /// User identifiers of at most 3 users with the biggest bids.
  array<int53> top_bidder_user_ids_;
  static jfieldID top_bidder_user_ids_fieldID;
  /// Rounds of the auction in which their duration or extension rules are changed.
  array<object_ptr<auctionRound>> rounds_;
  static jfieldID rounds_fieldID;
  /// Point in time (Unix timestamp) when the current round will end.
  int32 current_round_end_date_;
  static jfieldID current_round_end_date_fieldID;
  /// 1-based number of the current round.
  int32 current_round_number_;
  static jfieldID current_round_number_fieldID;
  /// The total number of rounds.
  int32 total_round_count_;
  static jfieldID total_round_count_fieldID;
  /// The number of items that were purchased on the auction by all users.
  int32 distributed_item_count_;
  static jfieldID distributed_item_count_fieldID;
  /// The number of items that have to be distributed on the auction.
  int32 left_item_count_;
  static jfieldID left_item_count_fieldID;
  /// The number of items that were purchased by the current user on the auction.
  int32 acquired_item_count_;
  static jfieldID acquired_item_count_fieldID;
  /// Bid of the current user in the auction; may be null if none.
  object_ptr<userAuctionBid> user_bid_;
  static jfieldID user_bid_fieldID;

  /**
   * Contains information about an ongoing or scheduled auction.
   */
  auctionStateActive();

  /**
   * Contains information about an ongoing or scheduled auction.
   *
   * \param[in] start_date_ Point in time (Unix timestamp) when the auction started or will start.
   * \param[in] end_date_ Point in time (Unix timestamp) when the auction will be ended.
   * \param[in] min_bid_ The minimum possible bid in the auction in Telegram Stars.
   * \param[in] bid_levels_ A sparse list of bids that were made in the auction.
   * \param[in] top_bidder_user_ids_ User identifiers of at most 3 users with the biggest bids.
   * \param[in] rounds_ Rounds of the auction in which their duration or extension rules are changed.
   * \param[in] current_round_end_date_ Point in time (Unix timestamp) when the current round will end.
   * \param[in] current_round_number_ 1-based number of the current round.
   * \param[in] total_round_count_ The total number of rounds.
   * \param[in] distributed_item_count_ The number of items that were purchased on the auction by all users.
   * \param[in] left_item_count_ The number of items that have to be distributed on the auction.
   * \param[in] acquired_item_count_ The number of items that were purchased by the current user on the auction.
   * \param[in] user_bid_ Bid of the current user in the auction; may be null if none.
   */
  auctionStateActive(int32 start_date_, int32 end_date_, int53 min_bid_, array<object_ptr<auctionBid>> &&bid_levels_, array<int53> &&top_bidder_user_ids_, array<object_ptr<auctionRound>> &&rounds_, int32 current_round_end_date_, int32 current_round_number_, int32 total_round_count_, int32 distributed_item_count_, int32 left_item_count_, int32 acquired_item_count_, object_ptr<userAuctionBid> &&user_bid_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1169774099;

  static object_ptr<AuctionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a finished auction.
 */
class auctionStateFinished final : public AuctionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the auction started.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) when the auction will be ended.
  int32 end_date_;
  static jfieldID end_date_fieldID;
  /// Average price of bought items in Telegram Stars.
  int53 average_price_;
  static jfieldID average_price_fieldID;
  /// The number of items that were purchased by the current user on the auction.
  int32 acquired_item_count_;
  static jfieldID acquired_item_count_fieldID;
  /// Number of items from the auction being resold on Telegram.
  int32 telegram_listed_item_count_;
  static jfieldID telegram_listed_item_count_fieldID;
  /// Number of items from the auction being resold on Fragment.
  int32 fragment_listed_item_count_;
  static jfieldID fragment_listed_item_count_fieldID;
  /// The HTTPS link to the Fragment for the resold items; may be empty if there are no such items being sold on Fragment.
  string fragment_url_;
  static jfieldID fragment_url_fieldID;

  /**
   * Contains information about a finished auction.
   */
  auctionStateFinished();

  /**
   * Contains information about a finished auction.
   *
   * \param[in] start_date_ Point in time (Unix timestamp) when the auction started.
   * \param[in] end_date_ Point in time (Unix timestamp) when the auction will be ended.
   * \param[in] average_price_ Average price of bought items in Telegram Stars.
   * \param[in] acquired_item_count_ The number of items that were purchased by the current user on the auction.
   * \param[in] telegram_listed_item_count_ Number of items from the auction being resold on Telegram.
   * \param[in] fragment_listed_item_count_ Number of items from the auction being resold on Fragment.
   * \param[in] fragment_url_ The HTTPS link to the Fragment for the resold items; may be empty if there are no such items being sold on Fragment.
   */
  auctionStateFinished(int32 start_date_, int32 end_date_, int53 average_price_, int32 acquired_item_count_, int32 telegram_listed_item_count_, int32 fragment_listed_item_count_, string const &fragment_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -451306439;

  static object_ptr<AuctionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes an audio file. Audio is usually in MP3 or M4A format.
 */
class audio final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Duration of the audio, in seconds; as defined by the sender.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Title of the audio; as defined by the sender.
  string title_;
  static jfieldID title_fieldID;
  /// Performer of the audio; as defined by the sender.
  string performer_;
  static jfieldID performer_fieldID;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  static jfieldID file_name_fieldID;
  /// The MIME type of the file; as defined by the sender.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// The minithumbnail of the album cover; may be null.
  object_ptr<minithumbnail> album_cover_minithumbnail_;
  static jfieldID album_cover_minithumbnail_fieldID;
  /// The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail is expected to be extracted from the downloaded audio file; may be null.
  object_ptr<thumbnail> album_cover_thumbnail_;
  static jfieldID album_cover_thumbnail_fieldID;
  /// Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate.
  array<object_ptr<thumbnail>> external_album_covers_;
  static jfieldID external_album_covers_fieldID;
  /// File containing the audio.
  object_ptr<file> audio_;
  static jfieldID audio_fieldID;

  /**
   * Describes an audio file. Audio is usually in MP3 or M4A format.
   */
  audio();

  /**
   * Describes an audio file. Audio is usually in MP3 or M4A format.
   *
   * \param[in] duration_ Duration of the audio, in seconds; as defined by the sender.
   * \param[in] title_ Title of the audio; as defined by the sender.
   * \param[in] performer_ Performer of the audio; as defined by the sender.
   * \param[in] file_name_ Original name of the file; as defined by the sender.
   * \param[in] mime_type_ The MIME type of the file; as defined by the sender.
   * \param[in] album_cover_minithumbnail_ The minithumbnail of the album cover; may be null.
   * \param[in] album_cover_thumbnail_ The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail is expected to be extracted from the downloaded audio file; may be null.
   * \param[in] external_album_covers_ Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate.
   * \param[in] audio_ File containing the audio.
   */
  audio(int32 duration_, string const &title_, string const &performer_, string const &file_name_, string const &mime_type_, object_ptr<minithumbnail> &&album_cover_minithumbnail_, object_ptr<thumbnail> &&album_cover_thumbnail_, array<object_ptr<thumbnail>> &&external_album_covers_, object_ptr<file> &&audio_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -166398841;

  static object_ptr<audio> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class audio;

/**
 * Contains a list of audio files.
 */
class audios final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of audio files found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of audio files.
  array<object_ptr<audio>> audios_;
  static jfieldID audios_fieldID;

  /**
   * Contains a list of audio files.
   */
  audios();

  /**
   * Contains a list of audio files.
   *
   * \param[in] total_count_ Approximate total number of audio files found.
   * \param[in] audios_ List of audio files.
   */
  audios(int32 total_count_, array<object_ptr<audio>> &&audios_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -680688982;

  static object_ptr<audios> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class AuthenticationCodeType;

/**
 * Information about the authentication code that was sent.
 */
class authenticationCodeInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A phone number that is being authenticated.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// The way the code was sent to the user.
  object_ptr<AuthenticationCodeType> type_;
  static jfieldID type_fieldID;
  /// The way the next code will be sent to the user; may be null.
  object_ptr<AuthenticationCodeType> next_type_;
  static jfieldID next_type_fieldID;
  /// Timeout before the code can be re-sent, in seconds.
  int32 timeout_;
  static jfieldID timeout_fieldID;

  /**
   * Information about the authentication code that was sent.
   */
  authenticationCodeInfo();

  /**
   * Information about the authentication code that was sent.
   *
   * \param[in] phone_number_ A phone number that is being authenticated.
   * \param[in] type_ The way the code was sent to the user.
   * \param[in] next_type_ The way the next code will be sent to the user; may be null.
   * \param[in] timeout_ Timeout before the code can be re-sent, in seconds.
   */
  authenticationCodeInfo(string const &phone_number_, object_ptr<AuthenticationCodeType> &&type_, object_ptr<AuthenticationCodeType> &&next_type_, int32 timeout_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -860345416;

  static object_ptr<authenticationCodeInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class FirebaseDeviceVerificationParameters;

/**
 * This class is an abstract base class.
 * Provides information about the method by which an authentication code is delivered to the user.
 */
class AuthenticationCodeType: public Object {
 public:
  static jclass Class;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A digit-only authentication code is delivered via a private Telegram message, which can be viewed from another active session.
 */
class authenticationCodeTypeTelegramMessage final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Length of the code.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * A digit-only authentication code is delivered via a private Telegram message, which can be viewed from another active session.
   */
  authenticationCodeTypeTelegramMessage();

  /**
   * A digit-only authentication code is delivered via a private Telegram message, which can be viewed from another active session.
   *
   * \param[in] length_ Length of the code.
   */
  explicit authenticationCodeTypeTelegramMessage(int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2079628074;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A digit-only authentication code is delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
 */
class authenticationCodeTypeSms final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Length of the code.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * A digit-only authentication code is delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
   */
  authenticationCodeTypeSms();

  /**
   * A digit-only authentication code is delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
   *
   * \param[in] length_ Length of the code.
   */
  explicit authenticationCodeTypeSms(int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 962650760;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication code is a word delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
 */
class authenticationCodeTypeSmsWord final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The first letters of the word if known.
  string first_letter_;
  static jfieldID first_letter_fieldID;

  /**
   * An authentication code is a word delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
   */
  authenticationCodeTypeSmsWord();

  /**
   * An authentication code is a word delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
   *
   * \param[in] first_letter_ The first letters of the word if known.
   */
  explicit authenticationCodeTypeSmsWord(string const &first_letter_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1509540765;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication code is a phrase from multiple words delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
 */
class authenticationCodeTypeSmsPhrase final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The first word of the phrase if known.
  string first_word_;
  static jfieldID first_word_fieldID;

  /**
   * An authentication code is a phrase from multiple words delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
   */
  authenticationCodeTypeSmsPhrase();

  /**
   * An authentication code is a phrase from multiple words delivered via an SMS message to the specified phone number; non-official applications may not receive this type of code.
   *
   * \param[in] first_word_ The first word of the phrase if known.
   */
  explicit authenticationCodeTypeSmsPhrase(string const &first_word_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 784108753;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A digit-only authentication code is delivered via a phone call to the specified phone number.
 */
class authenticationCodeTypeCall final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Length of the code.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * A digit-only authentication code is delivered via a phone call to the specified phone number.
   */
  authenticationCodeTypeCall();

  /**
   * A digit-only authentication code is delivered via a phone call to the specified phone number.
   *
   * \param[in] length_ Length of the code.
   */
  explicit authenticationCodeTypeCall(int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1636265063;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication code is delivered by an immediately canceled call to the specified phone number. The phone number that calls is the code that must be entered automatically.
 */
class authenticationCodeTypeFlashCall final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pattern of the phone number from which the call will be made.
  string pattern_;
  static jfieldID pattern_fieldID;

  /**
   * An authentication code is delivered by an immediately canceled call to the specified phone number. The phone number that calls is the code that must be entered automatically.
   */
  authenticationCodeTypeFlashCall();

  /**
   * An authentication code is delivered by an immediately canceled call to the specified phone number. The phone number that calls is the code that must be entered automatically.
   *
   * \param[in] pattern_ Pattern of the phone number from which the call will be made.
   */
  explicit authenticationCodeTypeFlashCall(string const &pattern_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1395882402;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication code is delivered by an immediately canceled call to the specified phone number. The last digits of the phone number that calls are the code that must be entered manually by the user.
 */
class authenticationCodeTypeMissedCall final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Prefix of the phone number from which the call will be made.
  string phone_number_prefix_;
  static jfieldID phone_number_prefix_fieldID;
  /// Number of digits in the code, excluding the prefix.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * An authentication code is delivered by an immediately canceled call to the specified phone number. The last digits of the phone number that calls are the code that must be entered manually by the user.
   */
  authenticationCodeTypeMissedCall();

  /**
   * An authentication code is delivered by an immediately canceled call to the specified phone number. The last digits of the phone number that calls are the code that must be entered manually by the user.
   *
   * \param[in] phone_number_prefix_ Prefix of the phone number from which the call will be made.
   * \param[in] length_ Number of digits in the code, excluding the prefix.
   */
  authenticationCodeTypeMissedCall(string const &phone_number_prefix_, int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 700123783;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A digit-only authentication code is delivered to https://fragment.com. The user must be logged in there via a wallet owning the phone number's NFT.
 */
class authenticationCodeTypeFragment final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL to open to receive the code.
  string url_;
  static jfieldID url_fieldID;
  /// Length of the code.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * A digit-only authentication code is delivered to https://fragment.com. The user must be logged in there via a wallet owning the phone number's NFT.
   */
  authenticationCodeTypeFragment();

  /**
   * A digit-only authentication code is delivered to https://fragment.com. The user must be logged in there via a wallet owning the phone number's NFT.
   *
   * \param[in] url_ URL to open to receive the code.
   * \param[in] length_ Length of the code.
   */
  authenticationCodeTypeFragment(string const &url_, int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2129693491;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A digit-only authentication code is delivered via Firebase Authentication to the official Android application.
 */
class authenticationCodeTypeFirebaseAndroid final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Parameters to be used for device verification.
  object_ptr<FirebaseDeviceVerificationParameters> device_verification_parameters_;
  static jfieldID device_verification_parameters_fieldID;
  /// Length of the code.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * A digit-only authentication code is delivered via Firebase Authentication to the official Android application.
   */
  authenticationCodeTypeFirebaseAndroid();

  /**
   * A digit-only authentication code is delivered via Firebase Authentication to the official Android application.
   *
   * \param[in] device_verification_parameters_ Parameters to be used for device verification.
   * \param[in] length_ Length of the code.
   */
  authenticationCodeTypeFirebaseAndroid(object_ptr<FirebaseDeviceVerificationParameters> &&device_verification_parameters_, int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1872475422;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A digit-only authentication code is delivered via Firebase Authentication to the official iOS application.
 */
class authenticationCodeTypeFirebaseIos final : public AuthenticationCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Receipt of successful application token validation to compare with receipt from push notification.
  string receipt_;
  static jfieldID receipt_fieldID;
  /// Time after the next authentication method is expected to be used if verification push notification isn't received, in seconds.
  int32 push_timeout_;
  static jfieldID push_timeout_fieldID;
  /// Length of the code.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * A digit-only authentication code is delivered via Firebase Authentication to the official iOS application.
   */
  authenticationCodeTypeFirebaseIos();

  /**
   * A digit-only authentication code is delivered via Firebase Authentication to the official iOS application.
   *
   * \param[in] receipt_ Receipt of successful application token validation to compare with receipt from push notification.
   * \param[in] push_timeout_ Time after the next authentication method is expected to be used if verification push notification isn't received, in seconds.
   * \param[in] length_ Length of the code.
   */
  authenticationCodeTypeFirebaseIos(string const &receipt_, int32 push_timeout_, int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -11162989;

  static object_ptr<AuthenticationCodeType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class EmailAddressResetState;

class authenticationCodeInfo;

class emailAddressAuthenticationCodeInfo;

class termsOfService;

/**
 * This class is an abstract base class.
 * Represents the current authorization state of the TDLib client.
 */
class AuthorizationState: public Object {
 public:
  static jclass Class;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Initialization parameters are needed. Call setTdlibParameters to provide them.
 */
class authorizationStateWaitTdlibParameters final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Initialization parameters are needed. Call setTdlibParameters to provide them.
   */
  authorizationStateWaitTdlibParameters();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 904720988;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication, getAuthenticationPasskeyParameters, or checkAuthenticationBotToken for other authentication options.
 */
class authorizationStateWaitPhoneNumber final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication, getAuthenticationPasskeyParameters, or checkAuthenticationBotToken for other authentication options.
   */
  authorizationStateWaitPhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 306402531;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must buy Telegram Premium as an in-store purchase to log in. Call checkAuthenticationPremiumPurchase and then setAuthenticationPremiumPurchaseTransaction.
 */
class authorizationStateWaitPremiumPurchase final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the store product that must be bought.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// Duration of the Telegram Premium subscription after the purchase; may be 0 if Telegram Premium subscription will not be granted.
  int32 premium_day_count_;
  static jfieldID premium_day_count_fieldID;
  /// Email address to use for support if the user has issues with Telegram Premium purchase.
  string support_email_address_;
  static jfieldID support_email_address_fieldID;
  /// Subject for the email sent to the support email address.
  string support_email_subject_;
  static jfieldID support_email_subject_fieldID;

  /**
   * The user must buy Telegram Premium as an in-store purchase to log in. Call checkAuthenticationPremiumPurchase and then setAuthenticationPremiumPurchaseTransaction.
   */
  authorizationStateWaitPremiumPurchase();

  /**
   * The user must buy Telegram Premium as an in-store purchase to log in. Call checkAuthenticationPremiumPurchase and then setAuthenticationPremiumPurchaseTransaction.
   *
   * \param[in] store_product_id_ Identifier of the store product that must be bought.
   * \param[in] premium_day_count_ Duration of the Telegram Premium subscription after the purchase; may be 0 if Telegram Premium subscription will not be granted.
   * \param[in] support_email_address_ Email address to use for support if the user has issues with Telegram Premium purchase.
   * \param[in] support_email_subject_ Subject for the email sent to the support email address.
   */
  authorizationStateWaitPremiumPurchase(string const &store_product_id_, int32 premium_day_count_, string const &support_email_address_, string const &support_email_subject_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1192878334;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * TDLib needs the user's email address to authorize. Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with Apple ID/Google ID token if allowed.
 */
class authorizationStateWaitEmailAddress final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if authorization through Apple ID is allowed.
  bool allow_apple_id_;
  static jfieldID allow_apple_id_fieldID;
  /// True, if authorization through Google ID is allowed.
  bool allow_google_id_;
  static jfieldID allow_google_id_fieldID;

  /**
   * TDLib needs the user's email address to authorize. Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with Apple ID/Google ID token if allowed.
   */
  authorizationStateWaitEmailAddress();

  /**
   * TDLib needs the user's email address to authorize. Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with Apple ID/Google ID token if allowed.
   *
   * \param[in] allow_apple_id_ True, if authorization through Apple ID is allowed.
   * \param[in] allow_google_id_ True, if authorization through Google ID is allowed.
   */
  authorizationStateWaitEmailAddress(bool allow_apple_id_, bool allow_google_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1040478663;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * TDLib needs the user's authentication code sent to an email address to authorize. Call checkAuthenticationEmailCode to provide the code.
 */
class authorizationStateWaitEmailCode final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if authorization through Apple ID is allowed.
  bool allow_apple_id_;
  static jfieldID allow_apple_id_fieldID;
  /// True, if authorization through Google ID is allowed.
  bool allow_google_id_;
  static jfieldID allow_google_id_fieldID;
  /// Information about the sent authentication code.
  object_ptr<emailAddressAuthenticationCodeInfo> code_info_;
  static jfieldID code_info_fieldID;
  /// Reset state of the email address; may be null if the email address can't be reset.
  object_ptr<EmailAddressResetState> email_address_reset_state_;
  static jfieldID email_address_reset_state_fieldID;

  /**
   * TDLib needs the user's authentication code sent to an email address to authorize. Call checkAuthenticationEmailCode to provide the code.
   */
  authorizationStateWaitEmailCode();

  /**
   * TDLib needs the user's authentication code sent to an email address to authorize. Call checkAuthenticationEmailCode to provide the code.
   *
   * \param[in] allow_apple_id_ True, if authorization through Apple ID is allowed.
   * \param[in] allow_google_id_ True, if authorization through Google ID is allowed.
   * \param[in] code_info_ Information about the sent authentication code.
   * \param[in] email_address_reset_state_ Reset state of the email address; may be null if the email address can't be reset.
   */
  authorizationStateWaitEmailCode(bool allow_apple_id_, bool allow_google_id_, object_ptr<emailAddressAuthenticationCodeInfo> &&code_info_, object_ptr<EmailAddressResetState> &&email_address_reset_state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1868627365;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * TDLib needs the user's authentication code to authorize. Call checkAuthenticationCode to check the code.
 */
class authorizationStateWaitCode final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the authorization code that was sent.
  object_ptr<authenticationCodeInfo> code_info_;
  static jfieldID code_info_fieldID;

  /**
   * TDLib needs the user's authentication code to authorize. Call checkAuthenticationCode to check the code.
   */
  authorizationStateWaitCode();

  /**
   * TDLib needs the user's authentication code to authorize. Call checkAuthenticationCode to check the code.
   *
   * \param[in] code_info_ Information about the authorization code that was sent.
   */
  explicit authorizationStateWaitCode(object_ptr<authenticationCodeInfo> &&code_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 52643073;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link.
 */
class authorizationStateWaitOtherDeviceConfirmation final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A tg:// URL for the QR code. The link will be updated frequently.
  string link_;
  static jfieldID link_fieldID;

  /**
   * The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link.
   */
  authorizationStateWaitOtherDeviceConfirmation();

  /**
   * The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link.
   *
   * \param[in] link_ A tg:// URL for the QR code. The link will be updated frequently.
   */
  explicit authorizationStateWaitOtherDeviceConfirmation(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 860166378;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. Call registerUser to accept the terms of service and provide the data.
 */
class authorizationStateWaitRegistration final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Telegram terms of service.
  object_ptr<termsOfService> terms_of_service_;
  static jfieldID terms_of_service_fieldID;

  /**
   * The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. Call registerUser to accept the terms of service and provide the data.
   */
  authorizationStateWaitRegistration();

  /**
   * The user is unregistered and needs to accept terms of service and enter their first name and last name to finish registration. Call registerUser to accept the terms of service and provide the data.
   *
   * \param[in] terms_of_service_ Telegram terms of service.
   */
  explicit authorizationStateWaitRegistration(object_ptr<termsOfService> &&terms_of_service_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 550350511;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user has been authorized, but needs to enter a 2-step verification password to start using the application. Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week.
 */
class authorizationStateWaitPassword final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hint for the password; may be empty.
  string password_hint_;
  static jfieldID password_hint_fieldID;
  /// True, if a recovery email address has been set up.
  bool has_recovery_email_address_;
  static jfieldID has_recovery_email_address_fieldID;
  /// True, if some Telegram Passport elements were saved.
  bool has_passport_data_;
  static jfieldID has_passport_data_fieldID;
  /// Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent.
  string recovery_email_address_pattern_;
  static jfieldID recovery_email_address_pattern_fieldID;

  /**
   * The user has been authorized, but needs to enter a 2-step verification password to start using the application. Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week.
   */
  authorizationStateWaitPassword();

  /**
   * The user has been authorized, but needs to enter a 2-step verification password to start using the application. Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week.
   *
   * \param[in] password_hint_ Hint for the password; may be empty.
   * \param[in] has_recovery_email_address_ True, if a recovery email address has been set up.
   * \param[in] has_passport_data_ True, if some Telegram Passport elements were saved.
   * \param[in] recovery_email_address_pattern_ Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent.
   */
  authorizationStateWaitPassword(string const &password_hint_, bool has_recovery_email_address_, bool has_passport_data_, string const &recovery_email_address_pattern_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 112238030;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user has been successfully authorized. TDLib is now ready to answer general requests.
 */
class authorizationStateReady final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user has been successfully authorized. TDLib is now ready to answer general requests.
   */
  authorizationStateReady();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1834871737;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is currently logging out.
 */
class authorizationStateLoggingOut final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is currently logging out.
   */
  authorizationStateLoggingOut();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 154449270;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received.
 */
class authorizationStateClosing final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received.
   */
  authorizationStateClosing();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 445855311;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one must create a new instance of the TDLib client.
 */
class authorizationStateClosed final : public AuthorizationState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one must create a new instance of the TDLib client.
   */
  authorizationStateClosed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1526047584;

  static object_ptr<AuthorizationState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains auto-download settings.
 */
class autoDownloadSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the auto-download is enabled.
  bool is_auto_download_enabled_;
  static jfieldID is_auto_download_enabled_fieldID;
  /// The maximum size of a photo file to be auto-downloaded, in bytes.
  int32 max_photo_file_size_;
  static jfieldID max_photo_file_size_fieldID;
  /// The maximum size of a video file to be auto-downloaded, in bytes.
  int53 max_video_file_size_;
  static jfieldID max_video_file_size_fieldID;
  /// The maximum size of other file types to be auto-downloaded, in bytes.
  int53 max_other_file_size_;
  static jfieldID max_other_file_size_fieldID;
  /// The maximum suggested bitrate for uploaded videos, in kbit/s.
  int32 video_upload_bitrate_;
  static jfieldID video_upload_bitrate_fieldID;
  /// True, if the beginning of video files needs to be preloaded for instant playback.
  bool preload_large_videos_;
  static jfieldID preload_large_videos_fieldID;
  /// True, if the next audio track needs to be preloaded while the user is listening to an audio file.
  bool preload_next_audio_;
  static jfieldID preload_next_audio_fieldID;
  /// True, if stories needs to be preloaded.
  bool preload_stories_;
  static jfieldID preload_stories_fieldID;
  /// True, if &quot;use less data for calls&quot; option needs to be enabled.
  bool use_less_data_for_calls_;
  static jfieldID use_less_data_for_calls_fieldID;

  /**
   * Contains auto-download settings.
   */
  autoDownloadSettings();

  /**
   * Contains auto-download settings.
   *
   * \param[in] is_auto_download_enabled_ True, if the auto-download is enabled.
   * \param[in] max_photo_file_size_ The maximum size of a photo file to be auto-downloaded, in bytes.
   * \param[in] max_video_file_size_ The maximum size of a video file to be auto-downloaded, in bytes.
   * \param[in] max_other_file_size_ The maximum size of other file types to be auto-downloaded, in bytes.
   * \param[in] video_upload_bitrate_ The maximum suggested bitrate for uploaded videos, in kbit/s.
   * \param[in] preload_large_videos_ True, if the beginning of video files needs to be preloaded for instant playback.
   * \param[in] preload_next_audio_ True, if the next audio track needs to be preloaded while the user is listening to an audio file.
   * \param[in] preload_stories_ True, if stories needs to be preloaded.
   * \param[in] use_less_data_for_calls_ True, if &quot;use less data for calls&quot; option needs to be enabled.
   */
  autoDownloadSettings(bool is_auto_download_enabled_, int32 max_photo_file_size_, int53 max_video_file_size_, int53 max_other_file_size_, int32 video_upload_bitrate_, bool preload_large_videos_, bool preload_next_audio_, bool preload_stories_, bool use_less_data_for_calls_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 991433696;

  static object_ptr<autoDownloadSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class autoDownloadSettings;

/**
 * Contains auto-download settings presets for the current user.
 */
class autoDownloadSettingsPresets final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Preset with lowest settings; expected to be used by default when roaming.
  object_ptr<autoDownloadSettings> low_;
  static jfieldID low_fieldID;
  /// Preset with medium settings; expected to be used by default when using mobile data.
  object_ptr<autoDownloadSettings> medium_;
  static jfieldID medium_fieldID;
  /// Preset with highest settings; expected to be used by default when connected on Wi-Fi.
  object_ptr<autoDownloadSettings> high_;
  static jfieldID high_fieldID;

  /**
   * Contains auto-download settings presets for the current user.
   */
  autoDownloadSettingsPresets();

  /**
   * Contains auto-download settings presets for the current user.
   *
   * \param[in] low_ Preset with lowest settings; expected to be used by default when roaming.
   * \param[in] medium_ Preset with medium settings; expected to be used by default when using mobile data.
   * \param[in] high_ Preset with highest settings; expected to be used by default when connected on Wi-Fi.
   */
  autoDownloadSettingsPresets(object_ptr<autoDownloadSettings> &&low_, object_ptr<autoDownloadSettings> &&medium_, object_ptr<autoDownloadSettings> &&high_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -782099166;

  static object_ptr<autoDownloadSettingsPresets> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class autosaveSettingsException;

class scopeAutosaveSettings;

/**
 * Describes autosave settings.
 */
class autosaveSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Default autosave settings for private chats.
  object_ptr<scopeAutosaveSettings> private_chat_settings_;
  static jfieldID private_chat_settings_fieldID;
  /// Default autosave settings for basic group and supergroup chats.
  object_ptr<scopeAutosaveSettings> group_settings_;
  static jfieldID group_settings_fieldID;
  /// Default autosave settings for channel chats.
  object_ptr<scopeAutosaveSettings> channel_settings_;
  static jfieldID channel_settings_fieldID;
  /// Autosave settings for specific chats.
  array<object_ptr<autosaveSettingsException>> exceptions_;
  static jfieldID exceptions_fieldID;

  /**
   * Describes autosave settings.
   */
  autosaveSettings();

  /**
   * Describes autosave settings.
   *
   * \param[in] private_chat_settings_ Default autosave settings for private chats.
   * \param[in] group_settings_ Default autosave settings for basic group and supergroup chats.
   * \param[in] channel_settings_ Default autosave settings for channel chats.
   * \param[in] exceptions_ Autosave settings for specific chats.
   */
  autosaveSettings(object_ptr<scopeAutosaveSettings> &&private_chat_settings_, object_ptr<scopeAutosaveSettings> &&group_settings_, object_ptr<scopeAutosaveSettings> &&channel_settings_, array<object_ptr<autosaveSettingsException>> &&exceptions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1629412502;

  static object_ptr<autosaveSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class scopeAutosaveSettings;

/**
 * Contains autosave settings for a chat, which overrides default settings for the corresponding scope.
 */
class autosaveSettingsException final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Autosave settings for the chat.
  object_ptr<scopeAutosaveSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Contains autosave settings for a chat, which overrides default settings for the corresponding scope.
   */
  autosaveSettingsException();

  /**
   * Contains autosave settings for a chat, which overrides default settings for the corresponding scope.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] settings_ Autosave settings for the chat.
   */
  autosaveSettingsException(int53 chat_id_, object_ptr<scopeAutosaveSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1483470280;

  static object_ptr<autosaveSettingsException> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes scope of autosave settings.
 */
class AutosaveSettingsScope: public Object {
 public:
  static jclass Class;

  static object_ptr<AutosaveSettingsScope> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Autosave settings applied to all private chats without chat-specific settings.
 */
class autosaveSettingsScopePrivateChats final : public AutosaveSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Autosave settings applied to all private chats without chat-specific settings.
   */
  autosaveSettingsScopePrivateChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1395227007;

  static object_ptr<AutosaveSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Autosave settings applied to all basic group and supergroup chats without chat-specific settings.
 */
class autosaveSettingsScopeGroupChats final : public AutosaveSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Autosave settings applied to all basic group and supergroup chats without chat-specific settings.
   */
  autosaveSettingsScopeGroupChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 853544526;

  static object_ptr<AutosaveSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Autosave settings applied to all channel chats without chat-specific settings.
 */
class autosaveSettingsScopeChannelChats final : public AutosaveSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Autosave settings applied to all channel chats without chat-specific settings.
   */
  autosaveSettingsScopeChannelChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -499572783;

  static object_ptr<AutosaveSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Autosave settings applied to a chat.
 */
class autosaveSettingsScopeChat final : public AutosaveSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Autosave settings applied to a chat.
   */
  autosaveSettingsScopeChat();

  /**
   * Autosave settings applied to a chat.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit autosaveSettingsScopeChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1632255255;

  static object_ptr<AutosaveSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class gift;

/**
 * Describes a gift that is available for purchase.
 */
class availableGift final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;
  /// Number of gifts that are available for resale.
  int32 resale_count_;
  static jfieldID resale_count_fieldID;
  /// The minimum price for the gifts available for resale in Telegram Star equivalent; 0 if there are no such gifts.
  int53 min_resale_star_count_;
  static jfieldID min_resale_star_count_fieldID;
  /// The title of the upgraded gift; empty if the gift isn't available for resale.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Describes a gift that is available for purchase.
   */
  availableGift();

  /**
   * Describes a gift that is available for purchase.
   *
   * \param[in] gift_ The gift.
   * \param[in] resale_count_ Number of gifts that are available for resale.
   * \param[in] min_resale_star_count_ The minimum price for the gifts available for resale in Telegram Star equivalent; 0 if there are no such gifts.
   * \param[in] title_ The title of the upgraded gift; empty if the gift isn't available for resale.
   */
  availableGift(object_ptr<gift> &&gift_, int32 resale_count_, int53 min_resale_star_count_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 850530502;

  static object_ptr<availableGift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class availableGift;

/**
 * Contains a list of gifts that can be sent to another user or channel chat.
 */
class availableGifts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of gifts.
  array<object_ptr<availableGift>> gifts_;
  static jfieldID gifts_fieldID;

  /**
   * Contains a list of gifts that can be sent to another user or channel chat.
   */
  availableGifts();

  /**
   * Contains a list of gifts that can be sent to another user or channel chat.
   *
   * \param[in] gifts_ The list of gifts.
   */
  explicit availableGifts(array<object_ptr<availableGift>> &&gifts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1450341886;

  static object_ptr<availableGifts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

/**
 * Represents an available reaction.
 */
class availableReaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  static jfieldID type_fieldID;
  /// True, if Telegram Premium is needed to send the reaction.
  bool needs_premium_;
  static jfieldID needs_premium_fieldID;

  /**
   * Represents an available reaction.
   */
  availableReaction();

  /**
   * Represents an available reaction.
   *
   * \param[in] type_ Type of the reaction.
   * \param[in] needs_premium_ True, if Telegram Premium is needed to send the reaction.
   */
  availableReaction(object_ptr<ReactionType> &&type_, bool needs_premium_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -117292153;

  static object_ptr<availableReaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionUnavailabilityReason;

class availableReaction;

/**
 * Represents a list of reactions that can be added to a message.
 */
class availableReactions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of reactions to be shown at the top.
  array<object_ptr<availableReaction>> top_reactions_;
  static jfieldID top_reactions_fieldID;
  /// List of recently used reactions.
  array<object_ptr<availableReaction>> recent_reactions_;
  static jfieldID recent_reactions_fieldID;
  /// List of popular reactions.
  array<object_ptr<availableReaction>> popular_reactions_;
  static jfieldID popular_reactions_fieldID;
  /// True, if any custom emoji reaction can be added by Telegram Premium subscribers.
  bool allow_custom_emoji_;
  static jfieldID allow_custom_emoji_fieldID;
  /// True, if the reactions will be tags and the message can be found by them.
  bool are_tags_;
  static jfieldID are_tags_fieldID;
  /// The reason why the current user can't add reactions to the message, despite some other users can; may be null if none.
  object_ptr<ReactionUnavailabilityReason> unavailability_reason_;
  static jfieldID unavailability_reason_fieldID;

  /**
   * Represents a list of reactions that can be added to a message.
   */
  availableReactions();

  /**
   * Represents a list of reactions that can be added to a message.
   *
   * \param[in] top_reactions_ List of reactions to be shown at the top.
   * \param[in] recent_reactions_ List of recently used reactions.
   * \param[in] popular_reactions_ List of popular reactions.
   * \param[in] allow_custom_emoji_ True, if any custom emoji reaction can be added by Telegram Premium subscribers.
   * \param[in] are_tags_ True, if the reactions will be tags and the message can be found by them.
   * \param[in] unavailability_reason_ The reason why the current user can't add reactions to the message, despite some other users can; may be null if none.
   */
  availableReactions(array<object_ptr<availableReaction>> &&top_reactions_, array<object_ptr<availableReaction>> &&recent_reactions_, array<object_ptr<availableReaction>> &&popular_reactions_, bool allow_custom_emoji_, bool are_tags_, object_ptr<ReactionUnavailabilityReason> &&unavailability_reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 912529522;

  static object_ptr<availableReactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundType;

class document;

/**
 * Describes a chat background.
 */
class background final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique background identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// True, if this is one of default backgrounds.
  bool is_default_;
  static jfieldID is_default_fieldID;
  /// True, if the background is dark and is recommended to be used with dark theme.
  bool is_dark_;
  static jfieldID is_dark_fieldID;
  /// Unique background name.
  string name_;
  static jfieldID name_fieldID;
  /// Document with the background; may be null. Null only for filled and chat theme backgrounds.
  object_ptr<document> document_;
  static jfieldID document_fieldID;
  /// Type of the background.
  object_ptr<BackgroundType> type_;
  static jfieldID type_fieldID;

  /**
   * Describes a chat background.
   */
  background();

  /**
   * Describes a chat background.
   *
   * \param[in] id_ Unique background identifier.
   * \param[in] is_default_ True, if this is one of default backgrounds.
   * \param[in] is_dark_ True, if the background is dark and is recommended to be used with dark theme.
   * \param[in] name_ Unique background name.
   * \param[in] document_ Document with the background; may be null. Null only for filled and chat theme backgrounds.
   * \param[in] type_ Type of the background.
   */
  background(int64 id_, bool is_default_, bool is_dark_, string const &name_, object_ptr<document> &&document_, object_ptr<BackgroundType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -429971172;

  static object_ptr<background> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a fill of a background.
 */
class BackgroundFill: public Object {
 public:
  static jclass Class;

  static object_ptr<BackgroundFill> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a solid fill of a background.
 */
class backgroundFillSolid final : public BackgroundFill {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A color of the background in the RGB format.
  int32 color_;
  static jfieldID color_fieldID;

  /**
   * Describes a solid fill of a background.
   */
  backgroundFillSolid();

  /**
   * Describes a solid fill of a background.
   *
   * \param[in] color_ A color of the background in the RGB format.
   */
  explicit backgroundFillSolid(int32 color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1010678813;

  static object_ptr<BackgroundFill> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a gradient fill of a background.
 */
class backgroundFillGradient final : public BackgroundFill {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A top color of the background in the RGB format.
  int32 top_color_;
  static jfieldID top_color_fieldID;
  /// A bottom color of the background in the RGB format.
  int32 bottom_color_;
  static jfieldID bottom_color_fieldID;
  /// Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45.
  int32 rotation_angle_;
  static jfieldID rotation_angle_fieldID;

  /**
   * Describes a gradient fill of a background.
   */
  backgroundFillGradient();

  /**
   * Describes a gradient fill of a background.
   *
   * \param[in] top_color_ A top color of the background in the RGB format.
   * \param[in] bottom_color_ A bottom color of the background in the RGB format.
   * \param[in] rotation_angle_ Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45.
   */
  backgroundFillGradient(int32 top_color_, int32 bottom_color_, int32 rotation_angle_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1839206017;

  static object_ptr<BackgroundFill> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a freeform gradient fill of a background.
 */
class backgroundFillFreeformGradient final : public BackgroundFill {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of 3 or 4 colors of the freeform gradient in the RGB format.
  array<int32> colors_;
  static jfieldID colors_fieldID;

  /**
   * Describes a freeform gradient fill of a background.
   */
  backgroundFillFreeformGradient();

  /**
   * Describes a freeform gradient fill of a background.
   *
   * \param[in] colors_ A list of 3 or 4 colors of the freeform gradient in the RGB format.
   */
  explicit backgroundFillFreeformGradient(array<int32> &&colors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1145469255;

  static object_ptr<BackgroundFill> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundFill;

/**
 * This class is an abstract base class.
 * Describes the type of background.
 */
class BackgroundType: public Object {
 public:
  static jclass Class;

  static object_ptr<BackgroundType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A wallpaper in JPEG format.
 */
class backgroundTypeWallpaper final : public BackgroundType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12.
  bool is_blurred_;
  static jfieldID is_blurred_fieldID;
  /// True, if the background needs to be slightly moved when device is tilted.
  bool is_moving_;
  static jfieldID is_moving_fieldID;

  /**
   * A wallpaper in JPEG format.
   */
  backgroundTypeWallpaper();

  /**
   * A wallpaper in JPEG format.
   *
   * \param[in] is_blurred_ True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12.
   * \param[in] is_moving_ True, if the background needs to be slightly moved when device is tilted.
   */
  backgroundTypeWallpaper(bool is_blurred_, bool is_moving_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1972128891;

  static object_ptr<BackgroundType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A PNG or TGV (gzipped subset of SVG with MIME type &quot;application/x-tgwallpattern&quot;) pattern to be combined with the background fill chosen by the user.
 */
class backgroundTypePattern final : public BackgroundType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Fill of the background.
  object_ptr<BackgroundFill> fill_;
  static jfieldID fill_fieldID;
  /// Intensity of the pattern when it is shown above the filled background; 0-100.
  int32 intensity_;
  static jfieldID intensity_fieldID;
  /// True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only.
  bool is_inverted_;
  static jfieldID is_inverted_fieldID;
  /// True, if the background needs to be slightly moved when device is tilted.
  bool is_moving_;
  static jfieldID is_moving_fieldID;

  /**
   * A PNG or TGV (gzipped subset of SVG with MIME type &quot;application/x-tgwallpattern&quot;) pattern to be combined with the background fill chosen by the user.
   */
  backgroundTypePattern();

  /**
   * A PNG or TGV (gzipped subset of SVG with MIME type &quot;application/x-tgwallpattern&quot;) pattern to be combined with the background fill chosen by the user.
   *
   * \param[in] fill_ Fill of the background.
   * \param[in] intensity_ Intensity of the pattern when it is shown above the filled background; 0-100.
   * \param[in] is_inverted_ True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only.
   * \param[in] is_moving_ True, if the background needs to be slightly moved when device is tilted.
   */
  backgroundTypePattern(object_ptr<BackgroundFill> &&fill_, int32 intensity_, bool is_inverted_, bool is_moving_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1290213117;

  static object_ptr<BackgroundType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A filled background.
 */
class backgroundTypeFill final : public BackgroundType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The background fill.
  object_ptr<BackgroundFill> fill_;
  static jfieldID fill_fieldID;

  /**
   * A filled background.
   */
  backgroundTypeFill();

  /**
   * A filled background.
   *
   * \param[in] fill_ The background fill.
   */
  explicit backgroundTypeFill(object_ptr<BackgroundFill> &&fill_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 993008684;

  static object_ptr<BackgroundType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A background from a chat theme based on an emoji; can be used only as a chat background in channels.
 */
class backgroundTypeChatTheme final : public BackgroundType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the emoji chat theme.
  string theme_name_;
  static jfieldID theme_name_fieldID;

  /**
   * A background from a chat theme based on an emoji; can be used only as a chat background in channels.
   */
  backgroundTypeChatTheme();

  /**
   * A background from a chat theme based on an emoji; can be used only as a chat background in channels.
   *
   * \param[in] theme_name_ Name of the emoji chat theme.
   */
  explicit backgroundTypeChatTheme(string const &theme_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1299879762;

  static object_ptr<BackgroundType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class background;

/**
 * Contains a list of backgrounds.
 */
class backgrounds final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of backgrounds.
  array<object_ptr<background>> backgrounds_;
  static jfieldID backgrounds_fieldID;

  /**
   * Contains a list of backgrounds.
   */
  backgrounds();

  /**
   * Contains a list of backgrounds.
   *
   * \param[in] backgrounds_ A list of backgrounds.
   */
  explicit backgrounds(array<object_ptr<background>> &&backgrounds_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 724728704;

  static object_ptr<backgrounds> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an action associated with a bank card number.
 */
class bankCardActionOpenUrl final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Action text.
  string text_;
  static jfieldID text_fieldID;
  /// The URL to be opened.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Describes an action associated with a bank card number.
   */
  bankCardActionOpenUrl();

  /**
   * Describes an action associated with a bank card number.
   *
   * \param[in] text_ Action text.
   * \param[in] url_ The URL to be opened.
   */
  bankCardActionOpenUrl(string const &text_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -196454267;

  static object_ptr<bankCardActionOpenUrl> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class bankCardActionOpenUrl;

/**
 * Information about a bank card.
 */
class bankCardInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the bank card description.
  string title_;
  static jfieldID title_fieldID;
  /// Actions that can be done with the bank card number.
  array<object_ptr<bankCardActionOpenUrl>> actions_;
  static jfieldID actions_fieldID;

  /**
   * Information about a bank card.
   */
  bankCardInfo();

  /**
   * Information about a bank card.
   *
   * \param[in] title_ Title of the bank card description.
   * \param[in] actions_ Actions that can be done with the bank card number.
   */
  bankCardInfo(string const &title_, array<object_ptr<bankCardActionOpenUrl>> &&actions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2116647730;

  static object_ptr<bankCardInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatMemberStatus;

/**
 * Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users).
 */
class basicGroup final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// Number of members in the group.
  int32 member_count_;
  static jfieldID member_count_fieldID;
  /// Status of the current user in the group.
  object_ptr<ChatMemberStatus> status_;
  static jfieldID status_fieldID;
  /// True, if the group is active.
  bool is_active_;
  static jfieldID is_active_fieldID;
  /// Identifier of the supergroup to which this group was upgraded; 0 if none.
  int53 upgraded_to_supergroup_id_;
  static jfieldID upgraded_to_supergroup_id_fieldID;

  /**
   * Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users).
   */
  basicGroup();

  /**
   * Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users).
   *
   * \param[in] id_ Group identifier.
   * \param[in] member_count_ Number of members in the group.
   * \param[in] status_ Status of the current user in the group.
   * \param[in] is_active_ True, if the group is active.
   * \param[in] upgraded_to_supergroup_id_ Identifier of the supergroup to which this group was upgraded; 0 if none.
   */
  basicGroup(int53 id_, int32 member_count_, object_ptr<ChatMemberStatus> &&status_, bool is_active_, int53 upgraded_to_supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -194767217;

  static object_ptr<basicGroup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class botCommands;

class chatInviteLink;

class chatMember;

class chatPhoto;

/**
 * Contains full information about a basic group.
 */
class basicGroupFullInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// Group description. Updated only after the basic group is opened.
  string description_;
  static jfieldID description_fieldID;
  /// User identifier of the creator of the group; 0 if unknown.
  int53 creator_user_id_;
  static jfieldID creator_user_id_fieldID;
  /// Group members.
  array<object_ptr<chatMember>> members_;
  static jfieldID members_fieldID;
  /// True, if non-administrators and non-bots can be hidden in responses to getSupergroupMembers and searchChatMembers for non-administrators after upgrading the basic group to a supergroup.
  bool can_hide_members_;
  static jfieldID can_hide_members_fieldID;
  /// True, if aggressive anti-spam checks can be enabled or disabled in the supergroup after upgrading the basic group to a supergroup.
  bool can_toggle_aggressive_anti_spam_;
  static jfieldID can_toggle_aggressive_anti_spam_fieldID;
  /// Primary invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;
  /// List of commands of bots in the group.
  array<object_ptr<botCommands>> bot_commands_;
  static jfieldID bot_commands_fieldID;

  /**
   * Contains full information about a basic group.
   */
  basicGroupFullInfo();

  /**
   * Contains full information about a basic group.
   *
   * \param[in] photo_ Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo.
   * \param[in] description_ Group description. Updated only after the basic group is opened.
   * \param[in] creator_user_id_ User identifier of the creator of the group; 0 if unknown.
   * \param[in] members_ Group members.
   * \param[in] can_hide_members_ True, if non-administrators and non-bots can be hidden in responses to getSupergroupMembers and searchChatMembers for non-administrators after upgrading the basic group to a supergroup.
   * \param[in] can_toggle_aggressive_anti_spam_ True, if aggressive anti-spam checks can be enabled or disabled in the supergroup after upgrading the basic group to a supergroup.
   * \param[in] invite_link_ Primary invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened.
   * \param[in] bot_commands_ List of commands of bots in the group.
   */
  basicGroupFullInfo(object_ptr<chatPhoto> &&photo_, string const &description_, int53 creator_user_id_, array<object_ptr<chatMember>> &&members_, bool can_hide_members_, bool can_toggle_aggressive_anti_spam_, object_ptr<chatInviteLink> &&invite_link_, array<object_ptr<botCommands>> &&bot_commands_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1879035520;

  static object_ptr<basicGroupFullInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a birthdate of a user.
 */
class birthdate final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Day of the month; 1-31.
  int32 day_;
  static jfieldID day_fieldID;
  /// Month of the year; 1-12.
  int32 month_;
  static jfieldID month_fieldID;
  /// Birth year; 0 if unknown.
  int32 year_;
  static jfieldID year_fieldID;

  /**
   * Represents a birthdate of a user.
   */
  birthdate();

  /**
   * Represents a birthdate of a user.
   *
   * \param[in] day_ Day of the month; 1-31.
   * \param[in] month_ Month of the year; 1-12.
   * \param[in] year_ Birth year; 0 if unknown.
   */
  birthdate(int32 day_, int32 month_, int32 year_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1644064030;

  static object_ptr<birthdate> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of block list.
 */
class BlockList: public Object {
 public:
  static jclass Class;

  static object_ptr<BlockList> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The main block list that disallows writing messages to the current user, receiving their status and photo, viewing of stories, and some other actions.
 */
class blockListMain final : public BlockList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The main block list that disallows writing messages to the current user, receiving their status and photo, viewing of stories, and some other actions.
   */
  blockListMain();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1352930172;

  static object_ptr<BlockList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The block list that disallows viewing of stories of the current user.
 */
class blockListStories final : public BlockList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The block list that disallows viewing of stories of the current user.
   */
  blockListStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 103323228;

  static object_ptr<BlockList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes users that have access to a bot.
 */
class botAccessSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if access to the bot is restricted to its owner and selected users.
  bool is_restricted_;
  static jfieldID is_restricted_fieldID;
  /// Identifiers of the users who can use the bot additionally to the owner of the bot.
  array<int53> added_user_ids_;
  static jfieldID added_user_ids_fieldID;

  /**
   * Describes users that have access to a bot.
   */
  botAccessSettings();

  /**
   * Describes users that have access to a bot.
   *
   * \param[in] is_restricted_ True, if access to the bot is restricted to its owner and selected users.
   * \param[in] added_user_ids_ Identifiers of the users who can use the bot additionally to the owner of the bot.
   */
  botAccessSettings(bool is_restricted_, array<int53> &&added_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 735061332;

  static object_ptr<botAccessSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a command supported by a bot.
 */
class botCommand final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the bot command.
  string command_;
  static jfieldID command_fieldID;
  /// Description of the bot command.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Represents a command supported by a bot.
   */
  botCommand();

  /**
   * Represents a command supported by a bot.
   *
   * \param[in] command_ Text of the bot command.
   * \param[in] description_ Description of the bot command.
   */
  botCommand(string const &command_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1032140601;

  static object_ptr<botCommand> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the scope to which bot commands are relevant.
 */
class BotCommandScope: public Object {
 public:
  static jclass Class;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering all users.
 */
class botCommandScopeDefault final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A scope covering all users.
   */
  botCommandScopeDefault();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 795652779;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering all private chats.
 */
class botCommandScopeAllPrivateChats final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A scope covering all private chats.
   */
  botCommandScopeAllPrivateChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -344889543;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering all group and supergroup chats.
 */
class botCommandScopeAllGroupChats final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A scope covering all group and supergroup chats.
   */
  botCommandScopeAllGroupChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -981088162;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering all group and supergroup chat administrators.
 */
class botCommandScopeAllChatAdministrators final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A scope covering all group and supergroup chat administrators.
   */
  botCommandScopeAllChatAdministrators();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1998329169;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering all members of a chat.
 */
class botCommandScopeChat final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * A scope covering all members of a chat.
   */
  botCommandScopeChat();

  /**
   * A scope covering all members of a chat.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit botCommandScopeChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -430234971;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering all administrators of a chat.
 */
class botCommandScopeChatAdministrators final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * A scope covering all administrators of a chat.
   */
  botCommandScopeChatAdministrators();

  /**
   * A scope covering all administrators of a chat.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit botCommandScopeChatAdministrators(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1119682126;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A scope covering a member of a chat.
 */
class botCommandScopeChatMember final : public BotCommandScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A scope covering a member of a chat.
   */
  botCommandScopeChatMember();

  /**
   * A scope covering a member of a chat.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] user_id_ User identifier.
   */
  botCommandScopeChatMember(int53 chat_id_, int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -211380494;

  static object_ptr<BotCommandScope> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class botCommand;

/**
 * Contains a list of bot commands.
 */
class botCommands final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Bot's user identifier.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// List of bot commands.
  array<object_ptr<botCommand>> commands_;
  static jfieldID commands_fieldID;

  /**
   * Contains a list of bot commands.
   */
  botCommands();

  /**
   * Contains a list of bot commands.
   *
   * \param[in] bot_user_id_ Bot's user identifier.
   * \param[in] commands_ List of bot commands.
   */
  botCommands(int53 bot_user_id_, array<object_ptr<botCommand>> &&commands_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1741364468;

  static object_ptr<botCommands> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

class affiliateProgramInfo;

class animation;

class botCommand;

class botMenuButton;

class botVerificationParameters;

class chatAdministratorRights;

class photo;

/**
 * Contains information about a bot.
 */
class botInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text that is shown on the bot's profile page and is sent together with the link when users share the bot.
  string short_description_;
  static jfieldID short_description_fieldID;
  /// The text shown in the chat with the bot if the chat is empty.
  string description_;
  static jfieldID description_fieldID;
  /// Photo shown in the chat with the bot if the chat is empty; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Animation shown in the chat with the bot if the chat is empty; may be null.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;
  /// Identifier of the bot, which manages the bot; 0 if none or unknown; for owner of the bot only.
  int53 manager_bot_user_id_;
  static jfieldID manager_bot_user_id_fieldID;
  /// Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown.
  object_ptr<botMenuButton> menu_button_;
  static jfieldID menu_button_fieldID;
  /// List of the bot commands.
  array<object_ptr<botCommand>> commands_;
  static jfieldID commands_fieldID;
  /// The HTTP link to the privacy policy of the bot. If empty, then /privacy command must be used if supported by the bot. If the command isn't supported, then https://telegram.org/privacy-tpa must be opened.
  string privacy_policy_url_;
  static jfieldID privacy_policy_url_fieldID;
  /// Default administrator rights for adding the bot to basic group and supergroup chats; may be null.
  object_ptr<chatAdministratorRights> default_group_administrator_rights_;
  static jfieldID default_group_administrator_rights_fieldID;
  /// Default administrator rights for adding the bot to channels; may be null.
  object_ptr<chatAdministratorRights> default_channel_administrator_rights_;
  static jfieldID default_channel_administrator_rights_fieldID;
  /// Information about the affiliate program of the bot; may be null if none.
  object_ptr<affiliateProgramInfo> affiliate_program_;
  static jfieldID affiliate_program_fieldID;
  /// Default light background color for bot Web Apps; -1 if not specified.
  int32 web_app_background_light_color_;
  static jfieldID web_app_background_light_color_fieldID;
  /// Default dark background color for bot Web Apps; -1 if not specified.
  int32 web_app_background_dark_color_;
  static jfieldID web_app_background_dark_color_fieldID;
  /// Default light header color for bot Web Apps; -1 if not specified.
  int32 web_app_header_light_color_;
  static jfieldID web_app_header_light_color_fieldID;
  /// Default dark header color for bot Web Apps; -1 if not specified.
  int32 web_app_header_dark_color_;
  static jfieldID web_app_header_dark_color_fieldID;
  /// Parameters of the verification that can be provided by the bot; may be null if none or the current user isn't the owner of the bot.
  object_ptr<botVerificationParameters> verification_parameters_;
  static jfieldID verification_parameters_fieldID;
  /// True, if the bot's revenue statistics are available to the current user.
  bool can_get_revenue_statistics_;
  static jfieldID can_get_revenue_statistics_fieldID;
  /// True, if the bot can manage emoji status of the current user.
  bool can_manage_emoji_status_;
  static jfieldID can_manage_emoji_status_fieldID;
  /// True, if the bot has media previews.
  bool has_media_previews_;
  static jfieldID has_media_previews_fieldID;
  /// The internal link, which can be used to edit bot commands; may be null.
  object_ptr<InternalLinkType> edit_commands_link_;
  static jfieldID edit_commands_link_fieldID;
  /// The internal link, which can be used to edit bot description; may be null.
  object_ptr<InternalLinkType> edit_description_link_;
  static jfieldID edit_description_link_fieldID;
  /// The internal link, which can be used to edit the photo or animation shown in the chat with the bot if the chat is empty; may be null.
  object_ptr<InternalLinkType> edit_description_media_link_;
  static jfieldID edit_description_media_link_fieldID;
  /// The internal link, which can be used to edit bot settings; may be null.
  object_ptr<InternalLinkType> edit_settings_link_;
  static jfieldID edit_settings_link_fieldID;

  /**
   * Contains information about a bot.
   */
  botInfo();

  /**
   * Contains information about a bot.
   *
   * \param[in] short_description_ The text that is shown on the bot's profile page and is sent together with the link when users share the bot.
   * \param[in] description_ The text shown in the chat with the bot if the chat is empty.
   * \param[in] photo_ Photo shown in the chat with the bot if the chat is empty; may be null.
   * \param[in] animation_ Animation shown in the chat with the bot if the chat is empty; may be null.
   * \param[in] manager_bot_user_id_ Identifier of the bot, which manages the bot; 0 if none or unknown; for owner of the bot only.
   * \param[in] menu_button_ Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown.
   * \param[in] commands_ List of the bot commands.
   * \param[in] privacy_policy_url_ The HTTP link to the privacy policy of the bot. If empty, then /privacy command must be used if supported by the bot. If the command isn't supported, then https://telegram.org/privacy-tpa must be opened.
   * \param[in] default_group_administrator_rights_ Default administrator rights for adding the bot to basic group and supergroup chats; may be null.
   * \param[in] default_channel_administrator_rights_ Default administrator rights for adding the bot to channels; may be null.
   * \param[in] affiliate_program_ Information about the affiliate program of the bot; may be null if none.
   * \param[in] web_app_background_light_color_ Default light background color for bot Web Apps; -1 if not specified.
   * \param[in] web_app_background_dark_color_ Default dark background color for bot Web Apps; -1 if not specified.
   * \param[in] web_app_header_light_color_ Default light header color for bot Web Apps; -1 if not specified.
   * \param[in] web_app_header_dark_color_ Default dark header color for bot Web Apps; -1 if not specified.
   * \param[in] verification_parameters_ Parameters of the verification that can be provided by the bot; may be null if none or the current user isn't the owner of the bot.
   * \param[in] can_get_revenue_statistics_ True, if the bot's revenue statistics are available to the current user.
   * \param[in] can_manage_emoji_status_ True, if the bot can manage emoji status of the current user.
   * \param[in] has_media_previews_ True, if the bot has media previews.
   * \param[in] edit_commands_link_ The internal link, which can be used to edit bot commands; may be null.
   * \param[in] edit_description_link_ The internal link, which can be used to edit bot description; may be null.
   * \param[in] edit_description_media_link_ The internal link, which can be used to edit the photo or animation shown in the chat with the bot if the chat is empty; may be null.
   * \param[in] edit_settings_link_ The internal link, which can be used to edit bot settings; may be null.
   */
  botInfo(string const &short_description_, string const &description_, object_ptr<photo> &&photo_, object_ptr<animation> &&animation_, int53 manager_bot_user_id_, object_ptr<botMenuButton> &&menu_button_, array<object_ptr<botCommand>> &&commands_, string const &privacy_policy_url_, object_ptr<chatAdministratorRights> &&default_group_administrator_rights_, object_ptr<chatAdministratorRights> &&default_channel_administrator_rights_, object_ptr<affiliateProgramInfo> &&affiliate_program_, int32 web_app_background_light_color_, int32 web_app_background_dark_color_, int32 web_app_header_light_color_, int32 web_app_header_dark_color_, object_ptr<botVerificationParameters> &&verification_parameters_, bool can_get_revenue_statistics_, bool can_manage_emoji_status_, bool has_media_previews_, object_ptr<InternalLinkType> &&edit_commands_link_, object_ptr<InternalLinkType> &&edit_description_link_, object_ptr<InternalLinkType> &&edit_description_media_link_, object_ptr<InternalLinkType> &&edit_settings_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -586441582;

  static object_ptr<botInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StoryContent;

/**
 * Describes media previews of a bot.
 */
class botMediaPreview final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the preview was added or changed last time.
  int32 date_;
  static jfieldID date_fieldID;
  /// Content of the preview; may only be of the types storyContentPhoto, storyContentVideo, or storyContentUnsupported.
  object_ptr<StoryContent> content_;
  static jfieldID content_fieldID;

  /**
   * Describes media previews of a bot.
   */
  botMediaPreview();

  /**
   * Describes media previews of a bot.
   *
   * \param[in] date_ Point in time (Unix timestamp) when the preview was added or changed last time.
   * \param[in] content_ Content of the preview; may only be of the types storyContentPhoto, storyContentVideo, or storyContentUnsupported.
   */
  botMediaPreview(int32 date_, object_ptr<StoryContent> &&content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1632264984;

  static object_ptr<botMediaPreview> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class botMediaPreview;

/**
 * Contains a list of media previews of a bot for the given language and the list of languages for which the bot has dedicated previews.
 */
class botMediaPreviewInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of media previews.
  array<object_ptr<botMediaPreview>> previews_;
  static jfieldID previews_fieldID;
  /// List of language codes for which the bot has dedicated previews.
  array<string> language_codes_;
  static jfieldID language_codes_fieldID;

  /**
   * Contains a list of media previews of a bot for the given language and the list of languages for which the bot has dedicated previews.
   */
  botMediaPreviewInfo();

  /**
   * Contains a list of media previews of a bot for the given language and the list of languages for which the bot has dedicated previews.
   *
   * \param[in] previews_ List of media previews.
   * \param[in] language_codes_ List of language codes for which the bot has dedicated previews.
   */
  botMediaPreviewInfo(array<object_ptr<botMediaPreview>> &&previews_, array<string> &&language_codes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -284783012;

  static object_ptr<botMediaPreviewInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class botMediaPreview;

/**
 * Contains a list of media previews of a bot.
 */
class botMediaPreviews final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of media previews.
  array<object_ptr<botMediaPreview>> previews_;
  static jfieldID previews_fieldID;

  /**
   * Contains a list of media previews of a bot.
   */
  botMediaPreviews();

  /**
   * Contains a list of media previews of a bot.
   *
   * \param[in] previews_ List of media previews.
   */
  explicit botMediaPreviews(array<object_ptr<botMediaPreview>> &&previews_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1787720586;

  static object_ptr<botMediaPreviews> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a button to be shown instead of bot commands menu button.
 */
class botMenuButton final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the button.
  string text_;
  static jfieldID text_fieldID;
  /// URL of a Web App to open when the button is pressed. If the link is of the type internalLinkTypeWebApp, then it must be processed accordingly. Otherwise, the link must be passed to openWebApp.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Describes a button to be shown instead of bot commands menu button.
   */
  botMenuButton();

  /**
   * Describes a button to be shown instead of bot commands menu button.
   *
   * \param[in] text_ Text of the button.
   * \param[in] url_ URL of a Web App to open when the button is pressed. If the link is of the type internalLinkTypeWebApp, then it must be processed accordingly. Otherwise, the link must be passed to openWebApp.
   */
  botMenuButton(string const &text_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -944407322;

  static object_ptr<botMenuButton> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes verification status provided by a bot.
 */
class botVerification final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot that provided the verification.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the custom emoji that is used as the verification sign.
  int64 icon_custom_emoji_id_;
  static jfieldID icon_custom_emoji_id_fieldID;
  /// Custom description of verification reason set by the bot. Can contain only Mention, Hashtag, Cashtag, PhoneNumber, BankCardNumber, Url, and EmailAddress entities.
  object_ptr<formattedText> custom_description_;
  static jfieldID custom_description_fieldID;

  /**
   * Describes verification status provided by a bot.
   */
  botVerification();

  /**
   * Describes verification status provided by a bot.
   *
   * \param[in] bot_user_id_ Identifier of the bot that provided the verification.
   * \param[in] icon_custom_emoji_id_ Identifier of the custom emoji that is used as the verification sign.
   * \param[in] custom_description_ Custom description of verification reason set by the bot. Can contain only Mention, Hashtag, Cashtag, PhoneNumber, BankCardNumber, Url, and EmailAddress entities.
   */
  botVerification(int53 bot_user_id_, int64 icon_custom_emoji_id_, object_ptr<formattedText> &&custom_description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1319061774;

  static object_ptr<botVerification> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes parameters of verification that is provided by a bot.
 */
class botVerificationParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the custom emoji that is used as the verification sign.
  int64 icon_custom_emoji_id_;
  static jfieldID icon_custom_emoji_id_fieldID;
  /// Name of the organization that provides verification.
  string organization_name_;
  static jfieldID organization_name_fieldID;
  /// Default custom description of verification reason to be used as placeholder in setMessageSenderBotVerification; may be null if none.
  object_ptr<formattedText> default_custom_description_;
  static jfieldID default_custom_description_fieldID;
  /// True, if the bot is allowed to provide custom description for verified entities.
  bool can_set_custom_description_;
  static jfieldID can_set_custom_description_fieldID;

  /**
   * Describes parameters of verification that is provided by a bot.
   */
  botVerificationParameters();

  /**
   * Describes parameters of verification that is provided by a bot.
   *
   * \param[in] icon_custom_emoji_id_ Identifier of the custom emoji that is used as the verification sign.
   * \param[in] organization_name_ Name of the organization that provides verification.
   * \param[in] default_custom_description_ Default custom description of verification reason to be used as placeholder in setMessageSenderBotVerification; may be null if none.
   * \param[in] can_set_custom_description_ True, if the bot is allowed to provide custom description for verified entities.
   */
  botVerificationParameters(int64 icon_custom_emoji_id_, string const &organization_name_, object_ptr<formattedText> &&default_custom_description_, bool can_set_custom_description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -723737249;

  static object_ptr<botVerificationParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class webApp;

/**
 * This class is an abstract base class.
 * Describes a reason why a bot was allowed to write messages to the current user.
 */
class BotWriteAccessAllowReason: public Object {
 public:
  static jclass Class;

  static object_ptr<BotWriteAccessAllowReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user connected a website by logging in using Telegram Login Widget on it.
 */
class botWriteAccessAllowReasonConnectedWebsite final : public BotWriteAccessAllowReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Domain name of the connected website.
  string domain_name_;
  static jfieldID domain_name_fieldID;

  /**
   * The user connected a website by logging in using Telegram Login Widget on it.
   */
  botWriteAccessAllowReasonConnectedWebsite();

  /**
   * The user connected a website by logging in using Telegram Login Widget on it.
   *
   * \param[in] domain_name_ Domain name of the connected website.
   */
  explicit botWriteAccessAllowReasonConnectedWebsite(string const &domain_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2016325603;

  static object_ptr<BotWriteAccessAllowReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user added the bot to attachment or side menu using toggleBotIsAddedToAttachmentMenu.
 */
class botWriteAccessAllowReasonAddedToAttachmentMenu final : public BotWriteAccessAllowReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user added the bot to attachment or side menu using toggleBotIsAddedToAttachmentMenu.
   */
  botWriteAccessAllowReasonAddedToAttachmentMenu();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2104795235;

  static object_ptr<BotWriteAccessAllowReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user launched a Web App using getWebAppLinkUrl.
 */
class botWriteAccessAllowReasonLaunchedWebApp final : public BotWriteAccessAllowReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the Web App.
  object_ptr<webApp> web_app_;
  static jfieldID web_app_fieldID;

  /**
   * The user launched a Web App using getWebAppLinkUrl.
   */
  botWriteAccessAllowReasonLaunchedWebApp();

  /**
   * The user launched a Web App using getWebAppLinkUrl.
   *
   * \param[in] web_app_ Information about the Web App.
   */
  explicit botWriteAccessAllowReasonLaunchedWebApp(object_ptr<webApp> &&web_app_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -240843561;

  static object_ptr<BotWriteAccessAllowReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user accepted bot's request to send messages with allowBotToSendMessages.
 */
class botWriteAccessAllowReasonAcceptedRequest final : public BotWriteAccessAllowReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user accepted bot's request to send messages with allowBotToSendMessages.
   */
  botWriteAccessAllowReasonAcceptedRequest();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1983497220;

  static object_ptr<BotWriteAccessAllowReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a built-in theme of an official application.
 */
class BuiltInTheme: public Object {
 public:
  static jclass Class;

  static object_ptr<BuiltInTheme> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Classic light theme.
 */
class builtInThemeClassic final : public BuiltInTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Classic light theme.
   */
  builtInThemeClassic();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -696429972;

  static object_ptr<BuiltInTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Regular light theme.
 */
class builtInThemeDay final : public BuiltInTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Regular light theme.
   */
  builtInThemeDay();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 411774754;

  static object_ptr<BuiltInTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Regular dark theme.
 */
class builtInThemeNight final : public BuiltInTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Regular dark theme.
   */
  builtInThemeNight();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 429672829;

  static object_ptr<BuiltInTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Tinted dark theme.
 */
class builtInThemeTinted final : public BuiltInTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Tinted dark theme.
   */
  builtInThemeTinted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 513932973;

  static object_ptr<BuiltInTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Arctic light theme.
 */
class builtInThemeArctic final : public BuiltInTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Arctic light theme.
   */
  builtInThemeArctic();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1427659554;

  static object_ptr<BuiltInTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes conditions for sending of away messages by a Telegram Business account.
 */
class BusinessAwayMessageSchedule: public Object {
 public:
  static jclass Class;

  static object_ptr<BusinessAwayMessageSchedule> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Send away messages always.
 */
class businessAwayMessageScheduleAlways final : public BusinessAwayMessageSchedule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Send away messages always.
   */
  businessAwayMessageScheduleAlways();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -910564679;

  static object_ptr<BusinessAwayMessageSchedule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Send away messages outside of the business opening hours.
 */
class businessAwayMessageScheduleOutsideOfOpeningHours final : public BusinessAwayMessageSchedule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Send away messages outside of the business opening hours.
   */
  businessAwayMessageScheduleOutsideOfOpeningHours();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -968630506;

  static object_ptr<BusinessAwayMessageSchedule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Send away messages only in the specified time span.
 */
class businessAwayMessageScheduleCustom final : public BusinessAwayMessageSchedule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the away messages will start to be sent.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) when the away messages will stop to be sent.
  int32 end_date_;
  static jfieldID end_date_fieldID;

  /**
   * Send away messages only in the specified time span.
   */
  businessAwayMessageScheduleCustom();

  /**
   * Send away messages only in the specified time span.
   *
   * \param[in] start_date_ Point in time (Unix timestamp) when the away messages will start to be sent.
   * \param[in] end_date_ Point in time (Unix timestamp) when the away messages will stop to be sent.
   */
  businessAwayMessageScheduleCustom(int32 start_date_, int32 end_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1967108654;

  static object_ptr<BusinessAwayMessageSchedule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BusinessAwayMessageSchedule;

class businessRecipients;

/**
 * Describes settings for messages that are automatically sent by a Telegram Business account when it is away.
 */
class businessAwayMessageSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique quick reply shortcut identifier for the away messages.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// Chosen recipients of the away messages.
  object_ptr<businessRecipients> recipients_;
  static jfieldID recipients_fieldID;
  /// Settings used to check whether the current user is away.
  object_ptr<BusinessAwayMessageSchedule> schedule_;
  static jfieldID schedule_fieldID;
  /// True, if the messages must not be sent if the account was online in the last 10 minutes.
  bool offline_only_;
  static jfieldID offline_only_fieldID;

  /**
   * Describes settings for messages that are automatically sent by a Telegram Business account when it is away.
   */
  businessAwayMessageSettings();

  /**
   * Describes settings for messages that are automatically sent by a Telegram Business account when it is away.
   *
   * \param[in] shortcut_id_ Unique quick reply shortcut identifier for the away messages.
   * \param[in] recipients_ Chosen recipients of the away messages.
   * \param[in] schedule_ Settings used to check whether the current user is away.
   * \param[in] offline_only_ True, if the messages must not be sent if the account was online in the last 10 minutes.
   */
  businessAwayMessageSettings(int32 shortcut_id_, object_ptr<businessRecipients> &&recipients_, object_ptr<BusinessAwayMessageSchedule> &&schedule_, bool offline_only_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 353084137;

  static object_ptr<businessAwayMessageSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a business bot that manages the chat.
 */
class businessBotManageBar final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// URL to be opened to manage the bot.
  string manage_url_;
  static jfieldID manage_url_fieldID;
  /// True, if the bot is paused. Use toggleBusinessConnectedBotChatIsPaused to change the value of the field.
  bool is_bot_paused_;
  static jfieldID is_bot_paused_fieldID;
  /// True, if the bot can reply.
  bool can_bot_reply_;
  static jfieldID can_bot_reply_fieldID;

  /**
   * Contains information about a business bot that manages the chat.
   */
  businessBotManageBar();

  /**
   * Contains information about a business bot that manages the chat.
   *
   * \param[in] bot_user_id_ User identifier of the bot.
   * \param[in] manage_url_ URL to be opened to manage the bot.
   * \param[in] is_bot_paused_ True, if the bot is paused. Use toggleBusinessConnectedBotChatIsPaused to change the value of the field.
   * \param[in] can_bot_reply_ True, if the bot can reply.
   */
  businessBotManageBar(int53 bot_user_id_, string const &manage_url_, bool is_bot_paused_, bool can_bot_reply_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -311399806;

  static object_ptr<businessBotManageBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes rights of a business bot.
 */
class businessBotRights final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours.
  bool can_reply_;
  static jfieldID can_reply_fieldID;
  /// True, if the bot can mark incoming private messages as read.
  bool can_read_messages_;
  static jfieldID can_read_messages_fieldID;
  /// True, if the bot can delete sent messages.
  bool can_delete_sent_messages_;
  static jfieldID can_delete_sent_messages_fieldID;
  /// True, if the bot can delete any message.
  bool can_delete_all_messages_;
  static jfieldID can_delete_all_messages_fieldID;
  /// True, if the bot can edit name of the business account.
  bool can_edit_name_;
  static jfieldID can_edit_name_fieldID;
  /// True, if the bot can edit bio of the business account.
  bool can_edit_bio_;
  static jfieldID can_edit_bio_fieldID;
  /// True, if the bot can edit profile photo of the business account.
  bool can_edit_profile_photo_;
  static jfieldID can_edit_profile_photo_fieldID;
  /// True, if the bot can edit username of the business account.
  bool can_edit_username_;
  static jfieldID can_edit_username_fieldID;
  /// True, if the bot can view gifts and Telegram Star amount owned by the business account.
  bool can_view_gifts_and_stars_;
  static jfieldID can_view_gifts_and_stars_fieldID;
  /// True, if the bot can sell regular gifts received by the business account.
  bool can_sell_gifts_;
  static jfieldID can_sell_gifts_fieldID;
  /// True, if the bot can change gift receiving settings of the business account.
  bool can_change_gift_settings_;
  static jfieldID can_change_gift_settings_fieldID;
  /// True, if the bot can transfer and upgrade gifts received by the business account.
  bool can_transfer_and_upgrade_gifts_;
  static jfieldID can_transfer_and_upgrade_gifts_fieldID;
  /// True, if the bot can transfer Telegram Stars received by the business account to account of the bot, or use them to upgrade and transfer gifts.
  bool can_transfer_stars_;
  static jfieldID can_transfer_stars_fieldID;
  /// True, if the bot can post, edit and delete stories.
  bool can_manage_stories_;
  static jfieldID can_manage_stories_fieldID;

  /**
   * Describes rights of a business bot.
   */
  businessBotRights();

  /**
   * Describes rights of a business bot.
   *
   * \param[in] can_reply_ True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours.
   * \param[in] can_read_messages_ True, if the bot can mark incoming private messages as read.
   * \param[in] can_delete_sent_messages_ True, if the bot can delete sent messages.
   * \param[in] can_delete_all_messages_ True, if the bot can delete any message.
   * \param[in] can_edit_name_ True, if the bot can edit name of the business account.
   * \param[in] can_edit_bio_ True, if the bot can edit bio of the business account.
   * \param[in] can_edit_profile_photo_ True, if the bot can edit profile photo of the business account.
   * \param[in] can_edit_username_ True, if the bot can edit username of the business account.
   * \param[in] can_view_gifts_and_stars_ True, if the bot can view gifts and Telegram Star amount owned by the business account.
   * \param[in] can_sell_gifts_ True, if the bot can sell regular gifts received by the business account.
   * \param[in] can_change_gift_settings_ True, if the bot can change gift receiving settings of the business account.
   * \param[in] can_transfer_and_upgrade_gifts_ True, if the bot can transfer and upgrade gifts received by the business account.
   * \param[in] can_transfer_stars_ True, if the bot can transfer Telegram Stars received by the business account to account of the bot, or use them to upgrade and transfer gifts.
   * \param[in] can_manage_stories_ True, if the bot can post, edit and delete stories.
   */
  businessBotRights(bool can_reply_, bool can_read_messages_, bool can_delete_sent_messages_, bool can_delete_all_messages_, bool can_edit_name_, bool can_edit_bio_, bool can_edit_profile_photo_, bool can_edit_username_, bool can_view_gifts_and_stars_, bool can_sell_gifts_, bool can_change_gift_settings_, bool can_transfer_and_upgrade_gifts_, bool can_transfer_stars_, bool can_manage_stories_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1224839038;

  static object_ptr<businessBotRights> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Contains information about a business chat link.
 */
class businessChatLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The HTTPS link.
  string link_;
  static jfieldID link_fieldID;
  /// Message draft text that will be added to the input field.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Link title.
  string title_;
  static jfieldID title_fieldID;
  /// Number of times the link was used.
  int32 view_count_;
  static jfieldID view_count_fieldID;

  /**
   * Contains information about a business chat link.
   */
  businessChatLink();

  /**
   * Contains information about a business chat link.
   *
   * \param[in] link_ The HTTPS link.
   * \param[in] text_ Message draft text that will be added to the input field.
   * \param[in] title_ Link title.
   * \param[in] view_count_ Number of times the link was used.
   */
  businessChatLink(string const &link_, object_ptr<formattedText> &&text_, string const &title_, int32 view_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1902539901;

  static object_ptr<businessChatLink> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Contains information about a business chat link.
 */
class businessChatLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the private chat that created the link.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message draft text that must be added to the input field.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Contains information about a business chat link.
   */
  businessChatLinkInfo();

  /**
   * Contains information about a business chat link.
   *
   * \param[in] chat_id_ Identifier of the private chat that created the link.
   * \param[in] text_ Message draft text that must be added to the input field.
   */
  businessChatLinkInfo(int53 chat_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -864865105;

  static object_ptr<businessChatLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessChatLink;

/**
 * Contains a list of business chat links created by the user.
 */
class businessChatLinks final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of links.
  array<object_ptr<businessChatLink>> links_;
  static jfieldID links_fieldID;

  /**
   * Contains a list of business chat links created by the user.
   */
  businessChatLinks();

  /**
   * Contains a list of business chat links created by the user.
   *
   * \param[in] links_ List of links.
   */
  explicit businessChatLinks(array<object_ptr<businessChatLink>> &&links_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 79067036;

  static object_ptr<businessChatLinks> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessBotRights;

class businessRecipients;

/**
 * Describes a bot connected to a business account.
 */
class businessConnectedBot final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Private chats that will be accessible to the bot.
  object_ptr<businessRecipients> recipients_;
  static jfieldID recipients_fieldID;
  /// Rights of the bot.
  object_ptr<businessBotRights> rights_;
  static jfieldID rights_fieldID;

  /**
   * Describes a bot connected to a business account.
   */
  businessConnectedBot();

  /**
   * Describes a bot connected to a business account.
   *
   * \param[in] bot_user_id_ User identifier of the bot.
   * \param[in] recipients_ Private chats that will be accessible to the bot.
   * \param[in] rights_ Rights of the bot.
   */
  businessConnectedBot(int53 bot_user_id_, object_ptr<businessRecipients> &&recipients_, object_ptr<businessBotRights> &&rights_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1815439021;

  static object_ptr<businessConnectedBot> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessBotRights;

/**
 * Describes a connection of the bot with a business account.
 */
class businessConnection final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the connection.
  string id_;
  static jfieldID id_fieldID;
  /// Identifier of the business user who created the connection.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Chat identifier of the private chat with the user.
  int53 user_chat_id_;
  static jfieldID user_chat_id_fieldID;
  /// Point in time (Unix timestamp) when the connection was established.
  int32 date_;
  static jfieldID date_fieldID;
  /// Rights of the bot; may be null if the connection was disabled.
  object_ptr<businessBotRights> rights_;
  static jfieldID rights_fieldID;
  /// True, if the connection is enabled; false otherwise.
  bool is_enabled_;
  static jfieldID is_enabled_fieldID;

  /**
   * Describes a connection of the bot with a business account.
   */
  businessConnection();

  /**
   * Describes a connection of the bot with a business account.
   *
   * \param[in] id_ Unique identifier of the connection.
   * \param[in] user_id_ Identifier of the business user who created the connection.
   * \param[in] user_chat_id_ Chat identifier of the private chat with the user.
   * \param[in] date_ Point in time (Unix timestamp) when the connection was established.
   * \param[in] rights_ Rights of the bot; may be null if the connection was disabled.
   * \param[in] is_enabled_ True, if the connection is enabled; false otherwise.
   */
  businessConnection(string const &id_, int53 user_id_, int53 user_chat_id_, int32 date_, object_ptr<businessBotRights> &&rights_, bool is_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -995703933;

  static object_ptr<businessConnection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a feature available to Business user accounts.
 */
class BusinessFeature: public Object {
 public:
  static jclass Class;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set location.
 */
class businessFeatureLocation final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set location.
   */
  businessFeatureLocation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1064304004;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set opening hours.
 */
class businessFeatureOpeningHours final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set opening hours.
   */
  businessFeatureOpeningHours();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 461054701;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to use quick replies.
 */
class businessFeatureQuickReplies final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to use quick replies.
   */
  businessFeatureQuickReplies();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1674048894;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set up a greeting message.
 */
class businessFeatureGreetingMessage final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set up a greeting message.
   */
  businessFeatureGreetingMessage();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1789424756;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set up an away message.
 */
class businessFeatureAwayMessage final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set up an away message.
   */
  businessFeatureAwayMessage();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1090119901;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to create links to the business account with predefined message text.
 */
class businessFeatureAccountLinks final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to create links to the business account with predefined message text.
   */
  businessFeatureAccountLinks();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1878693646;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to customize start page.
 */
class businessFeatureStartPage final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to customize start page.
   */
  businessFeatureStartPage();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 401471457;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to connect a bot to the account.
 */
class businessFeatureBots final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to connect a bot to the account.
   */
  businessFeatureBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 275084773;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to show an emoji status along with the business name.
 */
class businessFeatureEmojiStatus final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to show an emoji status along with the business name.
   */
  businessFeatureEmojiStatus();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -846282523;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to display folder names for each chat in the chat list.
 */
class businessFeatureChatFolderTags final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to display folder names for each chat in the chat list.
   */
  businessFeatureChatFolderTags();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -543880918;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to use many additional features for stories.
 */
class businessFeatureUpgradedStories final : public BusinessFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to use many additional features for stories.
   */
  businessFeatureUpgradedStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1812245550;

  static object_ptr<BusinessFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BusinessFeature;

class animation;

/**
 * Describes a promotion animation for a Business feature.
 */
class businessFeaturePromotionAnimation final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Business feature.
  object_ptr<BusinessFeature> feature_;
  static jfieldID feature_fieldID;
  /// Promotion animation for the feature.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;

  /**
   * Describes a promotion animation for a Business feature.
   */
  businessFeaturePromotionAnimation();

  /**
   * Describes a promotion animation for a Business feature.
   *
   * \param[in] feature_ Business feature.
   * \param[in] animation_ Promotion animation for the feature.
   */
  businessFeaturePromotionAnimation(object_ptr<BusinessFeature> &&feature_, object_ptr<animation> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2047174666;

  static object_ptr<businessFeaturePromotionAnimation> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BusinessFeature;

/**
 * Contains information about features, available to Business user accounts.
 */
class businessFeatures final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of available business features.
  array<object_ptr<BusinessFeature>> features_;
  static jfieldID features_fieldID;

  /**
   * Contains information about features, available to Business user accounts.
   */
  businessFeatures();

  /**
   * Contains information about features, available to Business user accounts.
   *
   * \param[in] features_ The list of available business features.
   */
  explicit businessFeatures(array<object_ptr<BusinessFeature>> &&features_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1532468184;

  static object_ptr<businessFeatures> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessRecipients;

/**
 * Describes settings for greeting messages that are automatically sent by a Telegram Business account as response to incoming messages in an inactive private chat.
 */
class businessGreetingMessageSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique quick reply shortcut identifier for the greeting messages.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// Chosen recipients of the greeting messages.
  object_ptr<businessRecipients> recipients_;
  static jfieldID recipients_fieldID;
  /// The number of days after which a chat will be considered as inactive; currently, must be on of 7, 14, 21, or 28.
  int32 inactivity_days_;
  static jfieldID inactivity_days_fieldID;

  /**
   * Describes settings for greeting messages that are automatically sent by a Telegram Business account as response to incoming messages in an inactive private chat.
   */
  businessGreetingMessageSettings();

  /**
   * Describes settings for greeting messages that are automatically sent by a Telegram Business account as response to incoming messages in an inactive private chat.
   *
   * \param[in] shortcut_id_ Unique quick reply shortcut identifier for the greeting messages.
   * \param[in] recipients_ Chosen recipients of the greeting messages.
   * \param[in] inactivity_days_ The number of days after which a chat will be considered as inactive; currently, must be on of 7, 14, 21, or 28.
   */
  businessGreetingMessageSettings(int32 shortcut_id_, object_ptr<businessRecipients> &&recipients_, int32 inactivity_days_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1689140754;

  static object_ptr<businessGreetingMessageSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessAwayMessageSettings;

class businessGreetingMessageSettings;

class businessLocation;

class businessOpeningHours;

class businessStartPage;

/**
 * Contains information about a Telegram Business account.
 */
class businessInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Location of the business; may be null if none.
  object_ptr<businessLocation> location_;
  static jfieldID location_fieldID;
  /// Opening hours of the business; may be null if none. The hours are guaranteed to be valid and has already been split by week days.
  object_ptr<businessOpeningHours> opening_hours_;
  static jfieldID opening_hours_fieldID;
  /// Opening hours of the business in the local time; may be null if none. The hours are guaranteed to be valid and has already been split by week days. Local time zone identifier will be empty. An updateUserFullInfo update is not triggered when value of this field changes.
  object_ptr<businessOpeningHours> local_opening_hours_;
  static jfieldID local_opening_hours_fieldID;
  /// Time left before the business will open the next time, in seconds; 0 if unknown. An updateUserFullInfo update is not triggered when value of this field changes.
  int32 next_open_in_;
  static jfieldID next_open_in_fieldID;
  /// Time left before the business will close the next time, in seconds; 0 if unknown. An updateUserFullInfo update is not triggered when value of this field changes.
  int32 next_close_in_;
  static jfieldID next_close_in_fieldID;
  /// The greeting message; may be null if none or the Business account is not of the current user.
  object_ptr<businessGreetingMessageSettings> greeting_message_settings_;
  static jfieldID greeting_message_settings_fieldID;
  /// The away message; may be null if none or the Business account is not of the current user.
  object_ptr<businessAwayMessageSettings> away_message_settings_;
  static jfieldID away_message_settings_fieldID;
  /// Information about start page of the account; may be null if none.
  object_ptr<businessStartPage> start_page_;
  static jfieldID start_page_fieldID;

  /**
   * Contains information about a Telegram Business account.
   */
  businessInfo();

  /**
   * Contains information about a Telegram Business account.
   *
   * \param[in] location_ Location of the business; may be null if none.
   * \param[in] opening_hours_ Opening hours of the business; may be null if none. The hours are guaranteed to be valid and has already been split by week days.
   * \param[in] local_opening_hours_ Opening hours of the business in the local time; may be null if none. The hours are guaranteed to be valid and has already been split by week days. Local time zone identifier will be empty. An updateUserFullInfo update is not triggered when value of this field changes.
   * \param[in] next_open_in_ Time left before the business will open the next time, in seconds; 0 if unknown. An updateUserFullInfo update is not triggered when value of this field changes.
   * \param[in] next_close_in_ Time left before the business will close the next time, in seconds; 0 if unknown. An updateUserFullInfo update is not triggered when value of this field changes.
   * \param[in] greeting_message_settings_ The greeting message; may be null if none or the Business account is not of the current user.
   * \param[in] away_message_settings_ The away message; may be null if none or the Business account is not of the current user.
   * \param[in] start_page_ Information about start page of the account; may be null if none.
   */
  businessInfo(object_ptr<businessLocation> &&location_, object_ptr<businessOpeningHours> &&opening_hours_, object_ptr<businessOpeningHours> &&local_opening_hours_, int32 next_open_in_, int32 next_close_in_, object_ptr<businessGreetingMessageSettings> &&greeting_message_settings_, object_ptr<businessAwayMessageSettings> &&away_message_settings_, object_ptr<businessStartPage> &&start_page_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1428179342;

  static object_ptr<businessInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class location;

/**
 * Represents a location of a business.
 */
class businessLocation final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The location; may be null if not specified.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Location address; 1-96 characters.
  string address_;
  static jfieldID address_fieldID;

  /**
   * Represents a location of a business.
   */
  businessLocation();

  /**
   * Represents a location of a business.
   *
   * \param[in] location_ The location; may be null if not specified.
   * \param[in] address_ Location address; 1-96 characters.
   */
  businessLocation(object_ptr<location> &&location_, string const &address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1084969126;

  static object_ptr<businessLocation> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Describes a message from a business account as received by a bot.
 */
class businessMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// Message that is replied by the message in the same chat; may be null if none.
  object_ptr<message> reply_to_message_;
  static jfieldID reply_to_message_fieldID;

  /**
   * Describes a message from a business account as received by a bot.
   */
  businessMessage();

  /**
   * Describes a message from a business account as received by a bot.
   *
   * \param[in] message_ The message.
   * \param[in] reply_to_message_ Message that is replied by the message in the same chat; may be null if none.
   */
  businessMessage(object_ptr<message> &&message_, object_ptr<message> &&reply_to_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -94353850;

  static object_ptr<businessMessage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessMessage;

/**
 * Contains a list of messages from a business account as received by a bot.
 */
class businessMessages final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of business messages.
  array<object_ptr<businessMessage>> messages_;
  static jfieldID messages_fieldID;

  /**
   * Contains a list of messages from a business account as received by a bot.
   */
  businessMessages();

  /**
   * Contains a list of messages from a business account as received by a bot.
   *
   * \param[in] messages_ List of business messages.
   */
  explicit businessMessages(array<object_ptr<businessMessage>> &&messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -764562473;

  static object_ptr<businessMessages> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessOpeningHoursInterval;

/**
 * Describes opening hours of a business.
 */
class businessOpeningHours final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique time zone identifier.
  string time_zone_id_;
  static jfieldID time_zone_id_fieldID;
  /// Intervals of the time when the business is open.
  array<object_ptr<businessOpeningHoursInterval>> opening_hours_;
  static jfieldID opening_hours_fieldID;

  /**
   * Describes opening hours of a business.
   */
  businessOpeningHours();

  /**
   * Describes opening hours of a business.
   *
   * \param[in] time_zone_id_ Unique time zone identifier.
   * \param[in] opening_hours_ Intervals of the time when the business is open.
   */
  businessOpeningHours(string const &time_zone_id_, array<object_ptr<businessOpeningHoursInterval>> &&opening_hours_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 816603700;

  static object_ptr<businessOpeningHours> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an interval of time when the business is open.
 */
class businessOpeningHoursInterval final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0-7*24*60.
  int32 start_minute_;
  static jfieldID start_minute_fieldID;
  /// The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 1-8*24*60.
  int32 end_minute_;
  static jfieldID end_minute_fieldID;

  /**
   * Describes an interval of time when the business is open.
   */
  businessOpeningHoursInterval();

  /**
   * Describes an interval of time when the business is open.
   *
   * \param[in] start_minute_ The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0-7*24*60.
   * \param[in] end_minute_ The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 1-8*24*60.
   */
  businessOpeningHoursInterval(int32 start_minute_, int32 end_minute_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1108322732;

  static object_ptr<businessOpeningHoursInterval> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes private chats chosen for automatic interaction with a business.
 */
class businessRecipients final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of selected private chats.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;
  /// Identifiers of private chats that are always excluded; for businessConnectedBot only.
  array<int53> excluded_chat_ids_;
  static jfieldID excluded_chat_ids_fieldID;
  /// True, if all existing private chats are selected.
  bool select_existing_chats_;
  static jfieldID select_existing_chats_fieldID;
  /// True, if all new private chats are selected.
  bool select_new_chats_;
  static jfieldID select_new_chats_fieldID;
  /// True, if all private chats with contacts are selected.
  bool select_contacts_;
  static jfieldID select_contacts_fieldID;
  /// True, if all private chats with non-contacts are selected.
  bool select_non_contacts_;
  static jfieldID select_non_contacts_fieldID;
  /// If true, then all private chats except the selected are chosen. Otherwise, only the selected chats are chosen.
  bool exclude_selected_;
  static jfieldID exclude_selected_fieldID;

  /**
   * Describes private chats chosen for automatic interaction with a business.
   */
  businessRecipients();

  /**
   * Describes private chats chosen for automatic interaction with a business.
   *
   * \param[in] chat_ids_ Identifiers of selected private chats.
   * \param[in] excluded_chat_ids_ Identifiers of private chats that are always excluded; for businessConnectedBot only.
   * \param[in] select_existing_chats_ True, if all existing private chats are selected.
   * \param[in] select_new_chats_ True, if all new private chats are selected.
   * \param[in] select_contacts_ True, if all private chats with contacts are selected.
   * \param[in] select_non_contacts_ True, if all private chats with non-contacts are selected.
   * \param[in] exclude_selected_ If true, then all private chats except the selected are chosen. Otherwise, only the selected chats are chosen.
   */
  businessRecipients(array<int53> &&chat_ids_, array<int53> &&excluded_chat_ids_, bool select_existing_chats_, bool select_new_chats_, bool select_contacts_, bool select_non_contacts_, bool exclude_selected_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 868656909;

  static object_ptr<businessRecipients> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Describes settings for a business account start page.
 */
class businessStartPage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title text of the start page.
  string title_;
  static jfieldID title_fieldID;
  /// Message text of the start page.
  string message_;
  static jfieldID message_fieldID;
  /// Greeting sticker of the start page; may be null if none.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Describes settings for a business account start page.
   */
  businessStartPage();

  /**
   * Describes settings for a business account start page.
   *
   * \param[in] title_ Title text of the start page.
   * \param[in] message_ Message text of the start page.
   * \param[in] sticker_ Greeting sticker of the start page; may be null if none.
   */
  businessStartPage(string const &title_, string const &message_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1616709681;

  static object_ptr<businessStartPage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes style of a button.
 */
class ButtonStyle: public Object {
 public:
  static jclass Class;

  static object_ptr<ButtonStyle> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The button has default style.
 */
class buttonStyleDefault final : public ButtonStyle {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The button has default style.
   */
  buttonStyleDefault();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 588834315;

  static object_ptr<ButtonStyle> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The button has dark blue color.
 */
class buttonStylePrimary final : public ButtonStyle {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The button has dark blue color.
   */
  buttonStylePrimary();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2048071333;

  static object_ptr<ButtonStyle> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The button has red color.
 */
class buttonStyleDanger final : public ButtonStyle {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The button has red color.
   */
  buttonStyleDanger();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1637377793;

  static object_ptr<ButtonStyle> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The button has green color.
 */
class buttonStyleSuccess final : public ButtonStyle {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The button has green color.
   */
  buttonStyleSuccess();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1042215008;

  static object_ptr<ButtonStyle> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class CallState;

/**
 * Describes a call.
 */
class call final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier, not persistent.
  int32 id_;
  static jfieldID id_fieldID;
  /// Persistent unique call identifier; 0 if isn't assigned yet by the server.
  int64 unique_id_;
  static jfieldID unique_id_fieldID;
  /// User identifier of the other call participant.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// True, if the call is outgoing.
  bool is_outgoing_;
  static jfieldID is_outgoing_fieldID;
  /// True, if the call is a video call.
  bool is_video_;
  static jfieldID is_video_fieldID;
  /// Call state.
  object_ptr<CallState> state_;
  static jfieldID state_fieldID;

  /**
   * Describes a call.
   */
  call();

  /**
   * Describes a call.
   *
   * \param[in] id_ Call identifier, not persistent.
   * \param[in] unique_id_ Persistent unique call identifier; 0 if isn't assigned yet by the server.
   * \param[in] user_id_ User identifier of the other call participant.
   * \param[in] is_outgoing_ True, if the call is outgoing.
   * \param[in] is_video_ True, if the call is a video call.
   * \param[in] state_ Call state.
   */
  call(int32 id_, int64 unique_id_, int53 user_id_, bool is_outgoing_, bool is_video_, object_ptr<CallState> &&state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 837356336;

  static object_ptr<call> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the reason why a call was discarded.
 */
class CallDiscardReason: public Object {
 public:
  static jclass Class;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call wasn't discarded, or the reason is unknown.
 */
class callDiscardReasonEmpty final : public CallDiscardReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call wasn't discarded, or the reason is unknown.
   */
  callDiscardReasonEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1258917949;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call was ended before the conversation started. It was canceled by the caller or missed by the other party.
 */
class callDiscardReasonMissed final : public CallDiscardReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call was ended before the conversation started. It was canceled by the caller or missed by the other party.
   */
  callDiscardReasonMissed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1680358012;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call was ended before the conversation started. It was declined by the other party.
 */
class callDiscardReasonDeclined final : public CallDiscardReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call was ended before the conversation started. It was declined by the other party.
   */
  callDiscardReasonDeclined();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1729926094;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call was ended during the conversation because the users were disconnected.
 */
class callDiscardReasonDisconnected final : public CallDiscardReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call was ended during the conversation because the users were disconnected.
   */
  callDiscardReasonDisconnected();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1342872670;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call was ended because one of the parties hung up.
 */
class callDiscardReasonHungUp final : public CallDiscardReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call was ended because one of the parties hung up.
   */
  callDiscardReasonHungUp();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 438216166;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call was ended because it has been upgraded to a group call.
 */
class callDiscardReasonUpgradeToGroupCall final : public CallDiscardReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link for the group call.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * The call was ended because it has been upgraded to a group call.
   */
  callDiscardReasonUpgradeToGroupCall();

  /**
   * The call was ended because it has been upgraded to a group call.
   *
   * \param[in] invite_link_ Invite link for the group call.
   */
  explicit callDiscardReasonUpgradeToGroupCall(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1254509319;

  static object_ptr<CallDiscardReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains the call identifier.
 */
class callId final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  int32 id_;
  static jfieldID id_fieldID;

  /**
   * Contains the call identifier.
   */
  callId();

  /**
   * Contains the call identifier.
   *
   * \param[in] id_ Call identifier.
   */
  explicit callId(int32 id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 65717769;

  static object_ptr<callId> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the exact type of problem with a call.
 */
class CallProblem: public Object {
 public:
  static jclass Class;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user heard their own voice.
 */
class callProblemEcho final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user heard their own voice.
   */
  callProblemEcho();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 801116548;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user heard background noise.
 */
class callProblemNoise final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user heard background noise.
   */
  callProblemNoise();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1053065359;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The other side kept disappearing.
 */
class callProblemInterruptions final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The other side kept disappearing.
   */
  callProblemInterruptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1119493218;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The speech was distorted.
 */
class callProblemDistortedSpeech final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The speech was distorted.
   */
  callProblemDistortedSpeech();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 379960581;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user couldn't hear the other side.
 */
class callProblemSilentLocal final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user couldn't hear the other side.
   */
  callProblemSilentLocal();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 253652790;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The other side couldn't hear the user.
 */
class callProblemSilentRemote final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The other side couldn't hear the user.
   */
  callProblemSilentRemote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 573634714;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call ended unexpectedly.
 */
class callProblemDropped final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call ended unexpectedly.
   */
  callProblemDropped();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1207311487;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The video was distorted.
 */
class callProblemDistortedVideo final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The video was distorted.
   */
  callProblemDistortedVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 385245706;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The video was pixelated.
 */
class callProblemPixelatedVideo final : public CallProblem {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The video was pixelated.
   */
  callProblemPixelatedVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2115315411;

  static object_ptr<CallProblem> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Specifies the supported call protocols.
 */
class callProtocol final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if UDP peer-to-peer connections are supported.
  bool udp_p2p_;
  static jfieldID udp_p2p_fieldID;
  /// True, if connection through UDP reflectors is supported.
  bool udp_reflector_;
  static jfieldID udp_reflector_fieldID;
  /// The minimum supported API layer; use 65.
  int32 min_layer_;
  static jfieldID min_layer_fieldID;
  /// The maximum supported API layer; use 92.
  int32 max_layer_;
  static jfieldID max_layer_fieldID;
  /// List of supported tgcalls versions.
  array<string> library_versions_;
  static jfieldID library_versions_fieldID;

  /**
   * Specifies the supported call protocols.
   */
  callProtocol();

  /**
   * Specifies the supported call protocols.
   *
   * \param[in] udp_p2p_ True, if UDP peer-to-peer connections are supported.
   * \param[in] udp_reflector_ True, if connection through UDP reflectors is supported.
   * \param[in] min_layer_ The minimum supported API layer; use 65.
   * \param[in] max_layer_ The maximum supported API layer; use 92.
   * \param[in] library_versions_ List of supported tgcalls versions.
   */
  callProtocol(bool udp_p2p_, bool udp_reflector_, int32 min_layer_, int32 max_layer_, array<string> &&library_versions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1075562897;

  static object_ptr<callProtocol> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class CallServerType;

/**
 * Describes a server for relaying call data.
 */
class callServer final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Server identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Server IPv4 address.
  string ip_address_;
  static jfieldID ip_address_fieldID;
  /// Server IPv6 address.
  string ipv6_address_;
  static jfieldID ipv6_address_fieldID;
  /// Server port number.
  int32 port_;
  static jfieldID port_fieldID;
  /// Server type.
  object_ptr<CallServerType> type_;
  static jfieldID type_fieldID;

  /**
   * Describes a server for relaying call data.
   */
  callServer();

  /**
   * Describes a server for relaying call data.
   *
   * \param[in] id_ Server identifier.
   * \param[in] ip_address_ Server IPv4 address.
   * \param[in] ipv6_address_ Server IPv6 address.
   * \param[in] port_ Server port number.
   * \param[in] type_ Server type.
   */
  callServer(int64 id_, string const &ip_address_, string const &ipv6_address_, int32 port_, object_ptr<CallServerType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1865932695;

  static object_ptr<callServer> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the type of call server.
 */
class CallServerType: public Object {
 public:
  static jclass Class;

  static object_ptr<CallServerType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram call reflector.
 */
class callServerTypeTelegramReflector final : public CallServerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A peer tag to be used with the reflector.
  bytes peer_tag_;
  static jfieldID peer_tag_fieldID;
  /// True, if the server uses TCP instead of UDP.
  bool is_tcp_;
  static jfieldID is_tcp_fieldID;

  /**
   * A Telegram call reflector.
   */
  callServerTypeTelegramReflector();

  /**
   * A Telegram call reflector.
   *
   * \param[in] peer_tag_ A peer tag to be used with the reflector.
   * \param[in] is_tcp_ True, if the server uses TCP instead of UDP.
   */
  callServerTypeTelegramReflector(bytes const &peer_tag_, bool is_tcp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 850343189;

  static object_ptr<CallServerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A WebRTC server.
 */
class callServerTypeWebrtc final : public CallServerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username to be used for authentication.
  string username_;
  static jfieldID username_fieldID;
  /// Authentication password.
  string password_;
  static jfieldID password_fieldID;
  /// True, if the server supports TURN.
  bool supports_turn_;
  static jfieldID supports_turn_fieldID;
  /// True, if the server supports STUN.
  bool supports_stun_;
  static jfieldID supports_stun_fieldID;

  /**
   * A WebRTC server.
   */
  callServerTypeWebrtc();

  /**
   * A WebRTC server.
   *
   * \param[in] username_ Username to be used for authentication.
   * \param[in] password_ Authentication password.
   * \param[in] supports_turn_ True, if the server supports TURN.
   * \param[in] supports_stun_ True, if the server supports STUN.
   */
  callServerTypeWebrtc(string const &username_, string const &password_, bool supports_turn_, bool supports_stun_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1250622821;

  static object_ptr<CallServerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class CallDiscardReason;

class callProtocol;

class callServer;

class error;

/**
 * This class is an abstract base class.
 * Describes the current call state.
 */
class CallState: public Object {
 public:
  static jclass Class;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call is pending, waiting to be accepted by a user.
 */
class callStatePending final : public CallState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the call has already been created by the server.
  bool is_created_;
  static jfieldID is_created_fieldID;
  /// True, if the call has already been received by the other party.
  bool is_received_;
  static jfieldID is_received_fieldID;

  /**
   * The call is pending, waiting to be accepted by a user.
   */
  callStatePending();

  /**
   * The call is pending, waiting to be accepted by a user.
   *
   * \param[in] is_created_ True, if the call has already been created by the server.
   * \param[in] is_received_ True, if the call has already been received by the other party.
   */
  callStatePending(bool is_created_, bool is_received_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1073048620;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call has been answered and encryption keys are being exchanged.
 */
class callStateExchangingKeys final : public CallState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call has been answered and encryption keys are being exchanged.
   */
  callStateExchangingKeys();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1848149403;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call is ready to use.
 */
class callStateReady final : public CallState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call protocols supported by the other call participant.
  object_ptr<callProtocol> protocol_;
  static jfieldID protocol_fieldID;
  /// List of available call servers.
  array<object_ptr<callServer>> servers_;
  static jfieldID servers_fieldID;
  /// A JSON-encoded call config.
  string config_;
  static jfieldID config_fieldID;
  /// Call encryption key.
  bytes encryption_key_;
  static jfieldID encryption_key_fieldID;
  /// Encryption key fingerprint represented as 4 emoji.
  array<string> emojis_;
  static jfieldID emojis_fieldID;
  /// True, if peer-to-peer connection is allowed by users privacy settings.
  bool allow_p2p_;
  static jfieldID allow_p2p_fieldID;
  /// True, if the other party supports upgrading of the call to a group call.
  bool is_group_call_supported_;
  static jfieldID is_group_call_supported_fieldID;
  /// Custom JSON-encoded call parameters to be passed to tgcalls.
  string custom_parameters_;
  static jfieldID custom_parameters_fieldID;

  /**
   * The call is ready to use.
   */
  callStateReady();

  /**
   * The call is ready to use.
   *
   * \param[in] protocol_ Call protocols supported by the other call participant.
   * \param[in] servers_ List of available call servers.
   * \param[in] config_ A JSON-encoded call config.
   * \param[in] encryption_key_ Call encryption key.
   * \param[in] emojis_ Encryption key fingerprint represented as 4 emoji.
   * \param[in] allow_p2p_ True, if peer-to-peer connection is allowed by users privacy settings.
   * \param[in] is_group_call_supported_ True, if the other party supports upgrading of the call to a group call.
   * \param[in] custom_parameters_ Custom JSON-encoded call parameters to be passed to tgcalls.
   */
  callStateReady(object_ptr<callProtocol> &&protocol_, array<object_ptr<callServer>> &&servers_, string const &config_, bytes const &encryption_key_, array<string> &&emojis_, bool allow_p2p_, bool is_group_call_supported_, string const &custom_parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -281776921;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call is hanging up after discardCall has been called.
 */
class callStateHangingUp final : public CallState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The call is hanging up after discardCall has been called.
   */
  callStateHangingUp();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2133790038;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call has ended successfully.
 */
class callStateDiscarded final : public CallState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The reason why the call has ended.
  object_ptr<CallDiscardReason> reason_;
  static jfieldID reason_fieldID;
  /// True, if the call rating must be sent to the server.
  bool need_rating_;
  static jfieldID need_rating_fieldID;
  /// True, if the call debug information must be sent to the server.
  bool need_debug_information_;
  static jfieldID need_debug_information_fieldID;
  /// True, if the call log must be sent to the server.
  bool need_log_;
  static jfieldID need_log_fieldID;

  /**
   * The call has ended successfully.
   */
  callStateDiscarded();

  /**
   * The call has ended successfully.
   *
   * \param[in] reason_ The reason why the call has ended.
   * \param[in] need_rating_ True, if the call rating must be sent to the server.
   * \param[in] need_debug_information_ True, if the call debug information must be sent to the server.
   * \param[in] need_log_ True, if the call log must be sent to the server.
   */
  callStateDiscarded(object_ptr<CallDiscardReason> &&reason_, bool need_rating_, bool need_debug_information_, bool need_log_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1394310213;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The call has ended with an error.
 */
class callStateError final : public CallState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout.
  object_ptr<error> error_;
  static jfieldID error_fieldID;

  /**
   * The call has ended with an error.
   */
  callStateError();

  /**
   * The call has ended with an error.
   *
   * \param[in] error_ Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout.
   */
  explicit callStateError(object_ptr<error> &&error_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -975215467;

  static object_ptr<CallState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a bot's answer to a callback query.
 */
class callbackQueryAnswer final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the answer.
  string text_;
  static jfieldID text_fieldID;
  /// True, if an alert must be shown to the user instead of a toast notification.
  bool show_alert_;
  static jfieldID show_alert_fieldID;
  /// URL to be opened.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Contains a bot's answer to a callback query.
   */
  callbackQueryAnswer();

  /**
   * Contains a bot's answer to a callback query.
   *
   * \param[in] text_ Text of the answer.
   * \param[in] show_alert_ True, if an alert must be shown to the user instead of a toast notification.
   * \param[in] url_ URL to be opened.
   */
  callbackQueryAnswer(string const &text_, bool show_alert_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 360867933;

  static object_ptr<callbackQueryAnswer> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents a payload of a callback query.
 */
class CallbackQueryPayload: public Object {
 public:
  static jclass Class;

  static object_ptr<CallbackQueryPayload> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payload for a general callback button.
 */
class callbackQueryPayloadData final : public CallbackQueryPayload {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Data that was attached to the callback button.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * The payload for a general callback button.
   */
  callbackQueryPayloadData();

  /**
   * The payload for a general callback button.
   *
   * \param[in] data_ Data that was attached to the callback button.
   */
  explicit callbackQueryPayloadData(bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1977729946;

  static object_ptr<CallbackQueryPayload> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payload for a callback button requiring password.
 */
class callbackQueryPayloadDataWithPassword final : public CallbackQueryPayload {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password for the current user.
  string password_;
  static jfieldID password_fieldID;
  /// Data that was attached to the callback button.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * The payload for a callback button requiring password.
   */
  callbackQueryPayloadDataWithPassword();

  /**
   * The payload for a callback button requiring password.
   *
   * \param[in] password_ The 2-step verification password for the current user.
   * \param[in] data_ Data that was attached to the callback button.
   */
  callbackQueryPayloadDataWithPassword(string const &password_, bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1340266738;

  static object_ptr<CallbackQueryPayload> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payload for a game callback button.
 */
class callbackQueryPayloadGame final : public CallbackQueryPayload {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A short name of the game that was attached to the callback button.
  string game_short_name_;
  static jfieldID game_short_name_fieldID;

  /**
   * The payload for a game callback button.
   */
  callbackQueryPayloadGame();

  /**
   * The payload for a game callback button.
   *
   * \param[in] game_short_name_ A short name of the game that was attached to the callback button.
   */
  explicit callbackQueryPayloadGame(string const &game_short_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1303571512;

  static object_ptr<CallbackQueryPayload> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents result of checking whether the current user can post a story on behalf of the specific chat.
 */
class CanPostStoryResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story can be sent.
 */
class canPostStoryResultOk final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of stories that can be posted by the user.
  int32 story_count_;
  static jfieldID story_count_fieldID;

  /**
   * A story can be sent.
   */
  canPostStoryResultOk();

  /**
   * A story can be sent.
   *
   * \param[in] story_count_ Number of stories that can be posted by the user.
   */
  explicit canPostStoryResultOk(int32 story_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2083205610;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must subscribe to Telegram Premium to be able to post stories.
 */
class canPostStoryResultPremiumNeeded final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user must subscribe to Telegram Premium to be able to post stories.
   */
  canPostStoryResultPremiumNeeded();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 935130501;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat.
 */
class canPostStoryResultBoostNeeded final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat.
   */
  canPostStoryResultBoostNeeded();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 80246195;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The limit for the number of active stories exceeded. The user can buy Telegram Premium, delete an active story, or wait for the oldest story to expire.
 */
class canPostStoryResultActiveStoryLimitExceeded final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The limit for the number of active stories exceeded. The user can buy Telegram Premium, delete an active story, or wait for the oldest story to expire.
   */
  canPostStoryResultActiveStoryLimitExceeded();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1640759002;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
 */
class canPostStoryResultWeeklyLimitExceeded final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time left before the user can post the next story, in seconds.
  int32 retry_after_;
  static jfieldID retry_after_fieldID;

  /**
   * The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
   */
  canPostStoryResultWeeklyLimitExceeded();

  /**
   * The weekly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
   *
   * \param[in] retry_after_ Time left before the user can post the next story, in seconds.
   */
  explicit canPostStoryResultWeeklyLimitExceeded(int32 retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 552858605;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
 */
class canPostStoryResultMonthlyLimitExceeded final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time left before the user can post the next story, in seconds.
  int32 retry_after_;
  static jfieldID retry_after_fieldID;

  /**
   * The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
   */
  canPostStoryResultMonthlyLimitExceeded();

  /**
   * The monthly limit for the number of posted stories exceeded. The user needs to buy Telegram Premium or wait specified time.
   *
   * \param[in] retry_after_ Time left before the user can post the next story, in seconds.
   */
  explicit canPostStoryResultMonthlyLimitExceeded(int32 retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -784208562;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user or the chat has an active live story. The live story must be deleted first.
 */
class canPostStoryResultLiveStoryIsActive final : public CanPostStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the active live story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * The user or the chat has an active live story. The live story must be deleted first.
   */
  canPostStoryResultLiveStoryIsActive();

  /**
   * The user or the chat has an active live story. The live story must be deleted first.
   *
   * \param[in] story_id_ Identifier of the active live story.
   */
  explicit canPostStoryResultLiveStoryIsActive(int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1156939675;

  static object_ptr<CanPostStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * This class is an abstract base class.
 * Describes whether a gift can be sent now by the current user.
 */
class CanSendGiftResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CanSendGiftResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift can be sent now by the current user.
 */
class canSendGiftResultOk final : public CanSendGiftResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gift can be sent now by the current user.
   */
  canSendGiftResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 641908725;

  static object_ptr<CanSendGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift can't be sent now by the current user.
 */
class canSendGiftResultFail final : public CanSendGiftResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Reason to be shown to the user.
  object_ptr<formattedText> reason_;
  static jfieldID reason_fieldID;

  /**
   * The gift can't be sent now by the current user.
   */
  canSendGiftResultFail();

  /**
   * The gift can't be sent now by the current user.
   *
   * \param[in] reason_ Reason to be shown to the user.
   */
  explicit canSendGiftResultFail(object_ptr<formattedText> &&reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1359108924;

  static object_ptr<CanSendGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes result of canSendMessageToUser.
 */
class CanSendMessageToUserResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CanSendMessageToUserResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can be messaged.
 */
class canSendMessageToUserResultOk final : public CanSendMessageToUserResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can be messaged.
   */
  canSendMessageToUserResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1530583042;

  static object_ptr<CanSendMessageToUserResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can be messaged, but the messages are paid.
 */
class canSendMessageToUserResultUserHasPaidMessages final : public CanSendMessageToUserResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that must be paid by the current user for each sent message to the user.
  int53 outgoing_paid_message_star_count_;
  static jfieldID outgoing_paid_message_star_count_fieldID;

  /**
   * The user can be messaged, but the messages are paid.
   */
  canSendMessageToUserResultUserHasPaidMessages();

  /**
   * The user can be messaged, but the messages are paid.
   *
   * \param[in] outgoing_paid_message_star_count_ Number of Telegram Stars that must be paid by the current user for each sent message to the user.
   */
  explicit canSendMessageToUserResultUserHasPaidMessages(int53 outgoing_paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1346487602;

  static object_ptr<CanSendMessageToUserResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't be messaged, because they are deleted or unknown.
 */
class canSendMessageToUserResultUserIsDeleted final : public CanSendMessageToUserResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can't be messaged, because they are deleted or unknown.
   */
  canSendMessageToUserResultUserIsDeleted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1944639903;

  static object_ptr<CanSendMessageToUserResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't be messaged, because they restrict new chats with non-contacts.
 */
class canSendMessageToUserResultUserRestrictsNewChats final : public CanSendMessageToUserResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can't be messaged, because they restrict new chats with non-contacts.
   */
  canSendMessageToUserResultUserRestrictsNewChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1929699797;

  static object_ptr<CanSendMessageToUserResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents result of checking whether the current session can be used to transfer a chat ownership to another user.
 */
class CanTransferOwnershipResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CanTransferOwnershipResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session can be used.
 */
class canTransferOwnershipResultOk final : public CanTransferOwnershipResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session can be used.
   */
  canTransferOwnershipResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -89881021;

  static object_ptr<CanTransferOwnershipResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The 2-step verification needs to be enabled first.
 */
class canTransferOwnershipResultPasswordNeeded final : public CanTransferOwnershipResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The 2-step verification needs to be enabled first.
   */
  canTransferOwnershipResultPasswordNeeded();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1548372703;

  static object_ptr<CanTransferOwnershipResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The 2-step verification was enabled recently, user needs to wait.
 */
class canTransferOwnershipResultPasswordTooFresh final : public CanTransferOwnershipResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time left before the session can be used to transfer ownership of a chat, in seconds.
  int32 retry_after_;
  static jfieldID retry_after_fieldID;

  /**
   * The 2-step verification was enabled recently, user needs to wait.
   */
  canTransferOwnershipResultPasswordTooFresh();

  /**
   * The 2-step verification was enabled recently, user needs to wait.
   *
   * \param[in] retry_after_ Time left before the session can be used to transfer ownership of a chat, in seconds.
   */
  explicit canTransferOwnershipResultPasswordTooFresh(int32 retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 811440913;

  static object_ptr<CanTransferOwnershipResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session was created recently, user needs to wait.
 */
class canTransferOwnershipResultSessionTooFresh final : public CanTransferOwnershipResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time left before the session can be used to transfer ownership of a chat, in seconds.
  int32 retry_after_;
  static jfieldID retry_after_fieldID;

  /**
   * The session was created recently, user needs to wait.
   */
  canTransferOwnershipResultSessionTooFresh();

  /**
   * The session was created recently, user needs to wait.
   *
   * \param[in] retry_after_ Time left before the session can be used to transfer ownership of a chat, in seconds.
   */
  explicit canTransferOwnershipResultSessionTooFresh(int32 retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 984664289;

  static object_ptr<CanTransferOwnershipResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BlockList;

class ChatActionBar;

class ChatAvailableReactions;

class ChatList;

class ChatTheme;

class ChatType;

class MessageSender;

class businessBotManageBar;

class chatBackground;

class chatJoinRequestsInfo;

class chatNotificationSettings;

class chatPermissions;

class chatPhotoInfo;

class chatPosition;

class draftMessage;

class emojiStatus;

class message;

class upgradedGiftColors;

class videoChat;

/**
 * A chat. (Can be a private chat, basic group, supergroup, or secret chat.)
 */
class chat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat unique identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// Type of the chat.
  object_ptr<ChatType> type_;
  static jfieldID type_fieldID;
  /// Chat title.
  string title_;
  static jfieldID title_fieldID;
  /// Chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  static jfieldID photo_fieldID;
  /// Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the reply header and link preview background for messages sent by the chat; 0 if none.
  int64 background_custom_emoji_id_;
  static jfieldID background_custom_emoji_id_fieldID;
  /// Color scheme based on an upgraded gift to be used for the chat instead of accent_color_id and background_custom_emoji_id; may be null if none.
  object_ptr<upgradedGiftColors> upgraded_gift_colors_;
  static jfieldID upgraded_gift_colors_fieldID;
  /// Identifier of the profile accent color for the chat's profile; -1 if none.
  int32 profile_accent_color_id_;
  static jfieldID profile_accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the background of the chat's profile; 0 if none.
  int64 profile_background_custom_emoji_id_;
  static jfieldID profile_background_custom_emoji_id_fieldID;
  /// Actions that non-administrator chat members are allowed to take in the chat.
  object_ptr<chatPermissions> permissions_;
  static jfieldID permissions_fieldID;
  /// Last message in the chat; may be null if none or unknown.
  object_ptr<message> last_message_;
  static jfieldID last_message_fieldID;
  /// Positions of the chat in chat lists.
  array<object_ptr<chatPosition>> positions_;
  static jfieldID positions_fieldID;
  /// Chat lists to which the chat belongs. A chat can have a non-zero position in a chat list even if it doesn't belong to the chat list and have no position in a chat list even if it belongs to the chat list.
  array<object_ptr<ChatList>> chat_lists_;
  static jfieldID chat_lists_fieldID;
  /// Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender.
  object_ptr<MessageSender> message_sender_id_;
  static jfieldID message_sender_id_fieldID;
  /// Block list to which the chat is added; may be null if none.
  object_ptr<BlockList> block_list_;
  static jfieldID block_list_fieldID;
  /// True, if chat content can't be saved locally, forwarded, or copied.
  bool has_protected_content_;
  static jfieldID has_protected_content_fieldID;
  /// True, if translation of all messages in the chat must be suggested to the user.
  bool is_translatable_;
  static jfieldID is_translatable_fieldID;
  /// True, if the chat is marked as unread.
  bool is_marked_as_unread_;
  static jfieldID is_marked_as_unread_fieldID;
  /// True, if the chat is a forum supergroup that must be shown in the &quot;View as topics&quot; mode, or Saved Messages chat that must be shown in the &quot;View as chats&quot;.
  bool view_as_topics_;
  static jfieldID view_as_topics_fieldID;
  /// True, if the chat has scheduled messages.
  bool has_scheduled_messages_;
  static jfieldID has_scheduled_messages_fieldID;
  /// True, if the chat messages can be deleted only for the current user while other users will continue to see the messages.
  bool can_be_deleted_only_for_self_;
  static jfieldID can_be_deleted_only_for_self_fieldID;
  /// True, if the chat messages can be deleted for all users.
  bool can_be_deleted_for_all_users_;
  static jfieldID can_be_deleted_for_all_users_fieldID;
  /// True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.
  bool can_be_reported_;
  static jfieldID can_be_reported_fieldID;
  /// Default value of the disable_notification parameter, used when a message is sent to the chat.
  bool default_disable_notification_;
  static jfieldID default_disable_notification_fieldID;
  /// Number of unread messages in the chat.
  int32 unread_count_;
  static jfieldID unread_count_fieldID;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  static jfieldID last_read_inbox_message_id_fieldID;
  /// Identifier of the last read outgoing message.
  int53 last_read_outbox_message_id_;
  static jfieldID last_read_outbox_message_id_fieldID;
  /// Number of unread messages with a mention/reply in the chat.
  int32 unread_mention_count_;
  static jfieldID unread_mention_count_fieldID;
  /// Number of messages with unread reactions in the chat.
  int32 unread_reaction_count_;
  static jfieldID unread_reaction_count_fieldID;
  /// Number of messages with unread poll votes in the chat.
  int32 unread_poll_vote_count_;
  static jfieldID unread_poll_vote_count_fieldID;
  /// Notification settings for the chat.
  object_ptr<chatNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;
  /// Types of reaction, available in the chat.
  object_ptr<ChatAvailableReactions> available_reactions_;
  static jfieldID available_reactions_fieldID;
  /// Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date.
  int32 message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;
  /// Emoji status to be shown along with chat title; may be null.
  object_ptr<emojiStatus> emoji_status_;
  static jfieldID emoji_status_fieldID;
  /// Background set for the chat; may be null if none.
  object_ptr<chatBackground> background_;
  static jfieldID background_fieldID;
  /// Theme set for the chat; may be null if none.
  object_ptr<ChatTheme> theme_;
  static jfieldID theme_fieldID;
  /// Information about actions which must be possible to do through the chat action bar; may be null if none.
  object_ptr<ChatActionBar> action_bar_;
  static jfieldID action_bar_fieldID;
  /// Information about bar for managing a business bot in the chat; may be null if none.
  object_ptr<businessBotManageBar> business_bot_manage_bar_;
  static jfieldID business_bot_manage_bar_fieldID;
  /// Information about video chat of the chat.
  object_ptr<videoChat> video_chat_;
  static jfieldID video_chat_fieldID;
  /// Information about pending join requests; may be null if none.
  object_ptr<chatJoinRequestsInfo> pending_join_requests_;
  static jfieldID pending_join_requests_fieldID;
  /// Identifier of the message from which reply markup needs to be used; 0 if there is no reply markup in the chat.
  int53 reply_markup_message_id_;
  static jfieldID reply_markup_message_id_fieldID;
  /// A draft of a message in the chat; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;
  /// Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used.
  string client_data_;
  static jfieldID client_data_fieldID;

  /**
   * A chat. (Can be a private chat, basic group, supergroup, or secret chat.)
   */
  chat();

  /**
   * A chat. (Can be a private chat, basic group, supergroup, or secret chat.)
   *
   * \param[in] id_ Chat unique identifier.
   * \param[in] type_ Type of the chat.
   * \param[in] title_ Chat title.
   * \param[in] photo_ Chat photo; may be null.
   * \param[in] accent_color_id_ Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview.
   * \param[in] background_custom_emoji_id_ Identifier of a custom emoji to be shown on the reply header and link preview background for messages sent by the chat; 0 if none.
   * \param[in] upgraded_gift_colors_ Color scheme based on an upgraded gift to be used for the chat instead of accent_color_id and background_custom_emoji_id; may be null if none.
   * \param[in] profile_accent_color_id_ Identifier of the profile accent color for the chat's profile; -1 if none.
   * \param[in] profile_background_custom_emoji_id_ Identifier of a custom emoji to be shown on the background of the chat's profile; 0 if none.
   * \param[in] permissions_ Actions that non-administrator chat members are allowed to take in the chat.
   * \param[in] last_message_ Last message in the chat; may be null if none or unknown.
   * \param[in] positions_ Positions of the chat in chat lists.
   * \param[in] chat_lists_ Chat lists to which the chat belongs. A chat can have a non-zero position in a chat list even if it doesn't belong to the chat list and have no position in a chat list even if it belongs to the chat list.
   * \param[in] message_sender_id_ Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender.
   * \param[in] block_list_ Block list to which the chat is added; may be null if none.
   * \param[in] has_protected_content_ True, if chat content can't be saved locally, forwarded, or copied.
   * \param[in] is_translatable_ True, if translation of all messages in the chat must be suggested to the user.
   * \param[in] is_marked_as_unread_ True, if the chat is marked as unread.
   * \param[in] view_as_topics_ True, if the chat is a forum supergroup that must be shown in the &quot;View as topics&quot; mode, or Saved Messages chat that must be shown in the &quot;View as chats&quot;.
   * \param[in] has_scheduled_messages_ True, if the chat has scheduled messages.
   * \param[in] can_be_deleted_only_for_self_ True, if the chat messages can be deleted only for the current user while other users will continue to see the messages.
   * \param[in] can_be_deleted_for_all_users_ True, if the chat messages can be deleted for all users.
   * \param[in] can_be_reported_ True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto.
   * \param[in] default_disable_notification_ Default value of the disable_notification parameter, used when a message is sent to the chat.
   * \param[in] unread_count_ Number of unread messages in the chat.
   * \param[in] last_read_inbox_message_id_ Identifier of the last read incoming message.
   * \param[in] last_read_outbox_message_id_ Identifier of the last read outgoing message.
   * \param[in] unread_mention_count_ Number of unread messages with a mention/reply in the chat.
   * \param[in] unread_reaction_count_ Number of messages with unread reactions in the chat.
   * \param[in] unread_poll_vote_count_ Number of messages with unread poll votes in the chat.
   * \param[in] notification_settings_ Notification settings for the chat.
   * \param[in] available_reactions_ Types of reaction, available in the chat.
   * \param[in] message_auto_delete_time_ Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date.
   * \param[in] emoji_status_ Emoji status to be shown along with chat title; may be null.
   * \param[in] background_ Background set for the chat; may be null if none.
   * \param[in] theme_ Theme set for the chat; may be null if none.
   * \param[in] action_bar_ Information about actions which must be possible to do through the chat action bar; may be null if none.
   * \param[in] business_bot_manage_bar_ Information about bar for managing a business bot in the chat; may be null if none.
   * \param[in] video_chat_ Information about video chat of the chat.
   * \param[in] pending_join_requests_ Information about pending join requests; may be null if none.
   * \param[in] reply_markup_message_id_ Identifier of the message from which reply markup needs to be used; 0 if there is no reply markup in the chat.
   * \param[in] draft_message_ A draft of a message in the chat; may be null if none.
   * \param[in] client_data_ Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used.
   */
  chat(int53 id_, object_ptr<ChatType> &&type_, string const &title_, object_ptr<chatPhotoInfo> &&photo_, int32 accent_color_id_, int64 background_custom_emoji_id_, object_ptr<upgradedGiftColors> &&upgraded_gift_colors_, int32 profile_accent_color_id_, int64 profile_background_custom_emoji_id_, object_ptr<chatPermissions> &&permissions_, object_ptr<message> &&last_message_, array<object_ptr<chatPosition>> &&positions_, array<object_ptr<ChatList>> &&chat_lists_, object_ptr<MessageSender> &&message_sender_id_, object_ptr<BlockList> &&block_list_, bool has_protected_content_, bool is_translatable_, bool is_marked_as_unread_, bool view_as_topics_, bool has_scheduled_messages_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_reported_, bool default_disable_notification_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, int32 unread_reaction_count_, int32 unread_poll_vote_count_, object_ptr<chatNotificationSettings> &&notification_settings_, object_ptr<ChatAvailableReactions> &&available_reactions_, int32 message_auto_delete_time_, object_ptr<emojiStatus> &&emoji_status_, object_ptr<chatBackground> &&background_, object_ptr<ChatTheme> &&theme_, object_ptr<ChatActionBar> &&action_bar_, object_ptr<businessBotManageBar> &&business_bot_manage_bar_, object_ptr<videoChat> &&video_chat_, object_ptr<chatJoinRequestsInfo> &&pending_join_requests_, int53 reply_markup_message_id_, object_ptr<draftMessage> &&draft_message_, string const &client_data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -520699983;

  static object_ptr<chat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the different types of activity in a chat.
 */
class ChatAction: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is typing a message.
 */
class chatActionTyping final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is typing a message.
   */
  chatActionTyping();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 380122167;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is recording a video.
 */
class chatActionRecordingVideo final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is recording a video.
   */
  chatActionRecordingVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 216553362;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is uploading a video.
 */
class chatActionUploadingVideo final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Upload progress, as a percentage.
  int32 progress_;
  static jfieldID progress_fieldID;

  /**
   * The user is uploading a video.
   */
  chatActionUploadingVideo();

  /**
   * The user is uploading a video.
   *
   * \param[in] progress_ Upload progress, as a percentage.
   */
  explicit chatActionUploadingVideo(int32 progress_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1234185270;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is recording a voice note.
 */
class chatActionRecordingVoiceNote final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is recording a voice note.
   */
  chatActionRecordingVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -808850058;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is uploading a voice note.
 */
class chatActionUploadingVoiceNote final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Upload progress, as a percentage.
  int32 progress_;
  static jfieldID progress_fieldID;

  /**
   * The user is uploading a voice note.
   */
  chatActionUploadingVoiceNote();

  /**
   * The user is uploading a voice note.
   *
   * \param[in] progress_ Upload progress, as a percentage.
   */
  explicit chatActionUploadingVoiceNote(int32 progress_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -613643666;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is uploading a photo.
 */
class chatActionUploadingPhoto final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Upload progress, as a percentage.
  int32 progress_;
  static jfieldID progress_fieldID;

  /**
   * The user is uploading a photo.
   */
  chatActionUploadingPhoto();

  /**
   * The user is uploading a photo.
   *
   * \param[in] progress_ Upload progress, as a percentage.
   */
  explicit chatActionUploadingPhoto(int32 progress_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 654240583;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is uploading a document.
 */
class chatActionUploadingDocument final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Upload progress, as a percentage.
  int32 progress_;
  static jfieldID progress_fieldID;

  /**
   * The user is uploading a document.
   */
  chatActionUploadingDocument();

  /**
   * The user is uploading a document.
   *
   * \param[in] progress_ Upload progress, as a percentage.
   */
  explicit chatActionUploadingDocument(int32 progress_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 167884362;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is picking a sticker to send.
 */
class chatActionChoosingSticker final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is picking a sticker to send.
   */
  chatActionChoosingSticker();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 372753697;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is picking a location or venue to send.
 */
class chatActionChoosingLocation final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is picking a location or venue to send.
   */
  chatActionChoosingLocation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2017893596;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is picking a contact to send.
 */
class chatActionChoosingContact final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is picking a contact to send.
   */
  chatActionChoosingContact();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1222507496;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user has started to play a game.
 */
class chatActionStartPlayingGame final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user has started to play a game.
   */
  chatActionStartPlayingGame();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -865884164;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is recording a video note.
 */
class chatActionRecordingVideoNote final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is recording a video note.
   */
  chatActionRecordingVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 16523393;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is uploading a video note.
 */
class chatActionUploadingVideoNote final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Upload progress, as a percentage.
  int32 progress_;
  static jfieldID progress_fieldID;

  /**
   * The user is uploading a video note.
   */
  chatActionUploadingVideoNote();

  /**
   * The user is uploading a video note.
   *
   * \param[in] progress_ Upload progress, as a percentage.
   */
  explicit chatActionUploadingVideoNote(int32 progress_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1172364918;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is watching animations sent by the other party by clicking on an animated emoji.
 */
class chatActionWatchingAnimations final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animated emoji.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * The user is watching animations sent by the other party by clicking on an animated emoji.
   */
  chatActionWatchingAnimations();

  /**
   * The user is watching animations sent by the other party by clicking on an animated emoji.
   *
   * \param[in] emoji_ The animated emoji.
   */
  explicit chatActionWatchingAnimations(string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2052990641;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user has canceled the previous action.
 */
class chatActionCancel final : public ChatAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user has canceled the previous action.
   */
  chatActionCancel();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1160523958;

  static object_ptr<ChatAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class accountInfo;

/**
 * This class is an abstract base class.
 * Describes actions which must be possible to do through a chat action bar.
 */
class ChatActionBar: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat can be reported as spam using the method reportChat with an empty option_id and message_ids. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown.
 */
class chatActionBarReportSpam final : public ChatActionBar {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings.
  bool can_unarchive_;
  static jfieldID can_unarchive_fieldID;

  /**
   * The chat can be reported as spam using the method reportChat with an empty option_id and message_ids. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown.
   */
  chatActionBarReportSpam();

  /**
   * The chat can be reported as spam using the method reportChat with an empty option_id and message_ids. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown.
   *
   * \param[in] can_unarchive_ If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings.
   */
  explicit chatActionBarReportSpam(bool can_unarchive_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1312758246;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is a recently created group chat to which new members can be invited.
 */
class chatActionBarInviteMembers final : public ChatActionBar {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat is a recently created group chat to which new members can be invited.
   */
  chatActionBarInviteMembers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1985313904;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method setMessageSenderBlockList, or the other user can be added to the contact list using the method addContact. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown.
 */
class chatActionBarReportAddBlock final : public ChatActionBar {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings.
  bool can_unarchive_;
  static jfieldID can_unarchive_fieldID;
  /// Basic information about the other user in the chat; may be null if unknown.
  object_ptr<accountInfo> account_info_;
  static jfieldID account_info_fieldID;

  /**
   * The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method setMessageSenderBlockList, or the other user can be added to the contact list using the method addContact. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown.
   */
  chatActionBarReportAddBlock();

  /**
   * The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method setMessageSenderBlockList, or the other user can be added to the contact list using the method addContact. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown.
   *
   * \param[in] can_unarchive_ If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings.
   * \param[in] account_info_ Basic information about the other user in the chat; may be null if unknown.
   */
  chatActionBarReportAddBlock(bool can_unarchive_, object_ptr<accountInfo> &&account_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1476817269;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is a private or secret chat and the other user can be added to the contact list using the method addContact.
 */
class chatActionBarAddContact final : public ChatActionBar {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat is a private or secret chat and the other user can be added to the contact list using the method addContact.
   */
  chatActionBarAddContact();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -733325295;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber.
 */
class chatActionBarSharePhoneNumber final : public ChatActionBar {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber.
   */
  chatActionBarSharePhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 35188697;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is a private chat with an administrator of a chat to which the user sent join request.
 */
class chatActionBarJoinRequest final : public ChatActionBar {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the chat to which the join request was sent.
  string title_;
  static jfieldID title_fieldID;
  /// True, if the join request was sent to a channel chat.
  bool is_channel_;
  static jfieldID is_channel_fieldID;
  /// Point in time (Unix timestamp) when the join request was sent.
  int32 request_date_;
  static jfieldID request_date_fieldID;

  /**
   * The chat is a private chat with an administrator of a chat to which the user sent join request.
   */
  chatActionBarJoinRequest();

  /**
   * The chat is a private chat with an administrator of a chat to which the user sent join request.
   *
   * \param[in] title_ Title of the chat to which the join request was sent.
   * \param[in] is_channel_ True, if the join request was sent to a channel chat.
   * \param[in] request_date_ Point in time (Unix timestamp) when the join request was sent.
   */
  chatActionBarJoinRequest(string const &title_, bool is_channel_, int32 request_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1037140744;

  static object_ptr<ChatActionBar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StoryList;

class storyInfo;

/**
 * Describes active stories posted by a chat.
 */
class chatActiveStories final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story list in which the stories are shown; may be null if the stories aren't shown in a story list.
  object_ptr<StoryList> list_;
  static jfieldID list_fieldID;
  /// A parameter used to determine order of the stories in the story list; 0 if the stories don't need to be shown in the story list. Stories must be sorted by the pair (order, story_poster_chat_id) in descending order.
  int53 order_;
  static jfieldID order_fieldID;
  /// True, if the stories are shown in the main story list and can be archived; otherwise, the stories can be hidden from the main story list only by calling removeTopChat with topChatCategoryUsers and the chat_id. Stories of the current user can't be archived nor hidden using removeTopChat.
  bool can_be_archived_;
  static jfieldID can_be_archived_fieldID;
  /// Identifier of the last read active story.
  int32 max_read_story_id_;
  static jfieldID max_read_story_id_fieldID;
  /// Basic information about the stories; use getStory to get full information about the stories. The stories are in chronological order (i.e., in order of increasing story identifiers).
  array<object_ptr<storyInfo>> stories_;
  static jfieldID stories_fieldID;

  /**
   * Describes active stories posted by a chat.
   */
  chatActiveStories();

  /**
   * Describes active stories posted by a chat.
   *
   * \param[in] chat_id_ Identifier of the chat that posted the stories.
   * \param[in] list_ Identifier of the story list in which the stories are shown; may be null if the stories aren't shown in a story list.
   * \param[in] order_ A parameter used to determine order of the stories in the story list; 0 if the stories don't need to be shown in the story list. Stories must be sorted by the pair (order, story_poster_chat_id) in descending order.
   * \param[in] can_be_archived_ True, if the stories are shown in the main story list and can be archived; otherwise, the stories can be hidden from the main story list only by calling removeTopChat with topChatCategoryUsers and the chat_id. Stories of the current user can't be archived nor hidden using removeTopChat.
   * \param[in] max_read_story_id_ Identifier of the last read active story.
   * \param[in] stories_ Basic information about the stories; use getStory to get full information about the stories. The stories are in chronological order (i.e., in order of increasing story identifiers).
   */
  chatActiveStories(int53 chat_id_, object_ptr<StoryList> &&list_, int53 order_, bool can_be_archived_, int32 max_read_story_id_, array<object_ptr<storyInfo>> &&stories_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 396502772;

  static object_ptr<chatActiveStories> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a chat administrator.
 */
class chatAdministrator final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the administrator.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Custom title of the administrator.
  string custom_title_;
  static jfieldID custom_title_fieldID;
  /// True, if the user is the owner of the chat.
  bool is_owner_;
  static jfieldID is_owner_fieldID;
  /// True, if the current user can edit the administrator privileges for the administrator.
  bool can_be_edited_;
  static jfieldID can_be_edited_fieldID;

  /**
   * Contains information about a chat administrator.
   */
  chatAdministrator();

  /**
   * Contains information about a chat administrator.
   *
   * \param[in] user_id_ User identifier of the administrator.
   * \param[in] custom_title_ Custom title of the administrator.
   * \param[in] is_owner_ True, if the user is the owner of the chat.
   * \param[in] can_be_edited_ True, if the current user can edit the administrator privileges for the administrator.
   */
  chatAdministrator(int53 user_id_, string const &custom_title_, bool is_owner_, bool can_be_edited_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 436066785;

  static object_ptr<chatAdministrator> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes rights of the administrator.
 */
class chatAdministratorRights final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other privilege; applicable to supergroups and channels only.
  bool can_manage_chat_;
  static jfieldID can_manage_chat_fieldID;
  /// True, if the administrator can change the chat title, photo, and other settings.
  bool can_change_info_;
  static jfieldID can_change_info_fieldID;
  /// True, if the administrator can create channel posts, approve suggested channel posts, or view channel statistics; applicable to channels only.
  bool can_post_messages_;
  static jfieldID can_post_messages_fieldID;
  /// True, if the administrator can edit messages of other users and pin messages; applicable to channels only.
  bool can_edit_messages_;
  static jfieldID can_edit_messages_fieldID;
  /// True, if the administrator can delete messages of other users.
  bool can_delete_messages_;
  static jfieldID can_delete_messages_fieldID;
  /// True, if the administrator can invite new users to the chat.
  bool can_invite_users_;
  static jfieldID can_invite_users_fieldID;
  /// True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics.
  bool can_restrict_members_;
  static jfieldID can_restrict_members_fieldID;
  /// True, if the administrator can pin messages; applicable to basic groups and supergroups only.
  bool can_pin_messages_;
  static jfieldID can_pin_messages_fieldID;
  /// True, if the administrator can create, rename, close, reopen, hide, and unhide forum topics; applicable to forum supergroups only.
  bool can_manage_topics_;
  static jfieldID can_manage_topics_fieldID;
  /// True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them.
  bool can_promote_members_;
  static jfieldID can_promote_members_fieldID;
  /// True, if the administrator can manage video chats.
  bool can_manage_video_chats_;
  static jfieldID can_manage_video_chats_fieldID;
  /// True, if the administrator can create new chat stories, or edit and delete posted stories; applicable to supergroups and channels only.
  bool can_post_stories_;
  static jfieldID can_post_stories_fieldID;
  /// True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access story archive; applicable to supergroups and channels only.
  bool can_edit_stories_;
  static jfieldID can_edit_stories_fieldID;
  /// True, if the administrator can delete stories posted by other users; applicable to supergroups and channels only.
  bool can_delete_stories_;
  static jfieldID can_delete_stories_fieldID;
  /// True, if the administrator can answer to channel direct messages; applicable to channels only.
  bool can_manage_direct_messages_;
  static jfieldID can_manage_direct_messages_fieldID;
  /// True, if the administrator can change tags of other users; applicable to basic groups and supergroups only.
  bool can_manage_tags_;
  static jfieldID can_manage_tags_fieldID;
  /// True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only.
  bool is_anonymous_;
  static jfieldID is_anonymous_fieldID;

  /**
   * Describes rights of the administrator.
   */
  chatAdministratorRights();

  /**
   * Describes rights of the administrator.
   *
   * \param[in] can_manage_chat_ True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other privilege; applicable to supergroups and channels only.
   * \param[in] can_change_info_ True, if the administrator can change the chat title, photo, and other settings.
   * \param[in] can_post_messages_ True, if the administrator can create channel posts, approve suggested channel posts, or view channel statistics; applicable to channels only.
   * \param[in] can_edit_messages_ True, if the administrator can edit messages of other users and pin messages; applicable to channels only.
   * \param[in] can_delete_messages_ True, if the administrator can delete messages of other users.
   * \param[in] can_invite_users_ True, if the administrator can invite new users to the chat.
   * \param[in] can_restrict_members_ True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics.
   * \param[in] can_pin_messages_ True, if the administrator can pin messages; applicable to basic groups and supergroups only.
   * \param[in] can_manage_topics_ True, if the administrator can create, rename, close, reopen, hide, and unhide forum topics; applicable to forum supergroups only.
   * \param[in] can_promote_members_ True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them.
   * \param[in] can_manage_video_chats_ True, if the administrator can manage video chats.
   * \param[in] can_post_stories_ True, if the administrator can create new chat stories, or edit and delete posted stories; applicable to supergroups and channels only.
   * \param[in] can_edit_stories_ True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access story archive; applicable to supergroups and channels only.
   * \param[in] can_delete_stories_ True, if the administrator can delete stories posted by other users; applicable to supergroups and channels only.
   * \param[in] can_manage_direct_messages_ True, if the administrator can answer to channel direct messages; applicable to channels only.
   * \param[in] can_manage_tags_ True, if the administrator can change tags of other users; applicable to basic groups and supergroups only.
   * \param[in] is_anonymous_ True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only.
   */
  chatAdministratorRights(bool can_manage_chat_, bool can_change_info_, bool can_post_messages_, bool can_edit_messages_, bool can_delete_messages_, bool can_invite_users_, bool can_restrict_members_, bool can_pin_messages_, bool can_manage_topics_, bool can_promote_members_, bool can_manage_video_chats_, bool can_post_stories_, bool can_edit_stories_, bool can_delete_stories_, bool can_manage_direct_messages_, bool can_manage_tags_, bool is_anonymous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1562741834;

  static object_ptr<chatAdministratorRights> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatAdministrator;

/**
 * Represents a list of chat administrators.
 */
class chatAdministrators final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of chat administrators.
  array<object_ptr<chatAdministrator>> administrators_;
  static jfieldID administrators_fieldID;

  /**
   * Represents a list of chat administrators.
   */
  chatAdministrators();

  /**
   * Represents a list of chat administrators.
   *
   * \param[in] administrators_ A list of chat administrators.
   */
  explicit chatAdministrators(array<object_ptr<chatAdministrator>> &&administrators_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2126186435;

  static object_ptr<chatAdministrators> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

/**
 * This class is an abstract base class.
 * Describes reactions available in the chat.
 */
class ChatAvailableReactions: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatAvailableReactions> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * All reactions are available in the chat, excluding the paid reaction and custom reactions in channel chats.
 */
class chatAvailableReactionsAll final : public ChatAvailableReactions {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum allowed number of reactions per message; 1-11.
  int32 max_reaction_count_;
  static jfieldID max_reaction_count_fieldID;

  /**
   * All reactions are available in the chat, excluding the paid reaction and custom reactions in channel chats.
   */
  chatAvailableReactionsAll();

  /**
   * All reactions are available in the chat, excluding the paid reaction and custom reactions in channel chats.
   *
   * \param[in] max_reaction_count_ The maximum allowed number of reactions per message; 1-11.
   */
  explicit chatAvailableReactionsAll(int32 max_reaction_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 694160279;

  static object_ptr<ChatAvailableReactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Only specific reactions are available in the chat.
 */
class chatAvailableReactionsSome final : public ChatAvailableReactions {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of reactions.
  array<object_ptr<ReactionType>> reactions_;
  static jfieldID reactions_fieldID;
  /// The maximum allowed number of reactions per message; 1-11.
  int32 max_reaction_count_;
  static jfieldID max_reaction_count_fieldID;

  /**
   * Only specific reactions are available in the chat.
   */
  chatAvailableReactionsSome();

  /**
   * Only specific reactions are available in the chat.
   *
   * \param[in] reactions_ The list of reactions.
   * \param[in] max_reaction_count_ The maximum allowed number of reactions per message; 1-11.
   */
  chatAvailableReactionsSome(array<object_ptr<ReactionType>> &&reactions_, int32 max_reaction_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 152513153;

  static object_ptr<ChatAvailableReactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class background;

/**
 * Describes a background set for a specific chat.
 */
class chatBackground final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The background.
  object_ptr<background> background_;
  static jfieldID background_fieldID;
  /// Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background.
  int32 dark_theme_dimming_;
  static jfieldID dark_theme_dimming_fieldID;

  /**
   * Describes a background set for a specific chat.
   */
  chatBackground();

  /**
   * Describes a background set for a specific chat.
   *
   * \param[in] background_ The background.
   * \param[in] dark_theme_dimming_ Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background.
   */
  chatBackground(object_ptr<background> &&background_, int32 dark_theme_dimming_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1653152104;

  static object_ptr<chatBackground> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatBoostSource;

/**
 * Describes a boost applied to a chat.
 */
class chatBoost final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the boost.
  string id_;
  static jfieldID id_fieldID;
  /// The number of identical boosts applied.
  int32 count_;
  static jfieldID count_fieldID;
  /// Source of the boost.
  object_ptr<ChatBoostSource> source_;
  static jfieldID source_fieldID;
  /// Point in time (Unix timestamp) when the chat was boosted.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) when the boost will expire.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;

  /**
   * Describes a boost applied to a chat.
   */
  chatBoost();

  /**
   * Describes a boost applied to a chat.
   *
   * \param[in] id_ Unique identifier of the boost.
   * \param[in] count_ The number of identical boosts applied.
   * \param[in] source_ Source of the boost.
   * \param[in] start_date_ Point in time (Unix timestamp) when the chat was boosted.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the boost will expire.
   */
  chatBoost(string const &id_, int32 count_, object_ptr<ChatBoostSource> &&source_, int32 start_date_, int32 expiration_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1765815118;

  static object_ptr<chatBoost> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostLevelFeatures;

/**
 * Contains a list of features available on the first chat boost levels.
 */
class chatBoostFeatures final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of features.
  array<object_ptr<chatBoostLevelFeatures>> features_;
  static jfieldID features_fieldID;
  /// The minimum boost level required to set custom emoji for profile background.
  int32 min_profile_background_custom_emoji_boost_level_;
  static jfieldID min_profile_background_custom_emoji_boost_level_fieldID;
  /// The minimum boost level required to set custom emoji for reply header and link preview background; for channel chats only.
  int32 min_background_custom_emoji_boost_level_;
  static jfieldID min_background_custom_emoji_boost_level_fieldID;
  /// The minimum boost level required to set emoji status.
  int32 min_emoji_status_boost_level_;
  static jfieldID min_emoji_status_boost_level_fieldID;
  /// The minimum boost level required to set a chat theme background as chat background.
  int32 min_chat_theme_background_boost_level_;
  static jfieldID min_chat_theme_background_boost_level_fieldID;
  /// The minimum boost level required to set custom chat background.
  int32 min_custom_background_boost_level_;
  static jfieldID min_custom_background_boost_level_fieldID;
  /// The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only.
  int32 min_custom_emoji_sticker_set_boost_level_;
  static jfieldID min_custom_emoji_sticker_set_boost_level_fieldID;
  /// The minimum boost level allowing to enable automatic translation of messages for non-Premium users; for channel chats only.
  int32 min_automatic_translation_boost_level_;
  static jfieldID min_automatic_translation_boost_level_fieldID;
  /// The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only.
  int32 min_speech_recognition_boost_level_;
  static jfieldID min_speech_recognition_boost_level_fieldID;
  /// The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only.
  int32 min_sponsored_message_disable_boost_level_;
  static jfieldID min_sponsored_message_disable_boost_level_fieldID;

  /**
   * Contains a list of features available on the first chat boost levels.
   */
  chatBoostFeatures();

  /**
   * Contains a list of features available on the first chat boost levels.
   *
   * \param[in] features_ The list of features.
   * \param[in] min_profile_background_custom_emoji_boost_level_ The minimum boost level required to set custom emoji for profile background.
   * \param[in] min_background_custom_emoji_boost_level_ The minimum boost level required to set custom emoji for reply header and link preview background; for channel chats only.
   * \param[in] min_emoji_status_boost_level_ The minimum boost level required to set emoji status.
   * \param[in] min_chat_theme_background_boost_level_ The minimum boost level required to set a chat theme background as chat background.
   * \param[in] min_custom_background_boost_level_ The minimum boost level required to set custom chat background.
   * \param[in] min_custom_emoji_sticker_set_boost_level_ The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only.
   * \param[in] min_automatic_translation_boost_level_ The minimum boost level allowing to enable automatic translation of messages for non-Premium users; for channel chats only.
   * \param[in] min_speech_recognition_boost_level_ The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only.
   * \param[in] min_sponsored_message_disable_boost_level_ The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only.
   */
  chatBoostFeatures(array<object_ptr<chatBoostLevelFeatures>> &&features_, int32 min_profile_background_custom_emoji_boost_level_, int32 min_background_custom_emoji_boost_level_, int32 min_emoji_status_boost_level_, int32 min_chat_theme_background_boost_level_, int32 min_custom_background_boost_level_, int32 min_custom_emoji_sticker_set_boost_level_, int32 min_automatic_translation_boost_level_, int32 min_speech_recognition_boost_level_, int32 min_sponsored_message_disable_boost_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -940531367;

  static object_ptr<chatBoostFeatures> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a list of features available on a specific chat boost level.
 */
class chatBoostLevelFeatures final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Target chat boost level.
  int32 level_;
  static jfieldID level_fieldID;
  /// Number of stories that the chat can publish daily.
  int32 story_per_day_count_;
  static jfieldID story_per_day_count_fieldID;
  /// Number of custom emoji reactions that can be added to the list of available reactions.
  int32 custom_emoji_reaction_count_;
  static jfieldID custom_emoji_reaction_count_fieldID;
  /// Number of custom colors for chat title.
  int32 title_color_count_;
  static jfieldID title_color_count_fieldID;
  /// Number of custom colors for profile photo background.
  int32 profile_accent_color_count_;
  static jfieldID profile_accent_color_count_fieldID;
  /// True, if custom emoji for profile background can be set.
  bool can_set_profile_background_custom_emoji_;
  static jfieldID can_set_profile_background_custom_emoji_fieldID;
  /// Number of custom colors for background of empty chat photo, replies to messages and link previews.
  int32 accent_color_count_;
  static jfieldID accent_color_count_fieldID;
  /// True, if custom emoji for reply header and link preview background can be set.
  bool can_set_background_custom_emoji_;
  static jfieldID can_set_background_custom_emoji_fieldID;
  /// True, if emoji status can be set.
  bool can_set_emoji_status_;
  static jfieldID can_set_emoji_status_fieldID;
  /// Number of chat theme backgrounds that can be set as chat background.
  int32 chat_theme_background_count_;
  static jfieldID chat_theme_background_count_fieldID;
  /// True, if custom background can be set in the chat for all users.
  bool can_set_custom_background_;
  static jfieldID can_set_custom_background_fieldID;
  /// True, if custom emoji sticker set can be set for the chat.
  bool can_set_custom_emoji_sticker_set_;
  static jfieldID can_set_custom_emoji_sticker_set_fieldID;
  /// True, if automatic translation of messages can be enabled in the chat.
  bool can_enable_automatic_translation_;
  static jfieldID can_enable_automatic_translation_fieldID;
  /// True, if speech recognition can be used for video note and voice note messages by all users.
  bool can_recognize_speech_;
  static jfieldID can_recognize_speech_fieldID;
  /// True, if sponsored messages can be disabled in the chat.
  bool can_disable_sponsored_messages_;
  static jfieldID can_disable_sponsored_messages_fieldID;

  /**
   * Contains a list of features available on a specific chat boost level.
   */
  chatBoostLevelFeatures();

  /**
   * Contains a list of features available on a specific chat boost level.
   *
   * \param[in] level_ Target chat boost level.
   * \param[in] story_per_day_count_ Number of stories that the chat can publish daily.
   * \param[in] custom_emoji_reaction_count_ Number of custom emoji reactions that can be added to the list of available reactions.
   * \param[in] title_color_count_ Number of custom colors for chat title.
   * \param[in] profile_accent_color_count_ Number of custom colors for profile photo background.
   * \param[in] can_set_profile_background_custom_emoji_ True, if custom emoji for profile background can be set.
   * \param[in] accent_color_count_ Number of custom colors for background of empty chat photo, replies to messages and link previews.
   * \param[in] can_set_background_custom_emoji_ True, if custom emoji for reply header and link preview background can be set.
   * \param[in] can_set_emoji_status_ True, if emoji status can be set.
   * \param[in] chat_theme_background_count_ Number of chat theme backgrounds that can be set as chat background.
   * \param[in] can_set_custom_background_ True, if custom background can be set in the chat for all users.
   * \param[in] can_set_custom_emoji_sticker_set_ True, if custom emoji sticker set can be set for the chat.
   * \param[in] can_enable_automatic_translation_ True, if automatic translation of messages can be enabled in the chat.
   * \param[in] can_recognize_speech_ True, if speech recognition can be used for video note and voice note messages by all users.
   * \param[in] can_disable_sponsored_messages_ True, if sponsored messages can be disabled in the chat.
   */
  chatBoostLevelFeatures(int32 level_, int32 story_per_day_count_, int32 custom_emoji_reaction_count_, int32 title_color_count_, int32 profile_accent_color_count_, bool can_set_profile_background_custom_emoji_, int32 accent_color_count_, bool can_set_background_custom_emoji_, bool can_set_emoji_status_, int32 chat_theme_background_count_, bool can_set_custom_background_, bool can_set_custom_emoji_sticker_set_, bool can_enable_automatic_translation_, bool can_recognize_speech_, bool can_disable_sponsored_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 975439470;

  static object_ptr<chatBoostLevelFeatures> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains an HTTPS link to boost a chat.
 */
class chatBoostLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link.
  string link_;
  static jfieldID link_fieldID;
  /// True, if the link will work for non-members of the chat.
  bool is_public_;
  static jfieldID is_public_fieldID;

  /**
   * Contains an HTTPS link to boost a chat.
   */
  chatBoostLink();

  /**
   * Contains an HTTPS link to boost a chat.
   *
   * \param[in] link_ The link.
   * \param[in] is_public_ True, if the link will work for non-members of the chat.
   */
  chatBoostLink(string const &link_, bool is_public_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1253999503;

  static object_ptr<chatBoostLink> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a link to boost a chat.
 */
class chatBoostLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the link will work for non-members of the chat.
  bool is_public_;
  static jfieldID is_public_fieldID;
  /// Identifier of the chat to which the link points; 0 if the chat isn't found.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Contains information about a link to boost a chat.
   */
  chatBoostLinkInfo();

  /**
   * Contains information about a link to boost a chat.
   *
   * \param[in] is_public_ True, if the link will work for non-members of the chat.
   * \param[in] chat_id_ Identifier of the chat to which the link points; 0 if the chat isn't found.
   */
  chatBoostLinkInfo(bool is_public_, int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -602785660;

  static object_ptr<chatBoostLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a slot for chat boost.
 */
class chatBoostSlot final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the slot.
  int32 slot_id_;
  static jfieldID slot_id_fieldID;
  /// Identifier of the currently boosted chat; 0 if none.
  int53 currently_boosted_chat_id_;
  static jfieldID currently_boosted_chat_id_fieldID;
  /// Point in time (Unix timestamp) when the chat was boosted; 0 if none.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) when the boost will expire.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// Point in time (Unix timestamp) after which the boost can be used for another chat.
  int32 cooldown_until_date_;
  static jfieldID cooldown_until_date_fieldID;

  /**
   * Describes a slot for chat boost.
   */
  chatBoostSlot();

  /**
   * Describes a slot for chat boost.
   *
   * \param[in] slot_id_ Unique identifier of the slot.
   * \param[in] currently_boosted_chat_id_ Identifier of the currently boosted chat; 0 if none.
   * \param[in] start_date_ Point in time (Unix timestamp) when the chat was boosted; 0 if none.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the boost will expire.
   * \param[in] cooldown_until_date_ Point in time (Unix timestamp) after which the boost can be used for another chat.
   */
  chatBoostSlot(int32 slot_id_, int53 currently_boosted_chat_id_, int32 start_date_, int32 expiration_date_, int32 cooldown_until_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 123206343;

  static object_ptr<chatBoostSlot> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostSlot;

/**
 * Contains a list of chat boost slots.
 */
class chatBoostSlots final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of boost slots.
  array<object_ptr<chatBoostSlot>> slots_;
  static jfieldID slots_fieldID;

  /**
   * Contains a list of chat boost slots.
   */
  chatBoostSlots();

  /**
   * Contains a list of chat boost slots.
   *
   * \param[in] slots_ List of boost slots.
   */
  explicit chatBoostSlots(array<object_ptr<chatBoostSlot>> &&slots_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1014966293;

  static object_ptr<chatBoostSlots> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes source of a chat boost.
 */
class ChatBoostSource: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatBoostSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat created a Telegram Premium gift code for a user.
 */
class chatBoostSourceGiftCode final : public ChatBoostSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a user, for which the gift code was created.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The created Telegram Premium gift code, which is known only if this is a gift code for the current user, or it has already been claimed.
  string gift_code_;
  static jfieldID gift_code_fieldID;

  /**
   * The chat created a Telegram Premium gift code for a user.
   */
  chatBoostSourceGiftCode();

  /**
   * The chat created a Telegram Premium gift code for a user.
   *
   * \param[in] user_id_ Identifier of a user, for which the gift code was created.
   * \param[in] gift_code_ The created Telegram Premium gift code, which is known only if this is a gift code for the current user, or it has already been claimed.
   */
  chatBoostSourceGiftCode(int53 user_id_, string const &gift_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -98299206;

  static object_ptr<ChatBoostSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat created a giveaway.
 */
class chatBoostSourceGiveaway final : public ChatBoostSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a user who won in the giveaway; 0 if none.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveways only.
  string gift_code_;
  static jfieldID gift_code_fieldID;
  /// Number of Telegram Stars distributed among winners of the giveaway.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the corresponding giveaway message; can be an identifier of a deleted message.
  int53 giveaway_message_id_;
  static jfieldID giveaway_message_id_fieldID;
  /// True, if the winner for the corresponding giveaway prize wasn't chosen, because there were not enough participants.
  bool is_unclaimed_;
  static jfieldID is_unclaimed_fieldID;

  /**
   * The chat created a giveaway.
   */
  chatBoostSourceGiveaway();

  /**
   * The chat created a giveaway.
   *
   * \param[in] user_id_ Identifier of a user who won in the giveaway; 0 if none.
   * \param[in] gift_code_ The created Telegram Premium gift code if it was used by the user or can be claimed by the current user; an empty string otherwise; for Telegram Premium giveways only.
   * \param[in] star_count_ Number of Telegram Stars distributed among winners of the giveaway.
   * \param[in] giveaway_message_id_ Identifier of the corresponding giveaway message; can be an identifier of a deleted message.
   * \param[in] is_unclaimed_ True, if the winner for the corresponding giveaway prize wasn't chosen, because there were not enough participants.
   */
  chatBoostSourceGiveaway(int53 user_id_, string const &gift_code_, int53 star_count_, int53 giveaway_message_id_, bool is_unclaimed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1918145690;

  static object_ptr<ChatBoostSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user with Telegram Premium subscription or gifted Telegram Premium boosted the chat.
 */
class chatBoostSourcePremium final : public ChatBoostSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A user with Telegram Premium subscription or gifted Telegram Premium boosted the chat.
   */
  chatBoostSourcePremium();

  /**
   * A user with Telegram Premium subscription or gifted Telegram Premium boosted the chat.
   *
   * \param[in] user_id_ Identifier of the user.
   */
  explicit chatBoostSourcePremium(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 972011;

  static object_ptr<ChatBoostSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class prepaidGiveaway;

/**
 * Describes current boost status of a chat.
 */
class chatBoostStatus final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An HTTP URL, which can be used to boost the chat.
  string boost_url_;
  static jfieldID boost_url_fieldID;
  /// Identifiers of boost slots of the current user applied to the chat.
  array<int32> applied_slot_ids_;
  static jfieldID applied_slot_ids_fieldID;
  /// Current boost level of the chat.
  int32 level_;
  static jfieldID level_fieldID;
  /// The number of boosts received by the chat from created Telegram Premium gift codes and giveaways; always 0 if the current user isn't an administrator in the chat.
  int32 gift_code_boost_count_;
  static jfieldID gift_code_boost_count_fieldID;
  /// The number of boosts received by the chat.
  int32 boost_count_;
  static jfieldID boost_count_fieldID;
  /// The number of boosts added to reach the current level.
  int32 current_level_boost_count_;
  static jfieldID current_level_boost_count_fieldID;
  /// The number of boosts needed to reach the next level; 0 if the next level isn't available.
  int32 next_level_boost_count_;
  static jfieldID next_level_boost_count_fieldID;
  /// Approximate number of Telegram Premium subscribers joined the chat; always 0 if the current user isn't an administrator in the chat.
  int32 premium_member_count_;
  static jfieldID premium_member_count_fieldID;
  /// A percentage of Telegram Premium subscribers joined the chat; always 0 if the current user isn't an administrator in the chat.
  double premium_member_percentage_;
  static jfieldID premium_member_percentage_fieldID;
  /// The list of prepaid giveaways available for the chat; only for chat administrators.
  array<object_ptr<prepaidGiveaway>> prepaid_giveaways_;
  static jfieldID prepaid_giveaways_fieldID;

  /**
   * Describes current boost status of a chat.
   */
  chatBoostStatus();

  /**
   * Describes current boost status of a chat.
   *
   * \param[in] boost_url_ An HTTP URL, which can be used to boost the chat.
   * \param[in] applied_slot_ids_ Identifiers of boost slots of the current user applied to the chat.
   * \param[in] level_ Current boost level of the chat.
   * \param[in] gift_code_boost_count_ The number of boosts received by the chat from created Telegram Premium gift codes and giveaways; always 0 if the current user isn't an administrator in the chat.
   * \param[in] boost_count_ The number of boosts received by the chat.
   * \param[in] current_level_boost_count_ The number of boosts added to reach the current level.
   * \param[in] next_level_boost_count_ The number of boosts needed to reach the next level; 0 if the next level isn't available.
   * \param[in] premium_member_count_ Approximate number of Telegram Premium subscribers joined the chat; always 0 if the current user isn't an administrator in the chat.
   * \param[in] premium_member_percentage_ A percentage of Telegram Premium subscribers joined the chat; always 0 if the current user isn't an administrator in the chat.
   * \param[in] prepaid_giveaways_ The list of prepaid giveaways available for the chat; only for chat administrators.
   */
  chatBoostStatus(string const &boost_url_, array<int32> &&applied_slot_ids_, int32 level_, int32 gift_code_boost_count_, int32 boost_count_, int32 current_level_boost_count_, int32 next_level_boost_count_, int32 premium_member_count_, double premium_member_percentage_, array<object_ptr<prepaidGiveaway>> &&prepaid_giveaways_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1050332618;

  static object_ptr<chatBoostStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatEventAction;

class MessageSender;

/**
 * Represents a chat event.
 */
class chatEvent final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat event identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Point in time (Unix timestamp) when the event happened.
  int32 date_;
  static jfieldID date_fieldID;
  /// Identifier of the user or chat who performed the action.
  object_ptr<MessageSender> member_id_;
  static jfieldID member_id_fieldID;
  /// The action.
  object_ptr<ChatEventAction> action_;
  static jfieldID action_fieldID;

  /**
   * Represents a chat event.
   */
  chatEvent();

  /**
   * Represents a chat event.
   *
   * \param[in] id_ Chat event identifier.
   * \param[in] date_ Point in time (Unix timestamp) when the event happened.
   * \param[in] member_id_ Identifier of the user or chat who performed the action.
   * \param[in] action_ The action.
   */
  chatEvent(int64 id_, int32 date_, object_ptr<MessageSender> &&member_id_, object_ptr<ChatEventAction> &&action_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -652102704;

  static object_ptr<chatEvent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatAvailableReactions;

class ChatMemberStatus;

class MessageSender;

class chatBackground;

class chatInviteLink;

class chatLocation;

class chatPermissions;

class chatPhoto;

class emojiStatus;

class forumTopicInfo;

class message;

/**
 * This class is an abstract base class.
 * Represents a chat event.
 */
class ChatEventAction: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message was edited.
 */
class chatEventMessageEdited final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The original message before the edit.
  object_ptr<message> old_message_;
  static jfieldID old_message_fieldID;
  /// The message after it was edited.
  object_ptr<message> new_message_;
  static jfieldID new_message_fieldID;

  /**
   * A message was edited.
   */
  chatEventMessageEdited();

  /**
   * A message was edited.
   *
   * \param[in] old_message_ The original message before the edit.
   * \param[in] new_message_ The message after it was edited.
   */
  chatEventMessageEdited(object_ptr<message> &&old_message_, object_ptr<message> &&new_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -430967304;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message was deleted.
 */
class chatEventMessageDeleted final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Deleted message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// True, if the message deletion can be reported via reportSupergroupAntiSpamFalsePositive.
  bool can_report_anti_spam_false_positive_;
  static jfieldID can_report_anti_spam_false_positive_fieldID;

  /**
   * A message was deleted.
   */
  chatEventMessageDeleted();

  /**
   * A message was deleted.
   *
   * \param[in] message_ Deleted message.
   * \param[in] can_report_anti_spam_false_positive_ True, if the message deletion can be reported via reportSupergroupAntiSpamFalsePositive.
   */
  chatEventMessageDeleted(object_ptr<message> &&message_, bool can_report_anti_spam_false_positive_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 935316851;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message was pinned.
 */
class chatEventMessagePinned final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pinned message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * A message was pinned.
   */
  chatEventMessagePinned();

  /**
   * A message was pinned.
   *
   * \param[in] message_ Pinned message.
   */
  explicit chatEventMessagePinned(object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 438742298;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message was unpinned.
 */
class chatEventMessageUnpinned final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unpinned message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * A message was unpinned.
   */
  chatEventMessageUnpinned();

  /**
   * A message was unpinned.
   *
   * \param[in] message_ Unpinned message.
   */
  explicit chatEventMessageUnpinned(object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -376161513;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A poll in a message was stopped.
 */
class chatEventPollStopped final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message with the poll.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * A poll in a message was stopped.
   */
  chatEventPollStopped();

  /**
   * A poll in a message was stopped.
   *
   * \param[in] message_ The message with the poll.
   */
  explicit chatEventPollStopped(object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2009893861;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member joined the chat.
 */
class chatEventMemberJoined final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A new member joined the chat.
   */
  chatEventMemberJoined();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -235468508;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member joined the chat via an invite link.
 */
class chatEventMemberJoinedByInviteLink final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link used to join the chat.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;
  /// True, if the user has joined the chat using an invite link for a chat folder.
  bool via_chat_folder_invite_link_;
  static jfieldID via_chat_folder_invite_link_fieldID;

  /**
   * A new member joined the chat via an invite link.
   */
  chatEventMemberJoinedByInviteLink();

  /**
   * A new member joined the chat via an invite link.
   *
   * \param[in] invite_link_ Invite link used to join the chat.
   * \param[in] via_chat_folder_invite_link_ True, if the user has joined the chat using an invite link for a chat folder.
   */
  chatEventMemberJoinedByInviteLink(object_ptr<chatInviteLink> &&invite_link_, bool via_chat_folder_invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1445536390;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member was accepted to the chat by an administrator.
 */
class chatEventMemberJoinedByRequest final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the chat administrator, approved user join request.
  int53 approver_user_id_;
  static jfieldID approver_user_id_fieldID;
  /// Invite link used to join the chat; may be null.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * A new member was accepted to the chat by an administrator.
   */
  chatEventMemberJoinedByRequest();

  /**
   * A new member was accepted to the chat by an administrator.
   *
   * \param[in] approver_user_id_ User identifier of the chat administrator, approved user join request.
   * \param[in] invite_link_ Invite link used to join the chat; may be null.
   */
  chatEventMemberJoinedByRequest(int53 approver_user_id_, object_ptr<chatInviteLink> &&invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1647804865;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new chat member was invited.
 */
class chatEventMemberInvited final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New member user identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// New member status.
  object_ptr<ChatMemberStatus> status_;
  static jfieldID status_fieldID;

  /**
   * A new chat member was invited.
   */
  chatEventMemberInvited();

  /**
   * A new chat member was invited.
   *
   * \param[in] user_id_ New member user identifier.
   * \param[in] status_ New member status.
   */
  chatEventMemberInvited(int53 user_id_, object_ptr<ChatMemberStatus> &&status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 953663433;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A member left the chat.
 */
class chatEventMemberLeft final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A member left the chat.
   */
  chatEventMemberLeft();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -948420593;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat member has gained/lost administrator status, or the list of their administrator privileges has changed.
 */
class chatEventMemberPromoted final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Affected chat member user identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Previous status of the chat member.
  object_ptr<ChatMemberStatus> old_status_;
  static jfieldID old_status_fieldID;
  /// New status of the chat member.
  object_ptr<ChatMemberStatus> new_status_;
  static jfieldID new_status_fieldID;

  /**
   * A chat member has gained/lost administrator status, or the list of their administrator privileges has changed.
   */
  chatEventMemberPromoted();

  /**
   * A chat member has gained/lost administrator status, or the list of their administrator privileges has changed.
   *
   * \param[in] user_id_ Affected chat member user identifier.
   * \param[in] old_status_ Previous status of the chat member.
   * \param[in] new_status_ New status of the chat member.
   */
  chatEventMemberPromoted(int53 user_id_, object_ptr<ChatMemberStatus> &&old_status_, object_ptr<ChatMemberStatus> &&new_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 525297761;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed.
 */
class chatEventMemberRestricted final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Affected chat member identifier.
  object_ptr<MessageSender> member_id_;
  static jfieldID member_id_fieldID;
  /// Previous status of the chat member.
  object_ptr<ChatMemberStatus> old_status_;
  static jfieldID old_status_fieldID;
  /// New status of the chat member.
  object_ptr<ChatMemberStatus> new_status_;
  static jfieldID new_status_fieldID;

  /**
   * A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed.
   */
  chatEventMemberRestricted();

  /**
   * A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed.
   *
   * \param[in] member_id_ Affected chat member identifier.
   * \param[in] old_status_ Previous status of the chat member.
   * \param[in] new_status_ New status of the chat member.
   */
  chatEventMemberRestricted(object_ptr<MessageSender> &&member_id_, object_ptr<ChatMemberStatus> &&old_status_, object_ptr<ChatMemberStatus> &&new_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1603608069;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat member tag has been changed.
 */
class chatEventMemberTagChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Affected chat member user identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Previous tag of the chat member.
  string old_tag_;
  static jfieldID old_tag_fieldID;
  /// New tag of the chat member.
  string new_tag_;
  static jfieldID new_tag_fieldID;

  /**
   * A chat member tag has been changed.
   */
  chatEventMemberTagChanged();

  /**
   * A chat member tag has been changed.
   *
   * \param[in] user_id_ Affected chat member user identifier.
   * \param[in] old_tag_ Previous tag of the chat member.
   * \param[in] new_tag_ New tag of the chat member.
   */
  chatEventMemberTagChanged(int53 user_id_, string const &old_tag_, string const &new_tag_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 63814442;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat member extended their subscription to the chat.
 */
class chatEventMemberSubscriptionExtended final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Affected chat member user identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Previous status of the chat member.
  object_ptr<ChatMemberStatus> old_status_;
  static jfieldID old_status_fieldID;
  /// New status of the chat member.
  object_ptr<ChatMemberStatus> new_status_;
  static jfieldID new_status_fieldID;

  /**
   * A chat member extended their subscription to the chat.
   */
  chatEventMemberSubscriptionExtended();

  /**
   * A chat member extended their subscription to the chat.
   *
   * \param[in] user_id_ Affected chat member user identifier.
   * \param[in] old_status_ Previous status of the chat member.
   * \param[in] new_status_ New status of the chat member.
   */
  chatEventMemberSubscriptionExtended(int53 user_id_, object_ptr<ChatMemberStatus> &&old_status_, object_ptr<ChatMemberStatus> &&new_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1141198846;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat available reactions were changed.
 */
class chatEventAvailableReactionsChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous chat available reactions.
  object_ptr<ChatAvailableReactions> old_available_reactions_;
  static jfieldID old_available_reactions_fieldID;
  /// New chat available reactions.
  object_ptr<ChatAvailableReactions> new_available_reactions_;
  static jfieldID new_available_reactions_fieldID;

  /**
   * The chat available reactions were changed.
   */
  chatEventAvailableReactionsChanged();

  /**
   * The chat available reactions were changed.
   *
   * \param[in] old_available_reactions_ Previous chat available reactions.
   * \param[in] new_available_reactions_ New chat available reactions.
   */
  chatEventAvailableReactionsChanged(object_ptr<ChatAvailableReactions> &&old_available_reactions_, object_ptr<ChatAvailableReactions> &&new_available_reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1749491521;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat background was changed.
 */
class chatEventBackgroundChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous background; may be null if none.
  object_ptr<chatBackground> old_background_;
  static jfieldID old_background_fieldID;
  /// New background; may be null if none.
  object_ptr<chatBackground> new_background_;
  static jfieldID new_background_fieldID;

  /**
   * The chat background was changed.
   */
  chatEventBackgroundChanged();

  /**
   * The chat background was changed.
   *
   * \param[in] old_background_ Previous background; may be null if none.
   * \param[in] new_background_ New background; may be null if none.
   */
  chatEventBackgroundChanged(object_ptr<chatBackground> &&old_background_, object_ptr<chatBackground> &&new_background_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1225953992;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat description was changed.
 */
class chatEventDescriptionChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous chat description.
  string old_description_;
  static jfieldID old_description_fieldID;
  /// New chat description.
  string new_description_;
  static jfieldID new_description_fieldID;

  /**
   * The chat description was changed.
   */
  chatEventDescriptionChanged();

  /**
   * The chat description was changed.
   *
   * \param[in] old_description_ Previous chat description.
   * \param[in] new_description_ New chat description.
   */
  chatEventDescriptionChanged(string const &old_description_, string const &new_description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 39112478;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat emoji status was changed.
 */
class chatEventEmojiStatusChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous emoji status; may be null if none.
  object_ptr<emojiStatus> old_emoji_status_;
  static jfieldID old_emoji_status_fieldID;
  /// New emoji status; may be null if none.
  object_ptr<emojiStatus> new_emoji_status_;
  static jfieldID new_emoji_status_fieldID;

  /**
   * The chat emoji status was changed.
   */
  chatEventEmojiStatusChanged();

  /**
   * The chat emoji status was changed.
   *
   * \param[in] old_emoji_status_ Previous emoji status; may be null if none.
   * \param[in] new_emoji_status_ New emoji status; may be null if none.
   */
  chatEventEmojiStatusChanged(object_ptr<emojiStatus> &&old_emoji_status_, object_ptr<emojiStatus> &&new_emoji_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2081850594;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The linked chat of a supergroup was changed.
 */
class chatEventLinkedChatChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous supergroup linked chat identifier.
  int53 old_linked_chat_id_;
  static jfieldID old_linked_chat_id_fieldID;
  /// New supergroup linked chat identifier.
  int53 new_linked_chat_id_;
  static jfieldID new_linked_chat_id_fieldID;

  /**
   * The linked chat of a supergroup was changed.
   */
  chatEventLinkedChatChanged();

  /**
   * The linked chat of a supergroup was changed.
   *
   * \param[in] old_linked_chat_id_ Previous supergroup linked chat identifier.
   * \param[in] new_linked_chat_id_ New supergroup linked chat identifier.
   */
  chatEventLinkedChatChanged(int53 old_linked_chat_id_, int53 new_linked_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1797419439;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The supergroup location was changed.
 */
class chatEventLocationChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous location; may be null.
  object_ptr<chatLocation> old_location_;
  static jfieldID old_location_fieldID;
  /// New location; may be null.
  object_ptr<chatLocation> new_location_;
  static jfieldID new_location_fieldID;

  /**
   * The supergroup location was changed.
   */
  chatEventLocationChanged();

  /**
   * The supergroup location was changed.
   *
   * \param[in] old_location_ Previous location; may be null.
   * \param[in] new_location_ New location; may be null.
   */
  chatEventLocationChanged(object_ptr<chatLocation> &&old_location_, object_ptr<chatLocation> &&new_location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -405930674;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message auto-delete timer was changed.
 */
class chatEventMessageAutoDeleteTimeChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous value of message_auto_delete_time.
  int32 old_message_auto_delete_time_;
  static jfieldID old_message_auto_delete_time_fieldID;
  /// New value of message_auto_delete_time.
  int32 new_message_auto_delete_time_;
  static jfieldID new_message_auto_delete_time_fieldID;

  /**
   * The message auto-delete timer was changed.
   */
  chatEventMessageAutoDeleteTimeChanged();

  /**
   * The message auto-delete timer was changed.
   *
   * \param[in] old_message_auto_delete_time_ Previous value of message_auto_delete_time.
   * \param[in] new_message_auto_delete_time_ New value of message_auto_delete_time.
   */
  chatEventMessageAutoDeleteTimeChanged(int32 old_message_auto_delete_time_, int32 new_message_auto_delete_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 17317668;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat permissions were changed.
 */
class chatEventPermissionsChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous chat permissions.
  object_ptr<chatPermissions> old_permissions_;
  static jfieldID old_permissions_fieldID;
  /// New chat permissions.
  object_ptr<chatPermissions> new_permissions_;
  static jfieldID new_permissions_fieldID;

  /**
   * The chat permissions were changed.
   */
  chatEventPermissionsChanged();

  /**
   * The chat permissions were changed.
   *
   * \param[in] old_permissions_ Previous chat permissions.
   * \param[in] new_permissions_ New chat permissions.
   */
  chatEventPermissionsChanged(object_ptr<chatPermissions> &&old_permissions_, object_ptr<chatPermissions> &&new_permissions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1311557720;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat photo was changed.
 */
class chatEventPhotoChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous chat photo value; may be null.
  object_ptr<chatPhoto> old_photo_;
  static jfieldID old_photo_fieldID;
  /// New chat photo value; may be null.
  object_ptr<chatPhoto> new_photo_;
  static jfieldID new_photo_fieldID;

  /**
   * The chat photo was changed.
   */
  chatEventPhotoChanged();

  /**
   * The chat photo was changed.
   *
   * \param[in] old_photo_ Previous chat photo value; may be null.
   * \param[in] new_photo_ New chat photo value; may be null.
   */
  chatEventPhotoChanged(object_ptr<chatPhoto> &&old_photo_, object_ptr<chatPhoto> &&new_photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -811572541;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The slow_mode_delay setting of a supergroup was changed.
 */
class chatEventSlowModeDelayChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous value of slow_mode_delay, in seconds.
  int32 old_slow_mode_delay_;
  static jfieldID old_slow_mode_delay_fieldID;
  /// New value of slow_mode_delay, in seconds.
  int32 new_slow_mode_delay_;
  static jfieldID new_slow_mode_delay_fieldID;

  /**
   * The slow_mode_delay setting of a supergroup was changed.
   */
  chatEventSlowModeDelayChanged();

  /**
   * The slow_mode_delay setting of a supergroup was changed.
   *
   * \param[in] old_slow_mode_delay_ Previous value of slow_mode_delay, in seconds.
   * \param[in] new_slow_mode_delay_ New value of slow_mode_delay, in seconds.
   */
  chatEventSlowModeDelayChanged(int32 old_slow_mode_delay_, int32 new_slow_mode_delay_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1653195765;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The supergroup sticker set was changed.
 */
class chatEventStickerSetChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous identifier of the chat sticker set; 0 if none.
  int64 old_sticker_set_id_;
  static jfieldID old_sticker_set_id_fieldID;
  /// New identifier of the chat sticker set; 0 if none.
  int64 new_sticker_set_id_;
  static jfieldID new_sticker_set_id_fieldID;

  /**
   * The supergroup sticker set was changed.
   */
  chatEventStickerSetChanged();

  /**
   * The supergroup sticker set was changed.
   *
   * \param[in] old_sticker_set_id_ Previous identifier of the chat sticker set; 0 if none.
   * \param[in] new_sticker_set_id_ New identifier of the chat sticker set; 0 if none.
   */
  chatEventStickerSetChanged(int64 old_sticker_set_id_, int64 new_sticker_set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1243130481;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The supergroup sticker set with allowed custom emoji was changed.
 */
class chatEventCustomEmojiStickerSetChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous identifier of the chat sticker set; 0 if none.
  int64 old_sticker_set_id_;
  static jfieldID old_sticker_set_id_fieldID;
  /// New identifier of the chat sticker set; 0 if none.
  int64 new_sticker_set_id_;
  static jfieldID new_sticker_set_id_fieldID;

  /**
   * The supergroup sticker set with allowed custom emoji was changed.
   */
  chatEventCustomEmojiStickerSetChanged();

  /**
   * The supergroup sticker set with allowed custom emoji was changed.
   *
   * \param[in] old_sticker_set_id_ Previous identifier of the chat sticker set; 0 if none.
   * \param[in] new_sticker_set_id_ New identifier of the chat sticker set; 0 if none.
   */
  chatEventCustomEmojiStickerSetChanged(int64 old_sticker_set_id_, int64 new_sticker_set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 118244123;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat title was changed.
 */
class chatEventTitleChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous chat title.
  string old_title_;
  static jfieldID old_title_fieldID;
  /// New chat title.
  string new_title_;
  static jfieldID new_title_fieldID;

  /**
   * The chat title was changed.
   */
  chatEventTitleChanged();

  /**
   * The chat title was changed.
   *
   * \param[in] old_title_ Previous chat title.
   * \param[in] new_title_ New chat title.
   */
  chatEventTitleChanged(string const &old_title_, string const &new_title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1134103250;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat editable username was changed.
 */
class chatEventUsernameChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous chat username.
  string old_username_;
  static jfieldID old_username_fieldID;
  /// New chat username.
  string new_username_;
  static jfieldID new_username_fieldID;

  /**
   * The chat editable username was changed.
   */
  chatEventUsernameChanged();

  /**
   * The chat editable username was changed.
   *
   * \param[in] old_username_ Previous chat username.
   * \param[in] new_username_ New chat username.
   */
  chatEventUsernameChanged(string const &old_username_, string const &new_username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1728558443;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat active usernames were changed.
 */
class chatEventActiveUsernamesChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous list of active usernames.
  array<string> old_usernames_;
  static jfieldID old_usernames_fieldID;
  /// New list of active usernames.
  array<string> new_usernames_;
  static jfieldID new_usernames_fieldID;

  /**
   * The chat active usernames were changed.
   */
  chatEventActiveUsernamesChanged();

  /**
   * The chat active usernames were changed.
   *
   * \param[in] old_usernames_ Previous list of active usernames.
   * \param[in] new_usernames_ New list of active usernames.
   */
  chatEventActiveUsernamesChanged(array<string> &&old_usernames_, array<string> &&new_usernames_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1508790810;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat accent color or background custom emoji were changed.
 */
class chatEventAccentColorChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous identifier of chat accent color.
  int32 old_accent_color_id_;
  static jfieldID old_accent_color_id_fieldID;
  /// Previous identifier of the custom emoji; 0 if none.
  int64 old_background_custom_emoji_id_;
  static jfieldID old_background_custom_emoji_id_fieldID;
  /// New identifier of chat accent color.
  int32 new_accent_color_id_;
  static jfieldID new_accent_color_id_fieldID;
  /// New identifier of the custom emoji; 0 if none.
  int64 new_background_custom_emoji_id_;
  static jfieldID new_background_custom_emoji_id_fieldID;

  /**
   * The chat accent color or background custom emoji were changed.
   */
  chatEventAccentColorChanged();

  /**
   * The chat accent color or background custom emoji were changed.
   *
   * \param[in] old_accent_color_id_ Previous identifier of chat accent color.
   * \param[in] old_background_custom_emoji_id_ Previous identifier of the custom emoji; 0 if none.
   * \param[in] new_accent_color_id_ New identifier of chat accent color.
   * \param[in] new_background_custom_emoji_id_ New identifier of the custom emoji; 0 if none.
   */
  chatEventAccentColorChanged(int32 old_accent_color_id_, int64 old_background_custom_emoji_id_, int32 new_accent_color_id_, int64 new_background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -427591885;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat's profile accent color or profile background custom emoji were changed.
 */
class chatEventProfileAccentColorChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous identifier of chat's profile accent color; -1 if none.
  int32 old_profile_accent_color_id_;
  static jfieldID old_profile_accent_color_id_fieldID;
  /// Previous identifier of the custom emoji; 0 if none.
  int64 old_profile_background_custom_emoji_id_;
  static jfieldID old_profile_background_custom_emoji_id_fieldID;
  /// New identifier of chat's profile accent color; -1 if none.
  int32 new_profile_accent_color_id_;
  static jfieldID new_profile_accent_color_id_fieldID;
  /// New identifier of the custom emoji; 0 if none.
  int64 new_profile_background_custom_emoji_id_;
  static jfieldID new_profile_background_custom_emoji_id_fieldID;

  /**
   * The chat's profile accent color or profile background custom emoji were changed.
   */
  chatEventProfileAccentColorChanged();

  /**
   * The chat's profile accent color or profile background custom emoji were changed.
   *
   * \param[in] old_profile_accent_color_id_ Previous identifier of chat's profile accent color; -1 if none.
   * \param[in] old_profile_background_custom_emoji_id_ Previous identifier of the custom emoji; 0 if none.
   * \param[in] new_profile_accent_color_id_ New identifier of chat's profile accent color; -1 if none.
   * \param[in] new_profile_background_custom_emoji_id_ New identifier of the custom emoji; 0 if none.
   */
  chatEventProfileAccentColorChanged(int32 old_profile_accent_color_id_, int64 old_profile_background_custom_emoji_id_, int32 new_profile_accent_color_id_, int64 new_profile_background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1514612124;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The has_protected_content setting of a channel was toggled.
 */
class chatEventHasProtectedContentToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of has_protected_content.
  bool has_protected_content_;
  static jfieldID has_protected_content_fieldID;

  /**
   * The has_protected_content setting of a channel was toggled.
   */
  chatEventHasProtectedContentToggled();

  /**
   * The has_protected_content setting of a channel was toggled.
   *
   * \param[in] has_protected_content_ New value of has_protected_content.
   */
  explicit chatEventHasProtectedContentToggled(bool has_protected_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -184270335;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The can_invite_users permission of a supergroup chat was toggled.
 */
class chatEventInvitesToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of can_invite_users permission.
  bool can_invite_users_;
  static jfieldID can_invite_users_fieldID;

  /**
   * The can_invite_users permission of a supergroup chat was toggled.
   */
  chatEventInvitesToggled();

  /**
   * The can_invite_users permission of a supergroup chat was toggled.
   *
   * \param[in] can_invite_users_ New value of can_invite_users permission.
   */
  explicit chatEventInvitesToggled(bool can_invite_users_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -62548373;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The is_all_history_available setting of a supergroup was toggled.
 */
class chatEventIsAllHistoryAvailableToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of is_all_history_available.
  bool is_all_history_available_;
  static jfieldID is_all_history_available_fieldID;

  /**
   * The is_all_history_available setting of a supergroup was toggled.
   */
  chatEventIsAllHistoryAvailableToggled();

  /**
   * The is_all_history_available setting of a supergroup was toggled.
   *
   * \param[in] is_all_history_available_ New value of is_all_history_available.
   */
  explicit chatEventIsAllHistoryAvailableToggled(bool is_all_history_available_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1599063019;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The has_aggressive_anti_spam_enabled setting of a supergroup was toggled.
 */
class chatEventHasAggressiveAntiSpamEnabledToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of has_aggressive_anti_spam_enabled.
  bool has_aggressive_anti_spam_enabled_;
  static jfieldID has_aggressive_anti_spam_enabled_fieldID;

  /**
   * The has_aggressive_anti_spam_enabled setting of a supergroup was toggled.
   */
  chatEventHasAggressiveAntiSpamEnabledToggled();

  /**
   * The has_aggressive_anti_spam_enabled setting of a supergroup was toggled.
   *
   * \param[in] has_aggressive_anti_spam_enabled_ New value of has_aggressive_anti_spam_enabled.
   */
  explicit chatEventHasAggressiveAntiSpamEnabledToggled(bool has_aggressive_anti_spam_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -125348094;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sign_messages setting of a channel was toggled.
 */
class chatEventSignMessagesToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of sign_messages.
  bool sign_messages_;
  static jfieldID sign_messages_fieldID;

  /**
   * The sign_messages setting of a channel was toggled.
   */
  chatEventSignMessagesToggled();

  /**
   * The sign_messages setting of a channel was toggled.
   *
   * \param[in] sign_messages_ New value of sign_messages.
   */
  explicit chatEventSignMessagesToggled(bool sign_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1313265634;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The show_message_sender setting of a channel was toggled.
 */
class chatEventShowMessageSenderToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of show_message_sender.
  bool show_message_sender_;
  static jfieldID show_message_sender_fieldID;

  /**
   * The show_message_sender setting of a channel was toggled.
   */
  chatEventShowMessageSenderToggled();

  /**
   * The show_message_sender setting of a channel was toggled.
   *
   * \param[in] show_message_sender_ New value of show_message_sender.
   */
  explicit chatEventShowMessageSenderToggled(bool show_message_sender_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -794343453;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The has_automatic_translation setting of a channel was toggled.
 */
class chatEventAutomaticTranslationToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of has_automatic_translation.
  bool has_automatic_translation_;
  static jfieldID has_automatic_translation_fieldID;

  /**
   * The has_automatic_translation setting of a channel was toggled.
   */
  chatEventAutomaticTranslationToggled();

  /**
   * The has_automatic_translation setting of a channel was toggled.
   *
   * \param[in] has_automatic_translation_ New value of has_automatic_translation.
   */
  explicit chatEventAutomaticTranslationToggled(bool has_automatic_translation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 194147926;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat invite link was edited.
 */
class chatEventInviteLinkEdited final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous information about the invite link.
  object_ptr<chatInviteLink> old_invite_link_;
  static jfieldID old_invite_link_fieldID;
  /// New information about the invite link.
  object_ptr<chatInviteLink> new_invite_link_;
  static jfieldID new_invite_link_fieldID;

  /**
   * A chat invite link was edited.
   */
  chatEventInviteLinkEdited();

  /**
   * A chat invite link was edited.
   *
   * \param[in] old_invite_link_ Previous information about the invite link.
   * \param[in] new_invite_link_ New information about the invite link.
   */
  chatEventInviteLinkEdited(object_ptr<chatInviteLink> &&old_invite_link_, object_ptr<chatInviteLink> &&new_invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -460190366;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat invite link was revoked.
 */
class chatEventInviteLinkRevoked final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The invite link.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * A chat invite link was revoked.
   */
  chatEventInviteLinkRevoked();

  /**
   * A chat invite link was revoked.
   *
   * \param[in] invite_link_ The invite link.
   */
  explicit chatEventInviteLinkRevoked(object_ptr<chatInviteLink> &&invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1579417629;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A revoked chat invite link was deleted.
 */
class chatEventInviteLinkDeleted final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The invite link.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * A revoked chat invite link was deleted.
   */
  chatEventInviteLinkDeleted();

  /**
   * A revoked chat invite link was deleted.
   *
   * \param[in] invite_link_ The invite link.
   */
  explicit chatEventInviteLinkDeleted(object_ptr<chatInviteLink> &&invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1394974361;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video chat was created.
 */
class chatEventVideoChatCreated final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * A video chat was created.
   */
  chatEventVideoChatCreated();

  /**
   * A video chat was created.
   *
   * \param[in] group_call_id_ Identifier of the video chat. The video chat can be received through the method getGroupCall.
   */
  explicit chatEventVideoChatCreated(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1822853755;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video chat was ended.
 */
class chatEventVideoChatEnded final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * A video chat was ended.
   */
  chatEventVideoChatEnded();

  /**
   * A video chat was ended.
   *
   * \param[in] group_call_id_ Identifier of the video chat. The video chat can be received through the method getGroupCall.
   */
  explicit chatEventVideoChatEnded(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1630039112;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The mute_new_participants setting of a video chat was toggled.
 */
class chatEventVideoChatMuteNewParticipantsToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of the mute_new_participants setting.
  bool mute_new_participants_;
  static jfieldID mute_new_participants_fieldID;

  /**
   * The mute_new_participants setting of a video chat was toggled.
   */
  chatEventVideoChatMuteNewParticipantsToggled();

  /**
   * The mute_new_participants setting of a video chat was toggled.
   *
   * \param[in] mute_new_participants_ New value of the mute_new_participants setting.
   */
  explicit chatEventVideoChatMuteNewParticipantsToggled(bool mute_new_participants_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -126547970;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video chat participant was muted or unmuted.
 */
class chatEventVideoChatParticipantIsMutedToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the affected group call participant.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// New value of is_muted.
  bool is_muted_;
  static jfieldID is_muted_fieldID;

  /**
   * A video chat participant was muted or unmuted.
   */
  chatEventVideoChatParticipantIsMutedToggled();

  /**
   * A video chat participant was muted or unmuted.
   *
   * \param[in] participant_id_ Identifier of the affected group call participant.
   * \param[in] is_muted_ New value of is_muted.
   */
  chatEventVideoChatParticipantIsMutedToggled(object_ptr<MessageSender> &&participant_id_, bool is_muted_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 521165047;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video chat participant volume level was changed.
 */
class chatEventVideoChatParticipantVolumeLevelChanged final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the affected group call participant.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// New value of volume_level; 1-20000 in hundreds of percents.
  int32 volume_level_;
  static jfieldID volume_level_fieldID;

  /**
   * A video chat participant volume level was changed.
   */
  chatEventVideoChatParticipantVolumeLevelChanged();

  /**
   * A video chat participant volume level was changed.
   *
   * \param[in] participant_id_ Identifier of the affected group call participant.
   * \param[in] volume_level_ New value of volume_level; 1-20000 in hundreds of percents.
   */
  chatEventVideoChatParticipantVolumeLevelChanged(object_ptr<MessageSender> &&participant_id_, int32 volume_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1131385534;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The is_forum setting of a channel was toggled.
 */
class chatEventIsForumToggled final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of is_forum.
  bool is_forum_;
  static jfieldID is_forum_fieldID;

  /**
   * The is_forum setting of a channel was toggled.
   */
  chatEventIsForumToggled();

  /**
   * The is_forum setting of a channel was toggled.
   *
   * \param[in] is_forum_ New value of is_forum.
   */
  explicit chatEventIsForumToggled(bool is_forum_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1516491033;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new forum topic was created.
 */
class chatEventForumTopicCreated final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the topic.
  object_ptr<forumTopicInfo> topic_info_;
  static jfieldID topic_info_fieldID;

  /**
   * A new forum topic was created.
   */
  chatEventForumTopicCreated();

  /**
   * A new forum topic was created.
   *
   * \param[in] topic_info_ Information about the topic.
   */
  explicit chatEventForumTopicCreated(object_ptr<forumTopicInfo> &&topic_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2005269314;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forum topic was edited.
 */
class chatEventForumTopicEdited final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Old information about the topic.
  object_ptr<forumTopicInfo> old_topic_info_;
  static jfieldID old_topic_info_fieldID;
  /// New information about the topic.
  object_ptr<forumTopicInfo> new_topic_info_;
  static jfieldID new_topic_info_fieldID;

  /**
   * A forum topic was edited.
   */
  chatEventForumTopicEdited();

  /**
   * A forum topic was edited.
   *
   * \param[in] old_topic_info_ Old information about the topic.
   * \param[in] new_topic_info_ New information about the topic.
   */
  chatEventForumTopicEdited(object_ptr<forumTopicInfo> &&old_topic_info_, object_ptr<forumTopicInfo> &&new_topic_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1624910860;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forum topic was closed or reopened.
 */
class chatEventForumTopicToggleIsClosed final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New information about the topic.
  object_ptr<forumTopicInfo> topic_info_;
  static jfieldID topic_info_fieldID;

  /**
   * A forum topic was closed or reopened.
   */
  chatEventForumTopicToggleIsClosed();

  /**
   * A forum topic was closed or reopened.
   *
   * \param[in] topic_info_ New information about the topic.
   */
  explicit chatEventForumTopicToggleIsClosed(object_ptr<forumTopicInfo> &&topic_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -962704070;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The General forum topic was hidden or unhidden.
 */
class chatEventForumTopicToggleIsHidden final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New information about the topic.
  object_ptr<forumTopicInfo> topic_info_;
  static jfieldID topic_info_fieldID;

  /**
   * The General forum topic was hidden or unhidden.
   */
  chatEventForumTopicToggleIsHidden();

  /**
   * The General forum topic was hidden or unhidden.
   *
   * \param[in] topic_info_ New information about the topic.
   */
  explicit chatEventForumTopicToggleIsHidden(object_ptr<forumTopicInfo> &&topic_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1609175250;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forum topic was deleted.
 */
class chatEventForumTopicDeleted final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the topic.
  object_ptr<forumTopicInfo> topic_info_;
  static jfieldID topic_info_fieldID;

  /**
   * A forum topic was deleted.
   */
  chatEventForumTopicDeleted();

  /**
   * A forum topic was deleted.
   *
   * \param[in] topic_info_ Information about the topic.
   */
  explicit chatEventForumTopicDeleted(object_ptr<forumTopicInfo> &&topic_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1332795123;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A pinned forum topic was changed.
 */
class chatEventForumTopicPinned final : public ChatEventAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the old pinned topic; may be null.
  object_ptr<forumTopicInfo> old_topic_info_;
  static jfieldID old_topic_info_fieldID;
  /// Information about the new pinned topic; may be null.
  object_ptr<forumTopicInfo> new_topic_info_;
  static jfieldID new_topic_info_fieldID;

  /**
   * A pinned forum topic was changed.
   */
  chatEventForumTopicPinned();

  /**
   * A pinned forum topic was changed.
   *
   * \param[in] old_topic_info_ Information about the old pinned topic; may be null.
   * \param[in] new_topic_info_ Information about the new pinned topic; may be null.
   */
  chatEventForumTopicPinned(object_ptr<forumTopicInfo> &&old_topic_info_, object_ptr<forumTopicInfo> &&new_topic_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2143626222;

  static object_ptr<ChatEventAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a set of filters used to obtain a chat event log.
 */
class chatEventLogFilters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if message edits need to be returned.
  bool message_edits_;
  static jfieldID message_edits_fieldID;
  /// True, if message deletions need to be returned.
  bool message_deletions_;
  static jfieldID message_deletions_fieldID;
  /// True, if pin/unpin events need to be returned.
  bool message_pins_;
  static jfieldID message_pins_fieldID;
  /// True, if members joining events need to be returned.
  bool member_joins_;
  static jfieldID member_joins_fieldID;
  /// True, if members leaving events need to be returned.
  bool member_leaves_;
  static jfieldID member_leaves_fieldID;
  /// True, if invited member events need to be returned.
  bool member_invites_;
  static jfieldID member_invites_fieldID;
  /// True, if member promotion/demotion events need to be returned.
  bool member_promotions_;
  static jfieldID member_promotions_fieldID;
  /// True, if member restricted/unrestricted/banned/unbanned events need to be returned.
  bool member_restrictions_;
  static jfieldID member_restrictions_fieldID;
  /// True, if member tag and custom title change events need to be returned.
  bool member_tag_changes_;
  static jfieldID member_tag_changes_fieldID;
  /// True, if changes in chat information need to be returned.
  bool info_changes_;
  static jfieldID info_changes_fieldID;
  /// True, if changes in chat settings need to be returned.
  bool setting_changes_;
  static jfieldID setting_changes_fieldID;
  /// True, if changes to invite links need to be returned.
  bool invite_link_changes_;
  static jfieldID invite_link_changes_fieldID;
  /// True, if video chat actions need to be returned.
  bool video_chat_changes_;
  static jfieldID video_chat_changes_fieldID;
  /// True, if forum-related actions need to be returned.
  bool forum_changes_;
  static jfieldID forum_changes_fieldID;
  /// True, if subscription extensions need to be returned.
  bool subscription_extensions_;
  static jfieldID subscription_extensions_fieldID;

  /**
   * Represents a set of filters used to obtain a chat event log.
   */
  chatEventLogFilters();

  /**
   * Represents a set of filters used to obtain a chat event log.
   *
   * \param[in] message_edits_ True, if message edits need to be returned.
   * \param[in] message_deletions_ True, if message deletions need to be returned.
   * \param[in] message_pins_ True, if pin/unpin events need to be returned.
   * \param[in] member_joins_ True, if members joining events need to be returned.
   * \param[in] member_leaves_ True, if members leaving events need to be returned.
   * \param[in] member_invites_ True, if invited member events need to be returned.
   * \param[in] member_promotions_ True, if member promotion/demotion events need to be returned.
   * \param[in] member_restrictions_ True, if member restricted/unrestricted/banned/unbanned events need to be returned.
   * \param[in] member_tag_changes_ True, if member tag and custom title change events need to be returned.
   * \param[in] info_changes_ True, if changes in chat information need to be returned.
   * \param[in] setting_changes_ True, if changes in chat settings need to be returned.
   * \param[in] invite_link_changes_ True, if changes to invite links need to be returned.
   * \param[in] video_chat_changes_ True, if video chat actions need to be returned.
   * \param[in] forum_changes_ True, if forum-related actions need to be returned.
   * \param[in] subscription_extensions_ True, if subscription extensions need to be returned.
   */
  chatEventLogFilters(bool message_edits_, bool message_deletions_, bool message_pins_, bool member_joins_, bool member_leaves_, bool member_invites_, bool member_promotions_, bool member_restrictions_, bool member_tag_changes_, bool info_changes_, bool setting_changes_, bool invite_link_changes_, bool video_chat_changes_, bool forum_changes_, bool subscription_extensions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1572752816;

  static object_ptr<chatEventLogFilters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatEvent;

/**
 * Contains a list of chat events.
 */
class chatEvents final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of events.
  array<object_ptr<chatEvent>> events_;
  static jfieldID events_fieldID;

  /**
   * Contains a list of chat events.
   */
  chatEvents();

  /**
   * Contains a list of chat events.
   *
   * \param[in] events_ List of events.
   */
  explicit chatEvents(array<object_ptr<chatEvent>> &&events_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -585329664;

  static object_ptr<chatEvents> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderIcon;

class chatFolderName;

/**
 * Represents a folder for user chats.
 */
class chatFolder final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The name of the folder.
  object_ptr<chatFolderName> name_;
  static jfieldID name_fieldID;
  /// The chosen icon for the chat folder; may be null. If null, use getChatFolderDefaultIconName to get default icon name for the folder.
  object_ptr<chatFolderIcon> icon_;
  static jfieldID icon_fieldID;
  /// The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is disabled. Can't be changed if folder tags are disabled or the current user doesn't have Telegram Premium subscription.
  int32 color_id_;
  static jfieldID color_id_fieldID;
  /// True, if at least one link has been created for the folder.
  bool is_shareable_;
  static jfieldID is_shareable_fieldID;
  /// The chat identifiers of pinned chats in the folder. There can be up to getOption(&quot;chat_folder_chosen_chat_count_max&quot;) pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.
  array<int53> pinned_chat_ids_;
  static jfieldID pinned_chat_ids_fieldID;
  /// The chat identifiers of always included chats in the folder. There can be up to getOption(&quot;chat_folder_chosen_chat_count_max&quot;) pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.
  array<int53> included_chat_ids_;
  static jfieldID included_chat_ids_fieldID;
  /// The chat identifiers of always excluded chats in the folder. There can be up to getOption(&quot;chat_folder_chosen_chat_count_max&quot;) always excluded non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.
  array<int53> excluded_chat_ids_;
  static jfieldID excluded_chat_ids_fieldID;
  /// True, if muted chats need to be excluded.
  bool exclude_muted_;
  static jfieldID exclude_muted_fieldID;
  /// True, if read chats need to be excluded.
  bool exclude_read_;
  static jfieldID exclude_read_fieldID;
  /// True, if archived chats need to be excluded.
  bool exclude_archived_;
  static jfieldID exclude_archived_fieldID;
  /// True, if contacts need to be included.
  bool include_contacts_;
  static jfieldID include_contacts_fieldID;
  /// True, if non-contact users need to be included.
  bool include_non_contacts_;
  static jfieldID include_non_contacts_fieldID;
  /// True, if bots need to be included.
  bool include_bots_;
  static jfieldID include_bots_fieldID;
  /// True, if basic groups and supergroups need to be included.
  bool include_groups_;
  static jfieldID include_groups_fieldID;
  /// True, if channels need to be included.
  bool include_channels_;
  static jfieldID include_channels_fieldID;

  /**
   * Represents a folder for user chats.
   */
  chatFolder();

  /**
   * Represents a folder for user chats.
   *
   * \param[in] name_ The name of the folder.
   * \param[in] icon_ The chosen icon for the chat folder; may be null. If null, use getChatFolderDefaultIconName to get default icon name for the folder.
   * \param[in] color_id_ The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is disabled. Can't be changed if folder tags are disabled or the current user doesn't have Telegram Premium subscription.
   * \param[in] is_shareable_ True, if at least one link has been created for the folder.
   * \param[in] pinned_chat_ids_ The chat identifiers of pinned chats in the folder. There can be up to getOption(&quot;chat_folder_chosen_chat_count_max&quot;) pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.
   * \param[in] included_chat_ids_ The chat identifiers of always included chats in the folder. There can be up to getOption(&quot;chat_folder_chosen_chat_count_max&quot;) pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.
   * \param[in] excluded_chat_ids_ The chat identifiers of always excluded chats in the folder. There can be up to getOption(&quot;chat_folder_chosen_chat_count_max&quot;) always excluded non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.
   * \param[in] exclude_muted_ True, if muted chats need to be excluded.
   * \param[in] exclude_read_ True, if read chats need to be excluded.
   * \param[in] exclude_archived_ True, if archived chats need to be excluded.
   * \param[in] include_contacts_ True, if contacts need to be included.
   * \param[in] include_non_contacts_ True, if non-contact users need to be included.
   * \param[in] include_bots_ True, if bots need to be included.
   * \param[in] include_groups_ True, if basic groups and supergroups need to be included.
   * \param[in] include_channels_ True, if channels need to be included.
   */
  chatFolder(object_ptr<chatFolderName> &&name_, object_ptr<chatFolderIcon> &&icon_, int32 color_id_, bool is_shareable_, array<int53> &&pinned_chat_ids_, array<int53> &&included_chat_ids_, array<int53> &&excluded_chat_ids_, bool exclude_muted_, bool exclude_read_, bool exclude_archived_, bool include_contacts_, bool include_non_contacts_, bool include_bots_, bool include_groups_, bool include_channels_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1596164696;

  static object_ptr<chatFolder> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an icon for a chat folder.
 */
class chatFolderIcon final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chosen icon name for short folder representation; one of &quot;All&quot;, &quot;Unread&quot;, &quot;Unmuted&quot;, &quot;Bots&quot;, &quot;Channels&quot;, &quot;Groups&quot;, &quot;Private&quot;, &quot;Custom&quot;, &quot;Setup&quot;, &quot;Cat&quot;, &quot;Crown&quot;, &quot;Favorite&quot;, &quot;Flower&quot;, &quot;Game&quot;, &quot;Home&quot;, &quot;Love&quot;, &quot;Mask&quot;, &quot;Party&quot;, &quot;Sport&quot;, &quot;Study&quot;, &quot;Trade&quot;, &quot;Travel&quot;, &quot;Work&quot;, &quot;Airplane&quot;, &quot;Book&quot;, &quot;Light&quot;, &quot;Like&quot;, &quot;Money&quot;, &quot;Note&quot;, &quot;Palette&quot;.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Represents an icon for a chat folder.
   */
  chatFolderIcon();

  /**
   * Represents an icon for a chat folder.
   *
   * \param[in] name_ The chosen icon name for short folder representation; one of &quot;All&quot;, &quot;Unread&quot;, &quot;Unmuted&quot;, &quot;Bots&quot;, &quot;Channels&quot;, &quot;Groups&quot;, &quot;Private&quot;, &quot;Custom&quot;, &quot;Setup&quot;, &quot;Cat&quot;, &quot;Crown&quot;, &quot;Favorite&quot;, &quot;Flower&quot;, &quot;Game&quot;, &quot;Home&quot;, &quot;Love&quot;, &quot;Mask&quot;, &quot;Party&quot;, &quot;Sport&quot;, &quot;Study&quot;, &quot;Trade&quot;, &quot;Travel&quot;, &quot;Work&quot;, &quot;Airplane&quot;, &quot;Book&quot;, &quot;Light&quot;, &quot;Like&quot;, &quot;Money&quot;, &quot;Note&quot;, &quot;Palette&quot;.
   */
  explicit chatFolderIcon(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -146104090;

  static object_ptr<chatFolderIcon> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderIcon;

class chatFolderName;

/**
 * Contains basic information about a chat folder.
 */
class chatFolderInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique chat folder identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// The name of the folder.
  object_ptr<chatFolderName> name_;
  static jfieldID name_fieldID;
  /// The chosen or default icon for the chat folder.
  object_ptr<chatFolderIcon> icon_;
  static jfieldID icon_fieldID;
  /// The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is disabled.
  int32 color_id_;
  static jfieldID color_id_fieldID;
  /// True, if at least one link has been created for the folder.
  bool is_shareable_;
  static jfieldID is_shareable_fieldID;
  /// True, if the chat folder has invite links created by the current user.
  bool has_my_invite_links_;
  static jfieldID has_my_invite_links_fieldID;

  /**
   * Contains basic information about a chat folder.
   */
  chatFolderInfo();

  /**
   * Contains basic information about a chat folder.
   *
   * \param[in] id_ Unique chat folder identifier.
   * \param[in] name_ The name of the folder.
   * \param[in] icon_ The chosen or default icon for the chat folder.
   * \param[in] color_id_ The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is disabled.
   * \param[in] is_shareable_ True, if at least one link has been created for the folder.
   * \param[in] has_my_invite_links_ True, if the chat folder has invite links created by the current user.
   */
  chatFolderInfo(int32 id_, object_ptr<chatFolderName> &&name_, object_ptr<chatFolderIcon> &&icon_, int32 color_id_, bool is_shareable_, bool has_my_invite_links_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 815535117;

  static object_ptr<chatFolderInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a chat folder invite link.
 */
class chatFolderInviteLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat folder invite link.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Name of the link.
  string name_;
  static jfieldID name_fieldID;
  /// Identifiers of chats, included in the link.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * Contains a chat folder invite link.
   */
  chatFolderInviteLink();

  /**
   * Contains a chat folder invite link.
   *
   * \param[in] invite_link_ The chat folder invite link.
   * \param[in] name_ Name of the link.
   * \param[in] chat_ids_ Identifiers of chats, included in the link.
   */
  chatFolderInviteLink(string const &invite_link_, string const &name_, array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 493969661;

  static object_ptr<chatFolderInviteLink> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderInfo;

/**
 * Contains information about an invite link to a chat folder.
 */
class chatFolderInviteLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Basic information about the chat folder; chat folder identifier will be 0 if the user didn't have the chat folder yet.
  object_ptr<chatFolderInfo> chat_folder_info_;
  static jfieldID chat_folder_info_fieldID;
  /// Identifiers of the chats from the link, which aren't added to the folder yet.
  array<int53> missing_chat_ids_;
  static jfieldID missing_chat_ids_fieldID;
  /// Identifiers of the chats from the link, which are added to the folder already.
  array<int53> added_chat_ids_;
  static jfieldID added_chat_ids_fieldID;

  /**
   * Contains information about an invite link to a chat folder.
   */
  chatFolderInviteLinkInfo();

  /**
   * Contains information about an invite link to a chat folder.
   *
   * \param[in] chat_folder_info_ Basic information about the chat folder; chat folder identifier will be 0 if the user didn't have the chat folder yet.
   * \param[in] missing_chat_ids_ Identifiers of the chats from the link, which aren't added to the folder yet.
   * \param[in] added_chat_ids_ Identifiers of the chats from the link, which are added to the folder already.
   */
  chatFolderInviteLinkInfo(object_ptr<chatFolderInfo> &&chat_folder_info_, array<int53> &&missing_chat_ids_, array<int53> &&added_chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1119450395;

  static object_ptr<chatFolderInviteLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderInviteLink;

/**
 * Represents a list of chat folder invite links.
 */
class chatFolderInviteLinks final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of the invite links.
  array<object_ptr<chatFolderInviteLink>> invite_links_;
  static jfieldID invite_links_fieldID;

  /**
   * Represents a list of chat folder invite links.
   */
  chatFolderInviteLinks();

  /**
   * Represents a list of chat folder invite links.
   *
   * \param[in] invite_links_ List of the invite links.
   */
  explicit chatFolderInviteLinks(array<object_ptr<chatFolderInviteLink>> &&invite_links_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1853351525;

  static object_ptr<chatFolderInviteLinks> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes name of a chat folder.
 */
class chatFolderName final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text of the chat folder name; 1-12 characters without line feeds. May contain only CustomEmoji entities.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// True, if custom emoji in the name must be animated.
  bool animate_custom_emoji_;
  static jfieldID animate_custom_emoji_fieldID;

  /**
   * Describes name of a chat folder.
   */
  chatFolderName();

  /**
   * Describes name of a chat folder.
   *
   * \param[in] text_ The text of the chat folder name; 1-12 characters without line feeds. May contain only CustomEmoji entities.
   * \param[in] animate_custom_emoji_ True, if custom emoji in the name must be animated.
   */
  chatFolderName(object_ptr<formattedText> &&text_, bool animate_custom_emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -330482274;

  static object_ptr<chatFolderName> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starSubscriptionPricing;

/**
 * Contains a chat invite link.
 */
class chatInviteLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat invite link.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Name of the link.
  string name_;
  static jfieldID name_fieldID;
  /// User identifier of an administrator created the link.
  int53 creator_user_id_;
  static jfieldID creator_user_id_fieldID;
  /// Point in time (Unix timestamp) when the link was created.
  int32 date_;
  static jfieldID date_fieldID;
  /// Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown.
  int32 edit_date_;
  static jfieldID edit_date_fieldID;
  /// Point in time (Unix timestamp) when the link will expire; 0 if never.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// Information about subscription plan that is applied to the users joining the chat by the link; may be null if the link doesn't require subscription.
  object_ptr<starSubscriptionPricing> subscription_pricing_;
  static jfieldID subscription_pricing_fieldID;
  /// The maximum number of members, which can join the chat using the link simultaneously; 0 if not limited. Always 0 if the link requires approval.
  int32 member_limit_;
  static jfieldID member_limit_fieldID;
  /// Number of chat members, which joined the chat using the link.
  int32 member_count_;
  static jfieldID member_count_fieldID;
  /// Number of chat members, which joined the chat using the link, but have already left because of expired subscription; for subscription links only.
  int32 expired_member_count_;
  static jfieldID expired_member_count_fieldID;
  /// Number of pending join requests created using this link.
  int32 pending_join_request_count_;
  static jfieldID pending_join_request_count_fieldID;
  /// True, if the link only creates join request. If true, total number of joining members will be unlimited.
  bool creates_join_request_;
  static jfieldID creates_join_request_fieldID;
  /// True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time.
  bool is_primary_;
  static jfieldID is_primary_fieldID;
  /// True, if the link was revoked.
  bool is_revoked_;
  static jfieldID is_revoked_fieldID;

  /**
   * Contains a chat invite link.
   */
  chatInviteLink();

  /**
   * Contains a chat invite link.
   *
   * \param[in] invite_link_ Chat invite link.
   * \param[in] name_ Name of the link.
   * \param[in] creator_user_id_ User identifier of an administrator created the link.
   * \param[in] date_ Point in time (Unix timestamp) when the link was created.
   * \param[in] edit_date_ Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the link will expire; 0 if never.
   * \param[in] subscription_pricing_ Information about subscription plan that is applied to the users joining the chat by the link; may be null if the link doesn't require subscription.
   * \param[in] member_limit_ The maximum number of members, which can join the chat using the link simultaneously; 0 if not limited. Always 0 if the link requires approval.
   * \param[in] member_count_ Number of chat members, which joined the chat using the link.
   * \param[in] expired_member_count_ Number of chat members, which joined the chat using the link, but have already left because of expired subscription; for subscription links only.
   * \param[in] pending_join_request_count_ Number of pending join requests created using this link.
   * \param[in] creates_join_request_ True, if the link only creates join request. If true, total number of joining members will be unlimited.
   * \param[in] is_primary_ True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time.
   * \param[in] is_revoked_ True, if the link was revoked.
   */
  chatInviteLink(string const &invite_link_, string const &name_, int53 creator_user_id_, int32 date_, int32 edit_date_, int32 expiration_date_, object_ptr<starSubscriptionPricing> &&subscription_pricing_, int32 member_limit_, int32 member_count_, int32 expired_member_count_, int32 pending_join_request_count_, bool creates_join_request_, bool is_primary_, bool is_revoked_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -957651664;

  static object_ptr<chatInviteLink> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a chat administrator with a number of active and revoked chat invite links.
 */
class chatInviteLinkCount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Administrator's user identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Number of active invite links.
  int32 invite_link_count_;
  static jfieldID invite_link_count_fieldID;
  /// Number of revoked invite links.
  int32 revoked_invite_link_count_;
  static jfieldID revoked_invite_link_count_fieldID;

  /**
   * Describes a chat administrator with a number of active and revoked chat invite links.
   */
  chatInviteLinkCount();

  /**
   * Describes a chat administrator with a number of active and revoked chat invite links.
   *
   * \param[in] user_id_ Administrator's user identifier.
   * \param[in] invite_link_count_ Number of active invite links.
   * \param[in] revoked_invite_link_count_ Number of revoked invite links.
   */
  chatInviteLinkCount(int53 user_id_, int32 invite_link_count_, int32 revoked_invite_link_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1021999210;

  static object_ptr<chatInviteLinkCount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinkCount;

/**
 * Contains a list of chat invite link counts.
 */
class chatInviteLinkCounts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of invite link counts.
  array<object_ptr<chatInviteLinkCount>> invite_link_counts_;
  static jfieldID invite_link_counts_fieldID;

  /**
   * Contains a list of chat invite link counts.
   */
  chatInviteLinkCounts();

  /**
   * Contains a list of chat invite link counts.
   *
   * \param[in] invite_link_counts_ List of invite link counts.
   */
  explicit chatInviteLinkCounts(array<object_ptr<chatInviteLinkCount>> &&invite_link_counts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 920326637;

  static object_ptr<chatInviteLinkCounts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InviteLinkChatType;

class chatInviteLinkSubscriptionInfo;

class chatPhotoInfo;

class verificationStatus;

/**
 * Contains information about a chat invite link.
 */
class chatInviteLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the invite link; 0 if the user has no access to the chat before joining.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// If non-zero, the amount of time for which read access to the chat will remain available, in seconds.
  int32 accessible_for_;
  static jfieldID accessible_for_fieldID;
  /// Type of the chat.
  object_ptr<InviteLinkChatType> type_;
  static jfieldID type_fieldID;
  /// Title of the chat.
  string title_;
  static jfieldID title_fieldID;
  /// Chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  static jfieldID photo_fieldID;
  /// Identifier of the accent color for chat title and background of chat photo.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Chat description.
  string description_;
  static jfieldID description_fieldID;
  /// Number of members in the chat.
  int32 member_count_;
  static jfieldID member_count_fieldID;
  /// User identifiers of some chat members that may be known to the current user.
  array<int53> member_user_ids_;
  static jfieldID member_user_ids_fieldID;
  /// Information about subscription plan that must be paid by the user to use the link; may be null if the link doesn't require subscription.
  object_ptr<chatInviteLinkSubscriptionInfo> subscription_info_;
  static jfieldID subscription_info_fieldID;
  /// True, if the link only creates join request.
  bool creates_join_request_;
  static jfieldID creates_join_request_fieldID;
  /// True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup.
  bool is_public_;
  static jfieldID is_public_fieldID;
  /// Information about verification status of the chat; may be null if none.
  object_ptr<verificationStatus> verification_status_;
  static jfieldID verification_status_fieldID;

  /**
   * Contains information about a chat invite link.
   */
  chatInviteLinkInfo();

  /**
   * Contains information about a chat invite link.
   *
   * \param[in] chat_id_ Chat identifier of the invite link; 0 if the user has no access to the chat before joining.
   * \param[in] accessible_for_ If non-zero, the amount of time for which read access to the chat will remain available, in seconds.
   * \param[in] type_ Type of the chat.
   * \param[in] title_ Title of the chat.
   * \param[in] photo_ Chat photo; may be null.
   * \param[in] accent_color_id_ Identifier of the accent color for chat title and background of chat photo.
   * \param[in] description_ Chat description.
   * \param[in] member_count_ Number of members in the chat.
   * \param[in] member_user_ids_ User identifiers of some chat members that may be known to the current user.
   * \param[in] subscription_info_ Information about subscription plan that must be paid by the user to use the link; may be null if the link doesn't require subscription.
   * \param[in] creates_join_request_ True, if the link only creates join request.
   * \param[in] is_public_ True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup.
   * \param[in] verification_status_ Information about verification status of the chat; may be null if none.
   */
  chatInviteLinkInfo(int53 chat_id_, int32 accessible_for_, object_ptr<InviteLinkChatType> &&type_, string const &title_, object_ptr<chatPhotoInfo> &&photo_, int32 accent_color_id_, string const &description_, int32 member_count_, array<int53> &&member_user_ids_, object_ptr<chatInviteLinkSubscriptionInfo> &&subscription_info_, bool creates_join_request_, bool is_public_, object_ptr<verificationStatus> &&verification_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1145310535;

  static object_ptr<chatInviteLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a chat member joined a chat via an invite link.
 */
class chatInviteLinkMember final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Point in time (Unix timestamp) when the user joined the chat.
  int32 joined_chat_date_;
  static jfieldID joined_chat_date_fieldID;
  /// True, if the user has joined the chat using an invite link for a chat folder.
  bool via_chat_folder_invite_link_;
  static jfieldID via_chat_folder_invite_link_fieldID;
  /// User identifier of the chat administrator, approved user join request.
  int53 approver_user_id_;
  static jfieldID approver_user_id_fieldID;

  /**
   * Describes a chat member joined a chat via an invite link.
   */
  chatInviteLinkMember();

  /**
   * Describes a chat member joined a chat via an invite link.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] joined_chat_date_ Point in time (Unix timestamp) when the user joined the chat.
   * \param[in] via_chat_folder_invite_link_ True, if the user has joined the chat using an invite link for a chat folder.
   * \param[in] approver_user_id_ User identifier of the chat administrator, approved user join request.
   */
  chatInviteLinkMember(int53 user_id_, int32 joined_chat_date_, bool via_chat_folder_invite_link_, int53 approver_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 29156795;

  static object_ptr<chatInviteLinkMember> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinkMember;

/**
 * Contains a list of chat members joined a chat via an invite link.
 */
class chatInviteLinkMembers final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of chat members found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of chat members, joined a chat via an invite link.
  array<object_ptr<chatInviteLinkMember>> members_;
  static jfieldID members_fieldID;

  /**
   * Contains a list of chat members joined a chat via an invite link.
   */
  chatInviteLinkMembers();

  /**
   * Contains a list of chat members joined a chat via an invite link.
   *
   * \param[in] total_count_ Approximate total number of chat members found.
   * \param[in] members_ List of chat members, joined a chat via an invite link.
   */
  chatInviteLinkMembers(int32 total_count_, array<object_ptr<chatInviteLinkMember>> &&members_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 315635051;

  static object_ptr<chatInviteLinkMembers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starSubscriptionPricing;

/**
 * Contains information about subscription plan that must be paid by the user to use a chat invite link.
 */
class chatInviteLinkSubscriptionInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about subscription plan that must be paid by the user to use the link.
  object_ptr<starSubscriptionPricing> pricing_;
  static jfieldID pricing_fieldID;
  /// True, if the user has already paid for the subscription and can use joinChatByInviteLink to join the subscribed chat again.
  bool can_reuse_;
  static jfieldID can_reuse_fieldID;
  /// Identifier of the payment form to use for subscription payment; 0 if the subscription can't be paid.
  int64 form_id_;
  static jfieldID form_id_fieldID;

  /**
   * Contains information about subscription plan that must be paid by the user to use a chat invite link.
   */
  chatInviteLinkSubscriptionInfo();

  /**
   * Contains information about subscription plan that must be paid by the user to use a chat invite link.
   *
   * \param[in] pricing_ Information about subscription plan that must be paid by the user to use the link.
   * \param[in] can_reuse_ True, if the user has already paid for the subscription and can use joinChatByInviteLink to join the subscribed chat again.
   * \param[in] form_id_ Identifier of the payment form to use for subscription payment; 0 if the subscription can't be paid.
   */
  chatInviteLinkSubscriptionInfo(object_ptr<starSubscriptionPricing> &&pricing_, bool can_reuse_, int64 form_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 953119592;

  static object_ptr<chatInviteLinkSubscriptionInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

/**
 * Contains a list of chat invite links.
 */
class chatInviteLinks final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of chat invite links found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of invite links.
  array<object_ptr<chatInviteLink>> invite_links_;
  static jfieldID invite_links_fieldID;

  /**
   * Contains a list of chat invite links.
   */
  chatInviteLinks();

  /**
   * Contains a list of chat invite links.
   *
   * \param[in] total_count_ Approximate total number of chat invite links found.
   * \param[in] invite_links_ List of invite links.
   */
  chatInviteLinks(int32 total_count_, array<object_ptr<chatInviteLink>> &&invite_links_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 112891427;

  static object_ptr<chatInviteLinks> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a user who sent a join request and waits for administrator approval.
 */
class chatJoinRequest final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Point in time (Unix timestamp) when the user sent the join request.
  int32 date_;
  static jfieldID date_fieldID;
  /// A short bio of the user.
  string bio_;
  static jfieldID bio_fieldID;

  /**
   * Describes a user who sent a join request and waits for administrator approval.
   */
  chatJoinRequest();

  /**
   * Describes a user who sent a join request and waits for administrator approval.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] date_ Point in time (Unix timestamp) when the user sent the join request.
   * \param[in] bio_ A short bio of the user.
   */
  chatJoinRequest(int53 user_id_, int32 date_, string const &bio_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 59341416;

  static object_ptr<chatJoinRequest> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatJoinRequest;

/**
 * Contains a list of requests to join a chat.
 */
class chatJoinRequests final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of requests found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of the requests.
  array<object_ptr<chatJoinRequest>> requests_;
  static jfieldID requests_fieldID;

  /**
   * Contains a list of requests to join a chat.
   */
  chatJoinRequests();

  /**
   * Contains a list of requests to join a chat.
   *
   * \param[in] total_count_ Approximate total number of requests found.
   * \param[in] requests_ List of the requests.
   */
  chatJoinRequests(int32 total_count_, array<object_ptr<chatJoinRequest>> &&requests_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1291680519;

  static object_ptr<chatJoinRequests> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about pending join requests for a chat.
 */
class chatJoinRequestsInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of pending join requests.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Identifiers of at most 3 users sent the newest pending join requests.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Contains information about pending join requests for a chat.
   */
  chatJoinRequestsInfo();

  /**
   * Contains information about pending join requests for a chat.
   *
   * \param[in] total_count_ Total number of pending join requests.
   * \param[in] user_ids_ Identifiers of at most 3 users sent the newest pending join requests.
   */
  chatJoinRequestsInfo(int32 total_count_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 888534463;

  static object_ptr<chatJoinRequestsInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a list of chats.
 */
class ChatList: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatList> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A main list of chats.
 */
class chatListMain final : public ChatList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A main list of chats.
   */
  chatListMain();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -400991316;

  static object_ptr<ChatList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives.
 */
class chatListArchive final : public ChatList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives.
   */
  chatListArchive();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 362770115;

  static object_ptr<ChatList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A list of chats added to a chat folder.
 */
class chatListFolder final : public ChatList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;

  /**
   * A list of chats added to a chat folder.
   */
  chatListFolder();

  /**
   * A list of chats added to a chat folder.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   */
  explicit chatListFolder(int32 chat_folder_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 385760856;

  static object_ptr<ChatList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

/**
 * Contains a list of chat lists.
 */
class chatLists final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of chat lists.
  array<object_ptr<ChatList>> chat_lists_;
  static jfieldID chat_lists_fieldID;

  /**
   * Contains a list of chat lists.
   */
  chatLists();

  /**
   * Contains a list of chat lists.
   *
   * \param[in] chat_lists_ List of chat lists.
   */
  explicit chatLists(array<object_ptr<ChatList>> &&chat_lists_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -258292771;

  static object_ptr<chatLists> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class location;

/**
 * Represents a location to which a chat is connected.
 */
class chatLocation final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Location address; 1-64 characters, as defined by the chat owner.
  string address_;
  static jfieldID address_fieldID;

  /**
   * Represents a location to which a chat is connected.
   */
  chatLocation();

  /**
   * Represents a location to which a chat is connected.
   *
   * \param[in] location_ The location.
   * \param[in] address_ Location address; 1-64 characters, as defined by the chat owner.
   */
  chatLocation(object_ptr<location> &&location_, string const &address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1566863583;

  static object_ptr<chatLocation> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatMemberStatus;

class MessageSender;

/**
 * Describes a user or a chat as a member of another chat.
 */
class chatMember final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat member. Currently, other chats can be only Left or Banned. Only supergroups and channels can have other chats as Left or Banned members and these chats must be supergroups or channels.
  object_ptr<MessageSender> member_id_;
  static jfieldID member_id_fieldID;
  /// Tag of the chat member or its custom title if the member is an administrator of the chat; 0-16 characters without emoji; applicable to basic groups and supergroups only.
  string tag_;
  static jfieldID tag_fieldID;
  /// Identifier of a user who invited/promoted/banned this member in the chat; 0 if unknown.
  int53 inviter_user_id_;
  static jfieldID inviter_user_id_fieldID;
  /// Point in time (Unix timestamp) when the user joined/was promoted/was banned in the chat.
  int32 joined_chat_date_;
  static jfieldID joined_chat_date_fieldID;
  /// Status of the member in the chat.
  object_ptr<ChatMemberStatus> status_;
  static jfieldID status_fieldID;

  /**
   * Describes a user or a chat as a member of another chat.
   */
  chatMember();

  /**
   * Describes a user or a chat as a member of another chat.
   *
   * \param[in] member_id_ Identifier of the chat member. Currently, other chats can be only Left or Banned. Only supergroups and channels can have other chats as Left or Banned members and these chats must be supergroups or channels.
   * \param[in] tag_ Tag of the chat member or its custom title if the member is an administrator of the chat; 0-16 characters without emoji; applicable to basic groups and supergroups only.
   * \param[in] inviter_user_id_ Identifier of a user who invited/promoted/banned this member in the chat; 0 if unknown.
   * \param[in] joined_chat_date_ Point in time (Unix timestamp) when the user joined/was promoted/was banned in the chat.
   * \param[in] status_ Status of the member in the chat.
   */
  chatMember(object_ptr<MessageSender> &&member_id_, string const &tag_, int53 inviter_user_id_, int32 joined_chat_date_, object_ptr<ChatMemberStatus> &&status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1910810754;

  static object_ptr<chatMember> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatAdministratorRights;

class chatPermissions;

/**
 * This class is an abstract base class.
 * Provides information about the status of a member in a chat.
 */
class ChatMemberStatus: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is the owner of the chat and has all the administrator privileges.
 */
class chatMemberStatusCreator final : public ChatMemberStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only.
  bool is_anonymous_;
  static jfieldID is_anonymous_fieldID;
  /// True, if the user is a member of the chat.
  bool is_member_;
  static jfieldID is_member_fieldID;

  /**
   * The user is the owner of the chat and has all the administrator privileges.
   */
  chatMemberStatusCreator();

  /**
   * The user is the owner of the chat and has all the administrator privileges.
   *
   * \param[in] is_anonymous_ True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only.
   * \param[in] is_member_ True, if the user is a member of the chat.
   */
  chatMemberStatusCreator(bool is_anonymous_, bool is_member_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 877825117;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges.
 */
class chatMemberStatusAdministrator final : public ChatMemberStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the current user can edit the administrator privileges for the called user.
  bool can_be_edited_;
  static jfieldID can_be_edited_fieldID;
  /// Rights of the administrator.
  object_ptr<chatAdministratorRights> rights_;
  static jfieldID rights_fieldID;

  /**
   * The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges.
   */
  chatMemberStatusAdministrator();

  /**
   * The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges.
   *
   * \param[in] can_be_edited_ True, if the current user can edit the administrator privileges for the called user.
   * \param[in] rights_ Rights of the administrator.
   */
  chatMemberStatusAdministrator(bool can_be_edited_, object_ptr<chatAdministratorRights> &&rights_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -861316634;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is a member of the chat, without any additional privileges or restrictions.
 */
class chatMemberStatusMember final : public ChatMemberStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the user will be removed from the chat because of the expired subscription; 0 if never. Ignored in setChatMemberStatus.
  int32 member_until_date_;
  static jfieldID member_until_date_fieldID;

  /**
   * The user is a member of the chat, without any additional privileges or restrictions.
   */
  chatMemberStatusMember();

  /**
   * The user is a member of the chat, without any additional privileges or restrictions.
   *
   * \param[in] member_until_date_ Point in time (Unix timestamp) when the user will be removed from the chat because of the expired subscription; 0 if never. Ignored in setChatMemberStatus.
   */
  explicit chatMemberStatusMember(int32 member_until_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -32707562;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is under certain restrictions in the chat. Not supported in basic groups and channels.
 */
class chatMemberStatusRestricted final : public ChatMemberStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the user is a member of the chat.
  bool is_member_;
  static jfieldID is_member_fieldID;
  /// Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever.
  int32 restricted_until_date_;
  static jfieldID restricted_until_date_fieldID;
  /// User permissions in the chat.
  object_ptr<chatPermissions> permissions_;
  static jfieldID permissions_fieldID;

  /**
   * The user is under certain restrictions in the chat. Not supported in basic groups and channels.
   */
  chatMemberStatusRestricted();

  /**
   * The user is under certain restrictions in the chat. Not supported in basic groups and channels.
   *
   * \param[in] is_member_ True, if the user is a member of the chat.
   * \param[in] restricted_until_date_ Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever.
   * \param[in] permissions_ User permissions in the chat.
   */
  chatMemberStatusRestricted(bool is_member_, int32 restricted_until_date_, object_ptr<chatPermissions> &&permissions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1661432998;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user or the chat is not a chat member.
 */
class chatMemberStatusLeft final : public ChatMemberStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user or the chat is not a chat member.
   */
  chatMemberStatusLeft();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -5815259;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat.
 */
class chatMemberStatusBanned final : public ChatMemberStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups.
  int32 banned_until_date_;
  static jfieldID banned_until_date_fieldID;

  /**
   * The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat.
   */
  chatMemberStatusBanned();

  /**
   * The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat.
   *
   * \param[in] banned_until_date_ Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups.
   */
  explicit chatMemberStatusBanned(int32 banned_until_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1653518666;

  static object_ptr<ChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatMember;

/**
 * Contains a list of chat members.
 */
class chatMembers final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of chat members found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// A list of chat members.
  array<object_ptr<chatMember>> members_;
  static jfieldID members_fieldID;

  /**
   * Contains a list of chat members.
   */
  chatMembers();

  /**
   * Contains a list of chat members.
   *
   * \param[in] total_count_ Approximate total number of chat members found.
   * \param[in] members_ A list of chat members.
   */
  chatMembers(int32 total_count_, array<object_ptr<chatMember>> &&members_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -497558622;

  static object_ptr<chatMembers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

/**
 * This class is an abstract base class.
 * Specifies the kind of chat members to return in searchChatMembers.
 */
class ChatMembersFilter: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns contacts of the user.
 */
class chatMembersFilterContacts final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns contacts of the user.
   */
  chatMembersFilterContacts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1774485671;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns the owner and administrators.
 */
class chatMembersFilterAdministrators final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns the owner and administrators.
   */
  chatMembersFilterAdministrators();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1266893796;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns all chat members, including restricted chat members.
 */
class chatMembersFilterMembers final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns all chat members, including restricted chat members.
   */
  chatMembersFilterMembers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 670504342;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns users which can be mentioned in the chat.
 */
class chatMembersFilterMention final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the topic in which the users will be mentioned; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Returns users which can be mentioned in the chat.
   */
  chatMembersFilterMention();

  /**
   * Returns users which can be mentioned in the chat.
   *
   * \param[in] topic_id_ Identifier of the topic in which the users will be mentioned; pass null if none.
   */
  explicit chatMembersFilterMention(object_ptr<MessageTopic> &&topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1932296772;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup.
 */
class chatMembersFilterRestricted final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup.
   */
  chatMembersFilterRestricted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1256282813;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel.
 */
class chatMembersFilterBanned final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel.
   */
  chatMembersFilterBanned();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1863102648;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns bot members of the chat.
 */
class chatMembersFilterBots final : public ChatMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns bot members of the chat.
   */
  chatMembersFilterBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1422567288;

  static object_ptr<ChatMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Represents a message sender, which can be used to send messages in a chat.
 */
class chatMessageSender final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message sender.
  object_ptr<MessageSender> sender_;
  static jfieldID sender_fieldID;
  /// True, if Telegram Premium is needed to use the message sender.
  bool needs_premium_;
  static jfieldID needs_premium_fieldID;

  /**
   * Represents a message sender, which can be used to send messages in a chat.
   */
  chatMessageSender();

  /**
   * Represents a message sender, which can be used to send messages in a chat.
   *
   * \param[in] sender_ The message sender.
   * \param[in] needs_premium_ True, if Telegram Premium is needed to use the message sender.
   */
  chatMessageSender(object_ptr<MessageSender> &&sender_, bool needs_premium_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 760590010;

  static object_ptr<chatMessageSender> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatMessageSender;

/**
 * Represents a list of message senders, which can be used to send messages in a chat.
 */
class chatMessageSenders final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of available message senders.
  array<object_ptr<chatMessageSender>> senders_;
  static jfieldID senders_fieldID;

  /**
   * Represents a list of message senders, which can be used to send messages in a chat.
   */
  chatMessageSenders();

  /**
   * Represents a list of message senders, which can be used to send messages in a chat.
   *
   * \param[in] senders_ List of available message senders.
   */
  explicit chatMessageSenders(array<object_ptr<chatMessageSender>> &&senders_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1866230970;

  static object_ptr<chatMessageSenders> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about notification settings for a chat or a forum topic.
 */
class chatNotificationSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If true, the value for the relevant type of chat or the forum chat is used instead of mute_for.
  bool use_default_mute_for_;
  static jfieldID use_default_mute_for_fieldID;
  /// Time left before notifications will be unmuted, in seconds.
  int32 mute_for_;
  static jfieldID mute_for_fieldID;
  /// If true, the value for the relevant type of chat or the forum chat is used instead of sound_id.
  bool use_default_sound_;
  static jfieldID use_default_sound_fieldID;
  /// Identifier of the notification sound to be played for messages; 0 if sound is disabled.
  int64 sound_id_;
  static jfieldID sound_id_fieldID;
  /// If true, the value for the relevant type of chat or the forum chat is used instead of show_preview.
  bool use_default_show_preview_;
  static jfieldID use_default_show_preview_fieldID;
  /// True, if message content must be displayed in notifications.
  bool show_preview_;
  static jfieldID show_preview_fieldID;
  /// If true, the value for the relevant type of chat is used instead of mute_stories.
  bool use_default_mute_stories_;
  static jfieldID use_default_mute_stories_fieldID;
  /// True, if story notifications are disabled for the chat.
  bool mute_stories_;
  static jfieldID mute_stories_fieldID;
  /// If true, the value for the relevant type of chat is used instead of story_sound_id.
  bool use_default_story_sound_;
  static jfieldID use_default_story_sound_fieldID;
  /// Identifier of the notification sound to be played for stories; 0 if sound is disabled.
  int64 story_sound_id_;
  static jfieldID story_sound_id_fieldID;
  /// If true, the value for the relevant type of chat is used instead of show_story_poster.
  bool use_default_show_story_poster_;
  static jfieldID use_default_show_story_poster_fieldID;
  /// True, if the chat that posted a story must be displayed in notifications.
  bool show_story_poster_;
  static jfieldID show_story_poster_fieldID;
  /// If true, the value for the relevant type of chat or the forum chat is used instead of disable_pinned_message_notifications.
  bool use_default_disable_pinned_message_notifications_;
  static jfieldID use_default_disable_pinned_message_notifications_fieldID;
  /// If true, notifications for incoming pinned messages will be created as for an ordinary unread message.
  bool disable_pinned_message_notifications_;
  static jfieldID disable_pinned_message_notifications_fieldID;
  /// If true, the value for the relevant type of chat or the forum chat is used instead of disable_mention_notifications.
  bool use_default_disable_mention_notifications_;
  static jfieldID use_default_disable_mention_notifications_fieldID;
  /// If true, notifications for messages with mentions will be created as for an ordinary unread message.
  bool disable_mention_notifications_;
  static jfieldID disable_mention_notifications_fieldID;

  /**
   * Contains information about notification settings for a chat or a forum topic.
   */
  chatNotificationSettings();

  /**
   * Contains information about notification settings for a chat or a forum topic.
   *
   * \param[in] use_default_mute_for_ If true, the value for the relevant type of chat or the forum chat is used instead of mute_for.
   * \param[in] mute_for_ Time left before notifications will be unmuted, in seconds.
   * \param[in] use_default_sound_ If true, the value for the relevant type of chat or the forum chat is used instead of sound_id.
   * \param[in] sound_id_ Identifier of the notification sound to be played for messages; 0 if sound is disabled.
   * \param[in] use_default_show_preview_ If true, the value for the relevant type of chat or the forum chat is used instead of show_preview.
   * \param[in] show_preview_ True, if message content must be displayed in notifications.
   * \param[in] use_default_mute_stories_ If true, the value for the relevant type of chat is used instead of mute_stories.
   * \param[in] mute_stories_ True, if story notifications are disabled for the chat.
   * \param[in] use_default_story_sound_ If true, the value for the relevant type of chat is used instead of story_sound_id.
   * \param[in] story_sound_id_ Identifier of the notification sound to be played for stories; 0 if sound is disabled.
   * \param[in] use_default_show_story_poster_ If true, the value for the relevant type of chat is used instead of show_story_poster.
   * \param[in] show_story_poster_ True, if the chat that posted a story must be displayed in notifications.
   * \param[in] use_default_disable_pinned_message_notifications_ If true, the value for the relevant type of chat or the forum chat is used instead of disable_pinned_message_notifications.
   * \param[in] disable_pinned_message_notifications_ If true, notifications for incoming pinned messages will be created as for an ordinary unread message.
   * \param[in] use_default_disable_mention_notifications_ If true, the value for the relevant type of chat or the forum chat is used instead of disable_mention_notifications.
   * \param[in] disable_mention_notifications_ If true, notifications for messages with mentions will be created as for an ordinary unread message.
   */
  chatNotificationSettings(bool use_default_mute_for_, int32 mute_for_, bool use_default_sound_, int64 sound_id_, bool use_default_show_preview_, bool show_preview_, bool use_default_mute_stories_, bool mute_stories_, bool use_default_story_sound_, int64 story_sound_id_, bool use_default_show_story_poster_, bool show_story_poster_, bool use_default_disable_pinned_message_notifications_, bool disable_pinned_message_notifications_, bool use_default_disable_mention_notifications_, bool disable_mention_notifications_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1459533846;

  static object_ptr<chatNotificationSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes actions that a user is allowed to take in a chat.
 */
class chatPermissions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the user can send text messages, contacts, giveaways, giveaway winners, invoices, locations, and venues.
  bool can_send_basic_messages_;
  static jfieldID can_send_basic_messages_fieldID;
  /// True, if the user can send music files.
  bool can_send_audios_;
  static jfieldID can_send_audios_fieldID;
  /// True, if the user can send documents.
  bool can_send_documents_;
  static jfieldID can_send_documents_fieldID;
  /// True, if the user can send photos.
  bool can_send_photos_;
  static jfieldID can_send_photos_fieldID;
  /// True, if the user can send videos.
  bool can_send_videos_;
  static jfieldID can_send_videos_fieldID;
  /// True, if the user can send video notes.
  bool can_send_video_notes_;
  static jfieldID can_send_video_notes_fieldID;
  /// True, if the user can send voice notes.
  bool can_send_voice_notes_;
  static jfieldID can_send_voice_notes_fieldID;
  /// True, if the user can send polls and checklists.
  bool can_send_polls_;
  static jfieldID can_send_polls_fieldID;
  /// True, if the user can send animations, games, stickers, and dice and use inline bots.
  bool can_send_other_messages_;
  static jfieldID can_send_other_messages_fieldID;
  /// True, if the user may add a link preview to their messages.
  bool can_add_link_previews_;
  static jfieldID can_add_link_previews_fieldID;
  /// True, if the user can react to messages.
  bool can_react_to_messages_;
  static jfieldID can_react_to_messages_fieldID;
  /// True, if the user may change the tag of self.
  bool can_edit_tag_;
  static jfieldID can_edit_tag_fieldID;
  /// True, if the user can change the chat title, photo, and other settings.
  bool can_change_info_;
  static jfieldID can_change_info_fieldID;
  /// True, if the user can invite new users to the chat.
  bool can_invite_users_;
  static jfieldID can_invite_users_fieldID;
  /// True, if the user can pin messages.
  bool can_pin_messages_;
  static jfieldID can_pin_messages_fieldID;
  /// True, if the user can create topics.
  bool can_create_topics_;
  static jfieldID can_create_topics_fieldID;

  /**
   * Describes actions that a user is allowed to take in a chat.
   */
  chatPermissions();

  /**
   * Describes actions that a user is allowed to take in a chat.
   *
   * \param[in] can_send_basic_messages_ True, if the user can send text messages, contacts, giveaways, giveaway winners, invoices, locations, and venues.
   * \param[in] can_send_audios_ True, if the user can send music files.
   * \param[in] can_send_documents_ True, if the user can send documents.
   * \param[in] can_send_photos_ True, if the user can send photos.
   * \param[in] can_send_videos_ True, if the user can send videos.
   * \param[in] can_send_video_notes_ True, if the user can send video notes.
   * \param[in] can_send_voice_notes_ True, if the user can send voice notes.
   * \param[in] can_send_polls_ True, if the user can send polls and checklists.
   * \param[in] can_send_other_messages_ True, if the user can send animations, games, stickers, and dice and use inline bots.
   * \param[in] can_add_link_previews_ True, if the user may add a link preview to their messages.
   * \param[in] can_react_to_messages_ True, if the user can react to messages.
   * \param[in] can_edit_tag_ True, if the user may change the tag of self.
   * \param[in] can_change_info_ True, if the user can change the chat title, photo, and other settings.
   * \param[in] can_invite_users_ True, if the user can invite new users to the chat.
   * \param[in] can_pin_messages_ True, if the user can pin messages.
   * \param[in] can_create_topics_ True, if the user can create topics.
   */
  chatPermissions(bool can_send_basic_messages_, bool can_send_audios_, bool can_send_documents_, bool can_send_photos_, bool can_send_videos_, bool can_send_video_notes_, bool can_send_voice_notes_, bool can_send_polls_, bool can_send_other_messages_, bool can_add_link_previews_, bool can_react_to_messages_, bool can_edit_tag_, bool can_change_info_, bool can_invite_users_, bool can_pin_messages_, bool can_create_topics_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2007710412;

  static object_ptr<chatPermissions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class animatedChatPhoto;

class chatPhotoSticker;

class minithumbnail;

class photoSize;

/**
 * Describes a chat or user profile photo.
 */
class chatPhoto final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique photo identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Point in time (Unix timestamp) when the photo has been added.
  int32 added_date_;
  static jfieldID added_date_fieldID;
  /// Photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Available variants of the photo in JPEG format, in different size.
  array<object_ptr<photoSize>> sizes_;
  static jfieldID sizes_fieldID;
  /// A big (up to 1280x1280) animated variant of the photo in MPEG4 format; may be null.
  object_ptr<animatedChatPhoto> animation_;
  static jfieldID animation_fieldID;
  /// A small (160x160) animated variant of the photo in MPEG4 format; may be null even if the big animation is available.
  object_ptr<animatedChatPhoto> small_animation_;
  static jfieldID small_animation_fieldID;
  /// Sticker-based version of the chat photo; may be null.
  object_ptr<chatPhotoSticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Describes a chat or user profile photo.
   */
  chatPhoto();

  /**
   * Describes a chat or user profile photo.
   *
   * \param[in] id_ Unique photo identifier.
   * \param[in] added_date_ Point in time (Unix timestamp) when the photo has been added.
   * \param[in] minithumbnail_ Photo minithumbnail; may be null.
   * \param[in] sizes_ Available variants of the photo in JPEG format, in different size.
   * \param[in] animation_ A big (up to 1280x1280) animated variant of the photo in MPEG4 format; may be null.
   * \param[in] small_animation_ A small (160x160) animated variant of the photo in MPEG4 format; may be null even if the big animation is available.
   * \param[in] sticker_ Sticker-based version of the chat photo; may be null.
   */
  chatPhoto(int64 id_, int32 added_date_, object_ptr<minithumbnail> &&minithumbnail_, array<object_ptr<photoSize>> &&sizes_, object_ptr<animatedChatPhoto> &&animation_, object_ptr<animatedChatPhoto> &&small_animation_, object_ptr<chatPhotoSticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1430870201;

  static object_ptr<chatPhoto> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

/**
 * Contains basic information about the photo of a chat.
 */
class chatPhotoInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed.
  object_ptr<file> small_;
  static jfieldID small_fieldID;
  /// A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed.
  object_ptr<file> big_;
  static jfieldID big_fieldID;
  /// Chat photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// True, if the photo has animated variant.
  bool has_animation_;
  static jfieldID has_animation_fieldID;
  /// True, if the photo is visible only for the current user.
  bool is_personal_;
  static jfieldID is_personal_fieldID;

  /**
   * Contains basic information about the photo of a chat.
   */
  chatPhotoInfo();

  /**
   * Contains basic information about the photo of a chat.
   *
   * \param[in] small_ A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed.
   * \param[in] big_ A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed.
   * \param[in] minithumbnail_ Chat photo minithumbnail; may be null.
   * \param[in] has_animation_ True, if the photo has animated variant.
   * \param[in] is_personal_ True, if the photo is visible only for the current user.
   */
  chatPhotoInfo(object_ptr<file> &&small_, object_ptr<file> &&big_, object_ptr<minithumbnail> &&minithumbnail_, bool has_animation_, bool is_personal_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 281195686;

  static object_ptr<chatPhotoInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundFill;

class ChatPhotoStickerType;

/**
 * Information about the sticker, which was used to create the chat photo. The sticker is shown at the center of the photo and occupies at most 67% of it.
 */
class chatPhotoSticker final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker.
  object_ptr<ChatPhotoStickerType> type_;
  static jfieldID type_fieldID;
  /// The fill to be used as background for the sticker; rotation angle in backgroundFillGradient isn't supported.
  object_ptr<BackgroundFill> background_fill_;
  static jfieldID background_fill_fieldID;

  /**
   * Information about the sticker, which was used to create the chat photo. The sticker is shown at the center of the photo and occupies at most 67% of it.
   */
  chatPhotoSticker();

  /**
   * Information about the sticker, which was used to create the chat photo. The sticker is shown at the center of the photo and occupies at most 67% of it.
   *
   * \param[in] type_ Type of the sticker.
   * \param[in] background_fill_ The fill to be used as background for the sticker; rotation angle in backgroundFillGradient isn't supported.
   */
  chatPhotoSticker(object_ptr<ChatPhotoStickerType> &&type_, object_ptr<BackgroundFill> &&background_fill_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1459387485;

  static object_ptr<chatPhotoSticker> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of sticker, which was used to create a chat photo.
 */
class ChatPhotoStickerType: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatPhotoStickerType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about the sticker, which was used to create the chat photo.
 */
class chatPhotoStickerTypeRegularOrMask final : public ChatPhotoStickerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set identifier.
  int64 sticker_set_id_;
  static jfieldID sticker_set_id_fieldID;
  /// Identifier of the sticker in the set.
  int64 sticker_id_;
  static jfieldID sticker_id_fieldID;

  /**
   * Information about the sticker, which was used to create the chat photo.
   */
  chatPhotoStickerTypeRegularOrMask();

  /**
   * Information about the sticker, which was used to create the chat photo.
   *
   * \param[in] sticker_set_id_ Sticker set identifier.
   * \param[in] sticker_id_ Identifier of the sticker in the set.
   */
  chatPhotoStickerTypeRegularOrMask(int64 sticker_set_id_, int64 sticker_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -415147620;

  static object_ptr<ChatPhotoStickerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about the custom emoji, which was used to create the chat photo.
 */
class chatPhotoStickerTypeCustomEmoji final : public ChatPhotoStickerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the custom emoji.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * Information about the custom emoji, which was used to create the chat photo.
   */
  chatPhotoStickerTypeCustomEmoji();

  /**
   * Information about the custom emoji, which was used to create the chat photo.
   *
   * \param[in] custom_emoji_id_ Identifier of the custom emoji.
   */
  explicit chatPhotoStickerTypeCustomEmoji(int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -266224943;

  static object_ptr<ChatPhotoStickerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatPhoto;

/**
 * Contains a list of chat or user profile photos.
 */
class chatPhotos final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of photos.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of photos.
  array<object_ptr<chatPhoto>> photos_;
  static jfieldID photos_fieldID;

  /**
   * Contains a list of chat or user profile photos.
   */
  chatPhotos();

  /**
   * Contains a list of chat or user profile photos.
   *
   * \param[in] total_count_ Total number of photos.
   * \param[in] photos_ List of photos.
   */
  chatPhotos(int32 total_count_, array<object_ptr<chatPhoto>> &&photos_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1510699180;

  static object_ptr<chatPhotos> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class ChatSource;

/**
 * Describes a position of a chat in a chat list.
 */
class chatPosition final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat list.
  object_ptr<ChatList> list_;
  static jfieldID list_fieldID;
  /// A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order.
  int64 order_;
  static jfieldID order_fieldID;
  /// True, if the chat is pinned in the chat list.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;
  /// Source of the chat in the chat list; may be null.
  object_ptr<ChatSource> source_;
  static jfieldID source_fieldID;

  /**
   * Describes a position of a chat in a chat list.
   */
  chatPosition();

  /**
   * Describes a position of a chat in a chat list.
   *
   * \param[in] list_ The chat list.
   * \param[in] order_ A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order.
   * \param[in] is_pinned_ True, if the chat is pinned in the chat list.
   * \param[in] source_ Source of the chat in the chat list; may be null.
   */
  chatPosition(object_ptr<ChatList> &&list_, int64 order_, bool is_pinned_, object_ptr<ChatSource> &&source_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -622557355;

  static object_ptr<chatPosition> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about revenue earned from sponsored messages in a chat.
 */
class chatRevenueAmount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Cryptocurrency in which revenue is calculated.
  string cryptocurrency_;
  static jfieldID cryptocurrency_fieldID;
  /// Total amount of the cryptocurrency earned, in the smallest units of the cryptocurrency.
  int64 total_amount_;
  static jfieldID total_amount_fieldID;
  /// Amount of the cryptocurrency that isn't withdrawn yet, in the smallest units of the cryptocurrency.
  int64 balance_amount_;
  static jfieldID balance_amount_fieldID;
  /// Amount of the cryptocurrency available for withdrawal, in the smallest units of the cryptocurrency.
  int64 available_amount_;
  static jfieldID available_amount_fieldID;
  /// True, if Telegram Stars can be withdrawn now or later.
  bool withdrawal_enabled_;
  static jfieldID withdrawal_enabled_fieldID;

  /**
   * Contains information about revenue earned from sponsored messages in a chat.
   */
  chatRevenueAmount();

  /**
   * Contains information about revenue earned from sponsored messages in a chat.
   *
   * \param[in] cryptocurrency_ Cryptocurrency in which revenue is calculated.
   * \param[in] total_amount_ Total amount of the cryptocurrency earned, in the smallest units of the cryptocurrency.
   * \param[in] balance_amount_ Amount of the cryptocurrency that isn't withdrawn yet, in the smallest units of the cryptocurrency.
   * \param[in] available_amount_ Amount of the cryptocurrency available for withdrawal, in the smallest units of the cryptocurrency.
   * \param[in] withdrawal_enabled_ True, if Telegram Stars can be withdrawn now or later.
   */
  chatRevenueAmount(string const &cryptocurrency_, int64 total_amount_, int64 balance_amount_, int64 available_amount_, bool withdrawal_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1505178024;

  static object_ptr<chatRevenueAmount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

class chatRevenueAmount;

/**
 * A detailed statistics about revenue earned from sponsored messages in a chat.
 */
class chatRevenueStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A graph containing amount of revenue in a given hour.
  object_ptr<StatisticalGraph> revenue_by_hour_graph_;
  static jfieldID revenue_by_hour_graph_fieldID;
  /// A graph containing amount of revenue.
  object_ptr<StatisticalGraph> revenue_graph_;
  static jfieldID revenue_graph_fieldID;
  /// Amount of earned revenue.
  object_ptr<chatRevenueAmount> revenue_amount_;
  static jfieldID revenue_amount_fieldID;
  /// Current conversion rate of the cryptocurrency in which revenue is calculated to USD.
  double usd_rate_;
  static jfieldID usd_rate_fieldID;

  /**
   * A detailed statistics about revenue earned from sponsored messages in a chat.
   */
  chatRevenueStatistics();

  /**
   * A detailed statistics about revenue earned from sponsored messages in a chat.
   *
   * \param[in] revenue_by_hour_graph_ A graph containing amount of revenue in a given hour.
   * \param[in] revenue_graph_ A graph containing amount of revenue.
   * \param[in] revenue_amount_ Amount of earned revenue.
   * \param[in] usd_rate_ Current conversion rate of the cryptocurrency in which revenue is calculated to USD.
   */
  chatRevenueStatistics(object_ptr<StatisticalGraph> &&revenue_by_hour_graph_, object_ptr<StatisticalGraph> &&revenue_graph_, object_ptr<chatRevenueAmount> &&revenue_amount_, double usd_rate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1667438779;

  static object_ptr<chatRevenueStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatRevenueTransactionType;

/**
 * Contains a chat revenue transactions.
 */
class chatRevenueTransaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Cryptocurrency in which revenue is calculated.
  string cryptocurrency_;
  static jfieldID cryptocurrency_fieldID;
  /// The withdrawn amount, in the smallest units of the cryptocurrency.
  int64 cryptocurrency_amount_;
  static jfieldID cryptocurrency_amount_fieldID;
  /// Type of the transaction.
  object_ptr<ChatRevenueTransactionType> type_;
  static jfieldID type_fieldID;

  /**
   * Contains a chat revenue transactions.
   */
  chatRevenueTransaction();

  /**
   * Contains a chat revenue transactions.
   *
   * \param[in] cryptocurrency_ Cryptocurrency in which revenue is calculated.
   * \param[in] cryptocurrency_amount_ The withdrawn amount, in the smallest units of the cryptocurrency.
   * \param[in] type_ Type of the transaction.
   */
  chatRevenueTransaction(string const &cryptocurrency_, int64 cryptocurrency_amount_, object_ptr<ChatRevenueTransactionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 80192767;

  static object_ptr<chatRevenueTransaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class RevenueWithdrawalState;

/**
 * This class is an abstract base class.
 * Describes type of transaction for revenue earned from sponsored messages in a chat.
 */
class ChatRevenueTransactionType: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatRevenueTransactionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an unsupported transaction.
 */
class chatRevenueTransactionTypeUnsupported final : public ChatRevenueTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Describes an unsupported transaction.
   */
  chatRevenueTransactionTypeUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -27518756;

  static object_ptr<ChatRevenueTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes earnings from sponsored messages in a chat in some time frame.
 */
class chatRevenueTransactionTypeSponsoredMessageEarnings final : public ChatRevenueTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the earnings started.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) when the earnings ended.
  int32 end_date_;
  static jfieldID end_date_fieldID;

  /**
   * Describes earnings from sponsored messages in a chat in some time frame.
   */
  chatRevenueTransactionTypeSponsoredMessageEarnings();

  /**
   * Describes earnings from sponsored messages in a chat in some time frame.
   *
   * \param[in] start_date_ Point in time (Unix timestamp) when the earnings started.
   * \param[in] end_date_ Point in time (Unix timestamp) when the earnings ended.
   */
  chatRevenueTransactionTypeSponsoredMessageEarnings(int32 start_date_, int32 end_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1907391317;

  static object_ptr<ChatRevenueTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes earnings from a published suggested post.
 */
class chatRevenueTransactionTypeSuggestedPostEarnings final : public ChatRevenueTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who paid for the suggested post.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Describes earnings from a published suggested post.
   */
  chatRevenueTransactionTypeSuggestedPostEarnings();

  /**
   * Describes earnings from a published suggested post.
   *
   * \param[in] user_id_ Identifier of the user who paid for the suggested post.
   */
  explicit chatRevenueTransactionTypeSuggestedPostEarnings(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1252049103;

  static object_ptr<ChatRevenueTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a withdrawal of earnings through Fragment.
 */
class chatRevenueTransactionTypeFragmentWithdrawal final : public ChatRevenueTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the earnings withdrawal started.
  int32 withdrawal_date_;
  static jfieldID withdrawal_date_fieldID;
  /// State of the withdrawal.
  object_ptr<RevenueWithdrawalState> state_;
  static jfieldID state_fieldID;

  /**
   * Describes a withdrawal of earnings through Fragment.
   */
  chatRevenueTransactionTypeFragmentWithdrawal();

  /**
   * Describes a withdrawal of earnings through Fragment.
   *
   * \param[in] withdrawal_date_ Point in time (Unix timestamp) when the earnings withdrawal started.
   * \param[in] state_ State of the withdrawal.
   */
  chatRevenueTransactionTypeFragmentWithdrawal(int32 withdrawal_date_, object_ptr<RevenueWithdrawalState> &&state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 327153867;

  static object_ptr<ChatRevenueTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a refund for failed withdrawal of earnings through Fragment.
 */
class chatRevenueTransactionTypeFragmentRefund final : public ChatRevenueTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the transaction was refunded.
  int32 refund_date_;
  static jfieldID refund_date_fieldID;

  /**
   * Describes a refund for failed withdrawal of earnings through Fragment.
   */
  chatRevenueTransactionTypeFragmentRefund();

  /**
   * Describes a refund for failed withdrawal of earnings through Fragment.
   *
   * \param[in] refund_date_ Point in time (Unix timestamp) when the transaction was refunded.
   */
  explicit chatRevenueTransactionTypeFragmentRefund(int32 refund_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1488694273;

  static object_ptr<ChatRevenueTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatRevenueTransaction;

/**
 * Contains a list of chat revenue transactions.
 */
class chatRevenueTransactions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The amount of owned Toncoins; in the smallest units of the cryptocurrency.
  int53 ton_amount_;
  static jfieldID ton_amount_fieldID;
  /// List of transactions.
  array<object_ptr<chatRevenueTransaction>> transactions_;
  static jfieldID transactions_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Contains a list of chat revenue transactions.
   */
  chatRevenueTransactions();

  /**
   * Contains a list of chat revenue transactions.
   *
   * \param[in] ton_amount_ The amount of owned Toncoins; in the smallest units of the cryptocurrency.
   * \param[in] transactions_ List of transactions.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  chatRevenueTransactions(int53 ton_amount_, array<object_ptr<chatRevenueTransaction>> &&transactions_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2017122771;

  static object_ptr<chatRevenueTransactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a reason why an external chat is shown in a chat list.
 */
class ChatSource: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is sponsored by the user's MTProxy server.
 */
class chatSourceMtprotoProxy final : public ChatSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat is sponsored by the user's MTProxy server.
   */
  chatSourceMtprotoProxy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 394074115;

  static object_ptr<ChatSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat contains a public service announcement.
 */
class chatSourcePublicServiceAnnouncement final : public ChatSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The type of the announcement.
  string type_;
  static jfieldID type_fieldID;
  /// The text of the announcement.
  string text_;
  static jfieldID text_fieldID;

  /**
   * The chat contains a public service announcement.
   */
  chatSourcePublicServiceAnnouncement();

  /**
   * The chat contains a public service announcement.
   *
   * \param[in] type_ The type of the announcement.
   * \param[in] text_ The text of the announcement.
   */
  chatSourcePublicServiceAnnouncement(string const &type_, string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -328571244;

  static object_ptr<ChatSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

class chatStatisticsAdministratorActionsInfo;

class chatStatisticsInteractionInfo;

class chatStatisticsInviterInfo;

class chatStatisticsMessageSenderInfo;

class dateRange;

class statisticalValue;

/**
 * This class is an abstract base class.
 * Contains a detailed statistics about a chat.
 */
class ChatStatistics: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatStatistics> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A detailed statistics about a supergroup chat.
 */
class chatStatisticsSupergroup final : public ChatStatistics {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A period to which the statistics applies.
  object_ptr<dateRange> period_;
  static jfieldID period_fieldID;
  /// Number of members in the chat.
  object_ptr<statisticalValue> member_count_;
  static jfieldID member_count_fieldID;
  /// Number of messages sent to the chat.
  object_ptr<statisticalValue> message_count_;
  static jfieldID message_count_fieldID;
  /// Number of users who viewed messages in the chat.
  object_ptr<statisticalValue> viewer_count_;
  static jfieldID viewer_count_fieldID;
  /// Number of users who sent messages to the chat.
  object_ptr<statisticalValue> sender_count_;
  static jfieldID sender_count_fieldID;
  /// A graph containing number of members in the chat.
  object_ptr<StatisticalGraph> member_count_graph_;
  static jfieldID member_count_graph_fieldID;
  /// A graph containing number of members joined and left the chat.
  object_ptr<StatisticalGraph> join_graph_;
  static jfieldID join_graph_fieldID;
  /// A graph containing number of new member joins per source.
  object_ptr<StatisticalGraph> join_by_source_graph_;
  static jfieldID join_by_source_graph_fieldID;
  /// A graph containing distribution of active users per language.
  object_ptr<StatisticalGraph> language_graph_;
  static jfieldID language_graph_fieldID;
  /// A graph containing distribution of sent messages by content type.
  object_ptr<StatisticalGraph> message_content_graph_;
  static jfieldID message_content_graph_fieldID;
  /// A graph containing number of different actions in the chat.
  object_ptr<StatisticalGraph> action_graph_;
  static jfieldID action_graph_fieldID;
  /// A graph containing distribution of message views per hour.
  object_ptr<StatisticalGraph> day_graph_;
  static jfieldID day_graph_fieldID;
  /// A graph containing distribution of message views per day of week.
  object_ptr<StatisticalGraph> week_graph_;
  static jfieldID week_graph_fieldID;
  /// List of users sent most messages in the last week.
  array<object_ptr<chatStatisticsMessageSenderInfo>> top_senders_;
  static jfieldID top_senders_fieldID;
  /// List of most active administrators in the last week.
  array<object_ptr<chatStatisticsAdministratorActionsInfo>> top_administrators_;
  static jfieldID top_administrators_fieldID;
  /// List of most active inviters of new members in the last week.
  array<object_ptr<chatStatisticsInviterInfo>> top_inviters_;
  static jfieldID top_inviters_fieldID;

  /**
   * A detailed statistics about a supergroup chat.
   */
  chatStatisticsSupergroup();

  /**
   * A detailed statistics about a supergroup chat.
   *
   * \param[in] period_ A period to which the statistics applies.
   * \param[in] member_count_ Number of members in the chat.
   * \param[in] message_count_ Number of messages sent to the chat.
   * \param[in] viewer_count_ Number of users who viewed messages in the chat.
   * \param[in] sender_count_ Number of users who sent messages to the chat.
   * \param[in] member_count_graph_ A graph containing number of members in the chat.
   * \param[in] join_graph_ A graph containing number of members joined and left the chat.
   * \param[in] join_by_source_graph_ A graph containing number of new member joins per source.
   * \param[in] language_graph_ A graph containing distribution of active users per language.
   * \param[in] message_content_graph_ A graph containing distribution of sent messages by content type.
   * \param[in] action_graph_ A graph containing number of different actions in the chat.
   * \param[in] day_graph_ A graph containing distribution of message views per hour.
   * \param[in] week_graph_ A graph containing distribution of message views per day of week.
   * \param[in] top_senders_ List of users sent most messages in the last week.
   * \param[in] top_administrators_ List of most active administrators in the last week.
   * \param[in] top_inviters_ List of most active inviters of new members in the last week.
   */
  chatStatisticsSupergroup(object_ptr<dateRange> &&period_, object_ptr<statisticalValue> &&member_count_, object_ptr<statisticalValue> &&message_count_, object_ptr<statisticalValue> &&viewer_count_, object_ptr<statisticalValue> &&sender_count_, object_ptr<StatisticalGraph> &&member_count_graph_, object_ptr<StatisticalGraph> &&join_graph_, object_ptr<StatisticalGraph> &&join_by_source_graph_, object_ptr<StatisticalGraph> &&language_graph_, object_ptr<StatisticalGraph> &&message_content_graph_, object_ptr<StatisticalGraph> &&action_graph_, object_ptr<StatisticalGraph> &&day_graph_, object_ptr<StatisticalGraph> &&week_graph_, array<object_ptr<chatStatisticsMessageSenderInfo>> &&top_senders_, array<object_ptr<chatStatisticsAdministratorActionsInfo>> &&top_administrators_, array<object_ptr<chatStatisticsInviterInfo>> &&top_inviters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -17244633;

  static object_ptr<ChatStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A detailed statistics about a channel chat.
 */
class chatStatisticsChannel final : public ChatStatistics {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A period to which the statistics applies.
  object_ptr<dateRange> period_;
  static jfieldID period_fieldID;
  /// Number of members in the chat.
  object_ptr<statisticalValue> member_count_;
  static jfieldID member_count_fieldID;
  /// Mean number of times the recently sent messages were viewed.
  object_ptr<statisticalValue> mean_message_view_count_;
  static jfieldID mean_message_view_count_fieldID;
  /// Mean number of times the recently sent messages were shared.
  object_ptr<statisticalValue> mean_message_share_count_;
  static jfieldID mean_message_share_count_fieldID;
  /// Mean number of times reactions were added to the recently sent messages.
  object_ptr<statisticalValue> mean_message_reaction_count_;
  static jfieldID mean_message_reaction_count_fieldID;
  /// Mean number of times the recently posted stories were viewed.
  object_ptr<statisticalValue> mean_story_view_count_;
  static jfieldID mean_story_view_count_fieldID;
  /// Mean number of times the recently posted stories were shared.
  object_ptr<statisticalValue> mean_story_share_count_;
  static jfieldID mean_story_share_count_fieldID;
  /// Mean number of times reactions were added to the recently posted stories.
  object_ptr<statisticalValue> mean_story_reaction_count_;
  static jfieldID mean_story_reaction_count_fieldID;
  /// A percentage of users with enabled notifications for the chat; 0-100.
  double enabled_notifications_percentage_;
  static jfieldID enabled_notifications_percentage_fieldID;
  /// A graph containing number of members in the chat.
  object_ptr<StatisticalGraph> member_count_graph_;
  static jfieldID member_count_graph_fieldID;
  /// A graph containing number of members joined and left the chat.
  object_ptr<StatisticalGraph> join_graph_;
  static jfieldID join_graph_fieldID;
  /// A graph containing number of members muted and unmuted the chat.
  object_ptr<StatisticalGraph> mute_graph_;
  static jfieldID mute_graph_fieldID;
  /// A graph containing number of message views in a given hour in the last two weeks.
  object_ptr<StatisticalGraph> view_count_by_hour_graph_;
  static jfieldID view_count_by_hour_graph_fieldID;
  /// A graph containing number of message views per source.
  object_ptr<StatisticalGraph> view_count_by_source_graph_;
  static jfieldID view_count_by_source_graph_fieldID;
  /// A graph containing number of new member joins per source.
  object_ptr<StatisticalGraph> join_by_source_graph_;
  static jfieldID join_by_source_graph_fieldID;
  /// A graph containing number of users viewed chat messages per language.
  object_ptr<StatisticalGraph> language_graph_;
  static jfieldID language_graph_fieldID;
  /// A graph containing number of chat message views and shares.
  object_ptr<StatisticalGraph> message_interaction_graph_;
  static jfieldID message_interaction_graph_fieldID;
  /// A graph containing number of reactions on messages.
  object_ptr<StatisticalGraph> message_reaction_graph_;
  static jfieldID message_reaction_graph_fieldID;
  /// A graph containing number of story views and shares.
  object_ptr<StatisticalGraph> story_interaction_graph_;
  static jfieldID story_interaction_graph_fieldID;
  /// A graph containing number of reactions on stories.
  object_ptr<StatisticalGraph> story_reaction_graph_;
  static jfieldID story_reaction_graph_fieldID;
  /// A graph containing number of views of associated with the chat instant views.
  object_ptr<StatisticalGraph> instant_view_interaction_graph_;
  static jfieldID instant_view_interaction_graph_fieldID;
  /// Detailed statistics about number of views and shares of recently sent messages and posted stories.
  array<object_ptr<chatStatisticsInteractionInfo>> recent_interactions_;
  static jfieldID recent_interactions_fieldID;

  /**
   * A detailed statistics about a channel chat.
   */
  chatStatisticsChannel();

  /**
   * A detailed statistics about a channel chat.
   *
   * \param[in] period_ A period to which the statistics applies.
   * \param[in] member_count_ Number of members in the chat.
   * \param[in] mean_message_view_count_ Mean number of times the recently sent messages were viewed.
   * \param[in] mean_message_share_count_ Mean number of times the recently sent messages were shared.
   * \param[in] mean_message_reaction_count_ Mean number of times reactions were added to the recently sent messages.
   * \param[in] mean_story_view_count_ Mean number of times the recently posted stories were viewed.
   * \param[in] mean_story_share_count_ Mean number of times the recently posted stories were shared.
   * \param[in] mean_story_reaction_count_ Mean number of times reactions were added to the recently posted stories.
   * \param[in] enabled_notifications_percentage_ A percentage of users with enabled notifications for the chat; 0-100.
   * \param[in] member_count_graph_ A graph containing number of members in the chat.
   * \param[in] join_graph_ A graph containing number of members joined and left the chat.
   * \param[in] mute_graph_ A graph containing number of members muted and unmuted the chat.
   * \param[in] view_count_by_hour_graph_ A graph containing number of message views in a given hour in the last two weeks.
   * \param[in] view_count_by_source_graph_ A graph containing number of message views per source.
   * \param[in] join_by_source_graph_ A graph containing number of new member joins per source.
   * \param[in] language_graph_ A graph containing number of users viewed chat messages per language.
   * \param[in] message_interaction_graph_ A graph containing number of chat message views and shares.
   * \param[in] message_reaction_graph_ A graph containing number of reactions on messages.
   * \param[in] story_interaction_graph_ A graph containing number of story views and shares.
   * \param[in] story_reaction_graph_ A graph containing number of reactions on stories.
   * \param[in] instant_view_interaction_graph_ A graph containing number of views of associated with the chat instant views.
   * \param[in] recent_interactions_ Detailed statistics about number of views and shares of recently sent messages and posted stories.
   */
  chatStatisticsChannel(object_ptr<dateRange> &&period_, object_ptr<statisticalValue> &&member_count_, object_ptr<statisticalValue> &&mean_message_view_count_, object_ptr<statisticalValue> &&mean_message_share_count_, object_ptr<statisticalValue> &&mean_message_reaction_count_, object_ptr<statisticalValue> &&mean_story_view_count_, object_ptr<statisticalValue> &&mean_story_share_count_, object_ptr<statisticalValue> &&mean_story_reaction_count_, double enabled_notifications_percentage_, object_ptr<StatisticalGraph> &&member_count_graph_, object_ptr<StatisticalGraph> &&join_graph_, object_ptr<StatisticalGraph> &&mute_graph_, object_ptr<StatisticalGraph> &&view_count_by_hour_graph_, object_ptr<StatisticalGraph> &&view_count_by_source_graph_, object_ptr<StatisticalGraph> &&join_by_source_graph_, object_ptr<StatisticalGraph> &&language_graph_, object_ptr<StatisticalGraph> &&message_interaction_graph_, object_ptr<StatisticalGraph> &&message_reaction_graph_, object_ptr<StatisticalGraph> &&story_interaction_graph_, object_ptr<StatisticalGraph> &&story_reaction_graph_, object_ptr<StatisticalGraph> &&instant_view_interaction_graph_, array<object_ptr<chatStatisticsInteractionInfo>> &&recent_interactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1375151660;

  static object_ptr<ChatStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains statistics about administrator actions done by a user.
 */
class chatStatisticsAdministratorActionsInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Administrator user identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Number of messages deleted by the administrator.
  int32 deleted_message_count_;
  static jfieldID deleted_message_count_fieldID;
  /// Number of users banned by the administrator.
  int32 banned_user_count_;
  static jfieldID banned_user_count_fieldID;
  /// Number of users restricted by the administrator.
  int32 restricted_user_count_;
  static jfieldID restricted_user_count_fieldID;

  /**
   * Contains statistics about administrator actions done by a user.
   */
  chatStatisticsAdministratorActionsInfo();

  /**
   * Contains statistics about administrator actions done by a user.
   *
   * \param[in] user_id_ Administrator user identifier.
   * \param[in] deleted_message_count_ Number of messages deleted by the administrator.
   * \param[in] banned_user_count_ Number of users banned by the administrator.
   * \param[in] restricted_user_count_ Number of users restricted by the administrator.
   */
  chatStatisticsAdministratorActionsInfo(int53 user_id_, int32 deleted_message_count_, int32 banned_user_count_, int32 restricted_user_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -406467202;

  static object_ptr<chatStatisticsAdministratorActionsInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ChatStatisticsObjectType;

/**
 * Contains statistics about interactions with a message sent in the chat or a story posted on behalf of the chat.
 */
class chatStatisticsInteractionInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the object.
  object_ptr<ChatStatisticsObjectType> object_type_;
  static jfieldID object_type_fieldID;
  /// Number of times the object was viewed.
  int32 view_count_;
  static jfieldID view_count_fieldID;
  /// Number of times the object was forwarded.
  int32 forward_count_;
  static jfieldID forward_count_fieldID;
  /// Number of times reactions were added to the object.
  int32 reaction_count_;
  static jfieldID reaction_count_fieldID;

  /**
   * Contains statistics about interactions with a message sent in the chat or a story posted on behalf of the chat.
   */
  chatStatisticsInteractionInfo();

  /**
   * Contains statistics about interactions with a message sent in the chat or a story posted on behalf of the chat.
   *
   * \param[in] object_type_ Type of the object.
   * \param[in] view_count_ Number of times the object was viewed.
   * \param[in] forward_count_ Number of times the object was forwarded.
   * \param[in] reaction_count_ Number of times reactions were added to the object.
   */
  chatStatisticsInteractionInfo(object_ptr<ChatStatisticsObjectType> &&object_type_, int32 view_count_, int32 forward_count_, int32 reaction_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1766496909;

  static object_ptr<chatStatisticsInteractionInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains statistics about number of new members invited by a user.
 */
class chatStatisticsInviterInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Number of new members invited by the user.
  int32 added_member_count_;
  static jfieldID added_member_count_fieldID;

  /**
   * Contains statistics about number of new members invited by a user.
   */
  chatStatisticsInviterInfo();

  /**
   * Contains statistics about number of new members invited by a user.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] added_member_count_ Number of new members invited by the user.
   */
  chatStatisticsInviterInfo(int53 user_id_, int32 added_member_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 629396619;

  static object_ptr<chatStatisticsInviterInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains statistics about messages sent by a user.
 */
class chatStatisticsMessageSenderInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Number of sent messages.
  int32 sent_message_count_;
  static jfieldID sent_message_count_fieldID;
  /// Average number of characters in sent messages; 0 if unknown.
  int32 average_character_count_;
  static jfieldID average_character_count_fieldID;

  /**
   * Contains statistics about messages sent by a user.
   */
  chatStatisticsMessageSenderInfo();

  /**
   * Contains statistics about messages sent by a user.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] sent_message_count_ Number of sent messages.
   * \param[in] average_character_count_ Average number of characters in sent messages; 0 if unknown.
   */
  chatStatisticsMessageSenderInfo(int53 user_id_, int32 sent_message_count_, int32 average_character_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1762295371;

  static object_ptr<chatStatisticsMessageSenderInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of object, for which statistics are provided.
 */
class ChatStatisticsObjectType: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatStatisticsObjectType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a message sent in the chat.
 */
class chatStatisticsObjectTypeMessage final : public ChatStatisticsObjectType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Describes a message sent in the chat.
   */
  chatStatisticsObjectTypeMessage();

  /**
   * Describes a message sent in the chat.
   *
   * \param[in] message_id_ Message identifier.
   */
  explicit chatStatisticsObjectTypeMessage(int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1872700662;

  static object_ptr<ChatStatisticsObjectType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a story posted on behalf of the chat.
 */
class chatStatisticsObjectTypeStory final : public ChatStatisticsObjectType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Describes a story posted on behalf of the chat.
   */
  chatStatisticsObjectTypeStory();

  /**
   * Describes a story posted on behalf of the chat.
   *
   * \param[in] story_id_ Story identifier.
   */
  explicit chatStatisticsObjectTypeStory(int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 364575152;

  static object_ptr<ChatStatisticsObjectType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftChatTheme;

/**
 * This class is an abstract base class.
 * Describes a chat theme.
 */
class ChatTheme: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatTheme> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat theme based on an emoji.
 */
class chatThemeEmoji final : public ChatTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the theme; full theme description is received through updateEmojiChatThemes.
  string name_;
  static jfieldID name_fieldID;

  /**
   * A chat theme based on an emoji.
   */
  chatThemeEmoji();

  /**
   * A chat theme based on an emoji.
   *
   * \param[in] name_ Name of the theme; full theme description is received through updateEmojiChatThemes.
   */
  explicit chatThemeEmoji(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1863920197;

  static object_ptr<ChatTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat theme based on an upgraded gift.
 */
class chatThemeGift final : public ChatTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat theme.
  object_ptr<giftChatTheme> gift_theme_;
  static jfieldID gift_theme_fieldID;

  /**
   * A chat theme based on an upgraded gift.
   */
  chatThemeGift();

  /**
   * A chat theme based on an upgraded gift.
   *
   * \param[in] gift_theme_ The chat theme.
   */
  explicit chatThemeGift(object_ptr<giftChatTheme> &&gift_theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 19728441;

  static object_ptr<ChatTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the type of chat.
 */
class ChatType: public Object {
 public:
  static jclass Class;

  static object_ptr<ChatType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An ordinary chat with a user.
 */
class chatTypePrivate final : public ChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * An ordinary chat with a user.
   */
  chatTypePrivate();

  /**
   * An ordinary chat with a user.
   *
   * \param[in] user_id_ User identifier.
   */
  explicit chatTypePrivate(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1579049844;

  static object_ptr<ChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A basic group (a chat with 0-200 other users).
 */
class chatTypeBasicGroup final : public ChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Basic group identifier.
  int53 basic_group_id_;
  static jfieldID basic_group_id_fieldID;

  /**
   * A basic group (a chat with 0-200 other users).
   */
  chatTypeBasicGroup();

  /**
   * A basic group (a chat with 0-200 other users).
   *
   * \param[in] basic_group_id_ Basic group identifier.
   */
  explicit chatTypeBasicGroup(int53 basic_group_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 973884508;

  static object_ptr<ChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A supergroup or channel (with unlimited members).
 */
class chatTypeSupergroup final : public ChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup or channel identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// True, if the supergroup is a channel.
  bool is_channel_;
  static jfieldID is_channel_fieldID;

  /**
   * A supergroup or channel (with unlimited members).
   */
  chatTypeSupergroup();

  /**
   * A supergroup or channel (with unlimited members).
   *
   * \param[in] supergroup_id_ Supergroup or channel identifier.
   * \param[in] is_channel_ True, if the supergroup is a channel.
   */
  chatTypeSupergroup(int53 supergroup_id_, bool is_channel_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1472570774;

  static object_ptr<ChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A secret chat with a user.
 */
class chatTypeSecret final : public ChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Secret chat identifier.
  int32 secret_chat_id_;
  static jfieldID secret_chat_id_fieldID;
  /// User identifier of the other user in the secret chat.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A secret chat with a user.
   */
  chatTypeSecret();

  /**
   * A secret chat with a user.
   *
   * \param[in] secret_chat_id_ Secret chat identifier.
   * \param[in] user_id_ User identifier of the other user in the secret chat.
   */
  chatTypeSecret(int32 secret_chat_id_, int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 862366513;

  static object_ptr<ChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a list of chats.
 */
class chats final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of chats found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of chat identifiers.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * Represents a list of chats.
   */
  chats();

  /**
   * Represents a list of chats.
   *
   * \param[in] total_count_ Approximate total number of chats found.
   * \param[in] chat_ids_ List of chat identifiers.
   */
  chats(int32 total_count_, array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1809654812;

  static object_ptr<chats> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents result of checking whether a username can be set for a chat.
 */
class CheckChatUsernameResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The username can be set.
 */
class checkChatUsernameResultOk final : public CheckChatUsernameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The username can be set.
   */
  checkChatUsernameResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1498956964;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The username is invalid.
 */
class checkChatUsernameResultUsernameInvalid final : public CheckChatUsernameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The username is invalid.
   */
  checkChatUsernameResultUsernameInvalid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -636979370;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The username is occupied.
 */
class checkChatUsernameResultUsernameOccupied final : public CheckChatUsernameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The username is occupied.
   */
  checkChatUsernameResultUsernameOccupied();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1320892201;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The username can be purchased at https://fragment.com. Information about the username can be received using getCollectibleItemInfo.
 */
class checkChatUsernameResultUsernamePurchasable final : public CheckChatUsernameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The username can be purchased at https://fragment.com. Information about the username can be received using getCollectibleItemInfo.
   */
  checkChatUsernameResultUsernamePurchasable();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 5885529;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user has too many chats with username, one of them must be made private first.
 */
class checkChatUsernameResultPublicChatsTooMany final : public CheckChatUsernameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user has too many chats with username, one of them must be made private first.
   */
  checkChatUsernameResultPublicChatsTooMany();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -659264388;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't be a member of a public supergroup.
 */
class checkChatUsernameResultPublicGroupsUnavailable final : public CheckChatUsernameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can't be a member of a public supergroup.
   */
  checkChatUsernameResultPublicGroupsUnavailable();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -51833641;

  static object_ptr<CheckChatUsernameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents result of checking whether a name can be used for a new sticker set.
 */
class CheckStickerSetNameResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CheckStickerSetNameResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The name can be set.
 */
class checkStickerSetNameResultOk final : public CheckStickerSetNameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The name can be set.
   */
  checkStickerSetNameResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1404308904;

  static object_ptr<CheckStickerSetNameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The name is invalid.
 */
class checkStickerSetNameResultNameInvalid final : public CheckStickerSetNameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The name is invalid.
   */
  checkStickerSetNameResultNameInvalid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 177992244;

  static object_ptr<CheckStickerSetNameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The name is occupied.
 */
class checkStickerSetNameResultNameOccupied final : public CheckStickerSetNameResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The name is occupied.
   */
  checkStickerSetNameResultNameOccupied();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1012980872;

  static object_ptr<CheckStickerSetNameResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class checklistTask;

class formattedText;

/**
 * Describes a checklist.
 */
class checklist final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the checklist; may contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities.
  object_ptr<formattedText> title_;
  static jfieldID title_fieldID;
  /// List of tasks in the checklist.
  array<object_ptr<checklistTask>> tasks_;
  static jfieldID tasks_fieldID;
  /// True, if users other than creator of the list can add tasks to the list.
  bool others_can_add_tasks_;
  static jfieldID others_can_add_tasks_fieldID;
  /// True, if the current user can add tasks to the list if they have Telegram Premium subscription.
  bool can_add_tasks_;
  static jfieldID can_add_tasks_fieldID;
  /// True, if users other than creator of the list can mark tasks as done or not done. If true, then the checklist is called &quot;group checklist&quot;.
  bool others_can_mark_tasks_as_done_;
  static jfieldID others_can_mark_tasks_as_done_fieldID;
  /// True, if the current user can mark tasks as done or not done if they have Telegram Premium subscription.
  bool can_mark_tasks_as_done_;
  static jfieldID can_mark_tasks_as_done_fieldID;

  /**
   * Describes a checklist.
   */
  checklist();

  /**
   * Describes a checklist.
   *
   * \param[in] title_ Title of the checklist; may contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities.
   * \param[in] tasks_ List of tasks in the checklist.
   * \param[in] others_can_add_tasks_ True, if users other than creator of the list can add tasks to the list.
   * \param[in] can_add_tasks_ True, if the current user can add tasks to the list if they have Telegram Premium subscription.
   * \param[in] others_can_mark_tasks_as_done_ True, if users other than creator of the list can mark tasks as done or not done. If true, then the checklist is called &quot;group checklist&quot;.
   * \param[in] can_mark_tasks_as_done_ True, if the current user can mark tasks as done or not done if they have Telegram Premium subscription.
   */
  checklist(object_ptr<formattedText> &&title_, array<object_ptr<checklistTask>> &&tasks_, bool others_can_add_tasks_, bool can_add_tasks_, bool others_can_mark_tasks_as_done_, bool can_mark_tasks_as_done_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -987598247;

  static object_ptr<checklist> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class formattedText;

/**
 * Describes a task in a checklist.
 */
class checklistTask final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the task.
  int32 id_;
  static jfieldID id_fieldID;
  /// Text of the task; may contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, DateTime and automatically found entities.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Identifier of the user or chat that completed the task; may be null if the task isn't completed yet.
  object_ptr<MessageSender> completed_by_;
  static jfieldID completed_by_fieldID;
  /// Point in time (Unix timestamp) when the task was completed; 0 if the task isn't completed.
  int32 completion_date_;
  static jfieldID completion_date_fieldID;

  /**
   * Describes a task in a checklist.
   */
  checklistTask();

  /**
   * Describes a task in a checklist.
   *
   * \param[in] id_ Unique identifier of the task.
   * \param[in] text_ Text of the task; may contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, DateTime and automatically found entities.
   * \param[in] completed_by_ Identifier of the user or chat that completed the task; may be null if the task isn't completed yet.
   * \param[in] completion_date_ Point in time (Unix timestamp) when the task was completed; 0 if the task isn't completed.
   */
  checklistTask(int32 id_, object_ptr<formattedText> &&text_, object_ptr<MessageSender> &&completed_by_, int32 completion_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 464950512;

  static object_ptr<checklistTask> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class birthdate;

/**
 * Describes a user who had or will have a birthday soon.
 */
class closeBirthdayUser final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Birthdate of the user.
  object_ptr<birthdate> birthdate_;
  static jfieldID birthdate_fieldID;

  /**
   * Describes a user who had or will have a birthday soon.
   */
  closeBirthdayUser();

  /**
   * Describes a user who had or will have a birthday soon.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] birthdate_ Birthdate of the user.
   */
  closeBirthdayUser(int53 user_id_, object_ptr<birthdate> &&birthdate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2147067410;

  static object_ptr<closeBirthdayUser> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class VectorPathCommand;

/**
 * Represents a closed vector path. The path begins at the end point of the last command. The coordinate system origin is in the upper-left corner.
 */
class closedVectorPath final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of vector path commands.
  array<object_ptr<VectorPathCommand>> commands_;
  static jfieldID commands_fieldID;

  /**
   * Represents a closed vector path. The path begins at the end point of the last command. The coordinate system origin is in the upper-left corner.
   */
  closedVectorPath();

  /**
   * Represents a closed vector path. The path begins at the end point of the last command. The coordinate system origin is in the upper-left corner.
   *
   * \param[in] commands_ List of vector path commands.
   */
  explicit closedVectorPath(array<object_ptr<VectorPathCommand>> &&commands_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 589951657;

  static object_ptr<closedVectorPath> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a collectible item and its last purchase.
 */
class collectibleItemInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the item was purchased.
  int32 purchase_date_;
  static jfieldID purchase_date_fieldID;
  /// Currency for the paid amount.
  string currency_;
  static jfieldID currency_fieldID;
  /// The paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Cryptocurrency used to pay for the item.
  string cryptocurrency_;
  static jfieldID cryptocurrency_fieldID;
  /// The paid amount, in the smallest units of the cryptocurrency.
  int64 cryptocurrency_amount_;
  static jfieldID cryptocurrency_amount_fieldID;
  /// Individual URL for the item on https://fragment.com.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Contains information about a collectible item and its last purchase.
   */
  collectibleItemInfo();

  /**
   * Contains information about a collectible item and its last purchase.
   *
   * \param[in] purchase_date_ Point in time (Unix timestamp) when the item was purchased.
   * \param[in] currency_ Currency for the paid amount.
   * \param[in] amount_ The paid amount, in the smallest units of the currency.
   * \param[in] cryptocurrency_ Cryptocurrency used to pay for the item.
   * \param[in] cryptocurrency_amount_ The paid amount, in the smallest units of the cryptocurrency.
   * \param[in] url_ Individual URL for the item on https://fragment.com.
   */
  collectibleItemInfo(int32 purchase_date_, string const &currency_, int53 amount_, string const &cryptocurrency_, int64 cryptocurrency_amount_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1460640717;

  static object_ptr<collectibleItemInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a collectible item that can be purchased at https://fragment.com.
 */
class CollectibleItemType: public Object {
 public:
  static jclass Class;

  static object_ptr<CollectibleItemType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A username.
 */
class collectibleItemTypeUsername final : public CollectibleItemType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The username.
  string username_;
  static jfieldID username_fieldID;

  /**
   * A username.
   */
  collectibleItemTypeUsername();

  /**
   * A username.
   *
   * \param[in] username_ The username.
   */
  explicit collectibleItemTypeUsername(string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 458680273;

  static object_ptr<CollectibleItemType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A phone number.
 */
class collectibleItemTypePhoneNumber final : public CollectibleItemType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The phone number.
  string phone_number_;
  static jfieldID phone_number_fieldID;

  /**
   * A phone number.
   */
  collectibleItemTypePhoneNumber();

  /**
   * A phone number.
   *
   * \param[in] phone_number_ The phone number.
   */
  explicit collectibleItemTypePhoneNumber(string const &phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1256251714;

  static object_ptr<CollectibleItemType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class affiliateProgramParameters;

/**
 * Describes an affiliate program that was connected to an affiliate.
 */
class connectedAffiliateProgram final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link that can be used to refer users if the program is still active.
  string url_;
  static jfieldID url_fieldID;
  /// User identifier of the bot created the program.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The parameters of the affiliate program.
  object_ptr<affiliateProgramParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// Point in time (Unix timestamp) when the affiliate program was connected.
  int32 connection_date_;
  static jfieldID connection_date_fieldID;
  /// True, if the program was canceled by the bot, or disconnected by the chat owner and isn't available anymore.
  bool is_disconnected_;
  static jfieldID is_disconnected_fieldID;
  /// The number of users that used the affiliate program.
  int64 user_count_;
  static jfieldID user_count_fieldID;
  /// The number of Telegram Stars that were earned by the affiliate program.
  int53 revenue_star_count_;
  static jfieldID revenue_star_count_fieldID;

  /**
   * Describes an affiliate program that was connected to an affiliate.
   */
  connectedAffiliateProgram();

  /**
   * Describes an affiliate program that was connected to an affiliate.
   *
   * \param[in] url_ The link that can be used to refer users if the program is still active.
   * \param[in] bot_user_id_ User identifier of the bot created the program.
   * \param[in] parameters_ The parameters of the affiliate program.
   * \param[in] connection_date_ Point in time (Unix timestamp) when the affiliate program was connected.
   * \param[in] is_disconnected_ True, if the program was canceled by the bot, or disconnected by the chat owner and isn't available anymore.
   * \param[in] user_count_ The number of users that used the affiliate program.
   * \param[in] revenue_star_count_ The number of Telegram Stars that were earned by the affiliate program.
   */
  connectedAffiliateProgram(string const &url_, int53 bot_user_id_, object_ptr<affiliateProgramParameters> &&parameters_, int32 connection_date_, bool is_disconnected_, int64 user_count_, int53 revenue_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -294102864;

  static object_ptr<connectedAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class connectedAffiliateProgram;

/**
 * Represents a list of affiliate programs that were connected to an affiliate.
 */
class connectedAffiliatePrograms final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The total number of affiliate programs that were connected to the affiliate.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of connected affiliate programs.
  array<object_ptr<connectedAffiliateProgram>> programs_;
  static jfieldID programs_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of affiliate programs that were connected to an affiliate.
   */
  connectedAffiliatePrograms();

  /**
   * Represents a list of affiliate programs that were connected to an affiliate.
   *
   * \param[in] total_count_ The total number of affiliate programs that were connected to the affiliate.
   * \param[in] programs_ The list of connected affiliate programs.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  connectedAffiliatePrograms(int32 total_count_, array<object_ptr<connectedAffiliateProgram>> &&programs_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1505880847;

  static object_ptr<connectedAffiliatePrograms> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about one website the current user is logged in with Telegram.
 */
class connectedWebsite final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Website identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// The domain name of the website.
  string domain_name_;
  static jfieldID domain_name_fieldID;
  /// User identifier of a bot linked with the website.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The version of a browser used to log in.
  string browser_;
  static jfieldID browser_fieldID;
  /// Operating system the browser is running on.
  string platform_;
  static jfieldID platform_fieldID;
  /// Point in time (Unix timestamp) when the user was logged in.
  int32 log_in_date_;
  static jfieldID log_in_date_fieldID;
  /// Point in time (Unix timestamp) when obtained authorization was last used.
  int32 last_active_date_;
  static jfieldID last_active_date_fieldID;
  /// IP address from which the user was logged in, in human-readable format.
  string ip_address_;
  static jfieldID ip_address_fieldID;
  /// Human-readable description of a country and a region from which the user was logged in, based on the IP address.
  string location_;
  static jfieldID location_fieldID;

  /**
   * Contains information about one website the current user is logged in with Telegram.
   */
  connectedWebsite();

  /**
   * Contains information about one website the current user is logged in with Telegram.
   *
   * \param[in] id_ Website identifier.
   * \param[in] domain_name_ The domain name of the website.
   * \param[in] bot_user_id_ User identifier of a bot linked with the website.
   * \param[in] browser_ The version of a browser used to log in.
   * \param[in] platform_ Operating system the browser is running on.
   * \param[in] log_in_date_ Point in time (Unix timestamp) when the user was logged in.
   * \param[in] last_active_date_ Point in time (Unix timestamp) when obtained authorization was last used.
   * \param[in] ip_address_ IP address from which the user was logged in, in human-readable format.
   * \param[in] location_ Human-readable description of a country and a region from which the user was logged in, based on the IP address.
   */
  connectedWebsite(int64 id_, string const &domain_name_, int53 bot_user_id_, string const &browser_, string const &platform_, int32 log_in_date_, int32 last_active_date_, string const &ip_address_, string const &location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1978115978;

  static object_ptr<connectedWebsite> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class connectedWebsite;

/**
 * Contains a list of websites the current user is logged in with Telegram.
 */
class connectedWebsites final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of connected websites.
  array<object_ptr<connectedWebsite>> websites_;
  static jfieldID websites_fieldID;

  /**
   * Contains a list of websites the current user is logged in with Telegram.
   */
  connectedWebsites();

  /**
   * Contains a list of websites the current user is logged in with Telegram.
   *
   * \param[in] websites_ List of connected websites.
   */
  explicit connectedWebsites(array<object_ptr<connectedWebsite>> &&websites_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1727949694;

  static object_ptr<connectedWebsites> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the current state of the connection to Telegram servers.
 */
class ConnectionState: public Object {
 public:
  static jclass Class;

  static object_ptr<ConnectionState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Waiting for the network to become available. Use setNetworkType to change the available network type.
 */
class connectionStateWaitingForNetwork final : public ConnectionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Waiting for the network to become available. Use setNetworkType to change the available network type.
   */
  connectionStateWaitingForNetwork();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1695405912;

  static object_ptr<ConnectionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Establishing a connection with a proxy server.
 */
class connectionStateConnectingToProxy final : public ConnectionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Establishing a connection with a proxy server.
   */
  connectionStateConnectingToProxy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -93187239;

  static object_ptr<ConnectionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Establishing a connection to the Telegram servers.
 */
class connectionStateConnecting final : public ConnectionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Establishing a connection to the Telegram servers.
   */
  connectionStateConnecting();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1298400670;

  static object_ptr<ConnectionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Downloading data expected to be received while the application was offline.
 */
class connectionStateUpdating final : public ConnectionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Downloading data expected to be received while the application was offline.
   */
  connectionStateUpdating();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -188104009;

  static object_ptr<ConnectionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * There is a working connection to the Telegram servers.
 */
class connectionStateReady final : public ConnectionState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * There is a working connection to the Telegram servers.
   */
  connectionStateReady();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 48608492;

  static object_ptr<ConnectionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a contact of a user.
 */
class contact final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Phone number of the user.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// First name of the user; 1-64 characters.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// Last name of the user; 0-64 characters.
  string last_name_;
  static jfieldID last_name_fieldID;
  /// Additional data about the user in a form of vCard; 0-2048 bytes in length.
  string vcard_;
  static jfieldID vcard_fieldID;
  /// Identifier of the user, if known; 0 otherwise.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Describes a contact of a user.
   */
  contact();

  /**
   * Describes a contact of a user.
   *
   * \param[in] phone_number_ Phone number of the user.
   * \param[in] first_name_ First name of the user; 1-64 characters.
   * \param[in] last_name_ Last name of the user; 0-64 characters.
   * \param[in] vcard_ Additional data about the user in a form of vCard; 0-2048 bytes in length.
   * \param[in] user_id_ Identifier of the user, if known; 0 otherwise.
   */
  contact(string const &phone_number_, string const &first_name_, string const &last_name_, string const &vcard_, int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1993844876;

  static object_ptr<contact> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a counter.
 */
class count final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Count.
  int32 count_;
  static jfieldID count_fieldID;

  /**
   * Contains a counter.
   */
  count();

  /**
   * Contains a counter.
   *
   * \param[in] count_ Count.
   */
  explicit count(int32 count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1295577348;

  static object_ptr<count> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class countryInfo;

/**
 * Contains information about countries.
 */
class countries final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of countries.
  array<object_ptr<countryInfo>> countries_;
  static jfieldID countries_fieldID;

  /**
   * Contains information about countries.
   */
  countries();

  /**
   * Contains information about countries.
   *
   * \param[in] countries_ The list of countries.
   */
  explicit countries(array<object_ptr<countryInfo>> &&countries_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1854211813;

  static object_ptr<countries> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a country.
 */
class countryInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  static jfieldID country_code_fieldID;
  /// Native name of the country.
  string name_;
  static jfieldID name_fieldID;
  /// English name of the country.
  string english_name_;
  static jfieldID english_name_fieldID;
  /// True, if the country must be hidden from the list of all countries.
  bool is_hidden_;
  static jfieldID is_hidden_fieldID;
  /// List of country calling codes.
  array<string> calling_codes_;
  static jfieldID calling_codes_fieldID;

  /**
   * Contains information about a country.
   */
  countryInfo();

  /**
   * Contains information about a country.
   *
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code.
   * \param[in] name_ Native name of the country.
   * \param[in] english_name_ English name of the country.
   * \param[in] is_hidden_ True, if the country must be hidden from the list of all countries.
   * \param[in] calling_codes_ List of country calling codes.
   */
  countryInfo(string const &country_code_, string const &name_, string const &english_name_, bool is_hidden_, array<string> &&calling_codes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1617195722;

  static object_ptr<countryInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGift;

/**
 * This class is an abstract base class.
 * Contains result of gift crafting.
 */
class CraftGiftResult: public Object {
 public:
  static jclass Class;

  static object_ptr<CraftGiftResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Crafting was successful.
 */
class craftGiftResultSuccess final : public CraftGiftResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The created gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// Unique identifier of the received gift for the current user.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;

  /**
   * Crafting was successful.
   */
  craftGiftResultSuccess();

  /**
   * Crafting was successful.
   *
   * \param[in] gift_ The created gift.
   * \param[in] received_gift_id_ Unique identifier of the received gift for the current user.
   */
  craftGiftResultSuccess(object_ptr<upgradedGift> &&gift_, string const &received_gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1790823778;

  static object_ptr<CraftGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Crafting isn't possible because one of the gifts can't be used for crafting yet.
 */
class craftGiftResultTooEarly final : public CraftGiftResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time left before the gift can be used for crafting.
  int32 retry_after_;
  static jfieldID retry_after_fieldID;

  /**
   * Crafting isn't possible because one of the gifts can't be used for crafting yet.
   */
  craftGiftResultTooEarly();

  /**
   * Crafting isn't possible because one of the gifts can't be used for crafting yet.
   *
   * \param[in] retry_after_ Time left before the gift can be used for crafting.
   */
  explicit craftGiftResultTooEarly(int32 retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1383697767;

  static object_ptr<CraftGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Crafting isn't possible because one of the gifts isn't suitable for crafting.
 */
class craftGiftResultInvalidGift final : public CraftGiftResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Crafting isn't possible because one of the gifts isn't suitable for crafting.
   */
  craftGiftResultInvalidGift();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -667740645;

  static object_ptr<CraftGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Crafting has failed.
 */
class craftGiftResultFail final : public CraftGiftResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Crafting has failed.
   */
  craftGiftResultFail();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1394001631;

  static object_ptr<CraftGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class failedToAddMembers;

/**
 * Contains information about a newly created basic group chat.
 */
class createdBasicGroupChat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Information about failed to add members.
  object_ptr<failedToAddMembers> failed_to_add_members_;
  static jfieldID failed_to_add_members_fieldID;

  /**
   * Contains information about a newly created basic group chat.
   */
  createdBasicGroupChat();

  /**
   * Contains information about a newly created basic group chat.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] failed_to_add_members_ Information about failed to add members.
   */
  createdBasicGroupChat(int53 chat_id_, object_ptr<failedToAddMembers> &&failed_to_add_members_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -20417068;

  static object_ptr<createdBasicGroupChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes the current weather.
 */
class currentWeather final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Temperature, in degree Celsius.
  double temperature_;
  static jfieldID temperature_fieldID;
  /// Emoji representing the weather.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * Describes the current weather.
   */
  currentWeather();

  /**
   * Describes the current weather.
   *
   * \param[in] temperature_ Temperature, in degree Celsius.
   * \param[in] emoji_ Emoji representing the weather.
   */
  currentWeather(double temperature_, string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -355555136;

  static object_ptr<currentWeather> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains the result of a custom request.
 */
class customRequestResult final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A JSON-serialized result.
  string result_;
  static jfieldID result_fieldID;

  /**
   * Contains the result of a custom request.
   */
  customRequestResult();

  /**
   * Contains the result of a custom request.
   *
   * \param[in] result_ A JSON-serialized result.
   */
  explicit customRequestResult(string const &result_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2009960452;

  static object_ptr<customRequestResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains some binary data.
 */
class data final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Data.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * Contains some binary data.
   */
  data();

  /**
   * Contains some binary data.
   *
   * \param[in] data_ Data.
   */
  explicit data(bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 221197337;

  static object_ptr<data> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains database statistics.
 */
class databaseStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Database statistics in an unspecified human-readable format.
  string statistics_;
  static jfieldID statistics_fieldID;

  /**
   * Contains database statistics.
   */
  databaseStatistics();

  /**
   * Contains database statistics.
   *
   * \param[in] statistics_ Database statistics in an unspecified human-readable format.
   */
  explicit databaseStatistics(string const &statistics_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1123912880;

  static object_ptr<databaseStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a date according to the Gregorian calendar.
 */
class date final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Day of the month; 1-31.
  int32 day_;
  static jfieldID day_fieldID;
  /// Month; 1-12.
  int32 month_;
  static jfieldID month_fieldID;
  /// Year; 1-9999.
  int32 year_;
  static jfieldID year_fieldID;

  /**
   * Represents a date according to the Gregorian calendar.
   */
  date();

  /**
   * Represents a date according to the Gregorian calendar.
   *
   * \param[in] day_ Day of the month; 1-31.
   * \param[in] month_ Month; 1-12.
   * \param[in] year_ Year; 1-9999.
   */
  date(int32 day_, int32 month_, int32 year_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -277956960;

  static object_ptr<date> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a date range.
 */
class dateRange final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) at which the date range begins.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Point in time (Unix timestamp) at which the date range ends.
  int32 end_date_;
  static jfieldID end_date_fieldID;

  /**
   * Represents a date range.
   */
  dateRange();

  /**
   * Represents a date range.
   *
   * \param[in] start_date_ Point in time (Unix timestamp) at which the date range begins.
   * \param[in] end_date_ Point in time (Unix timestamp) at which the date range ends.
   */
  dateRange(int32 start_date_, int32 end_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1360333926;

  static object_ptr<dateRange> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class DateTimePartPrecision;

/**
 * This class is an abstract base class.
 * Describes date and time formatting.
 */
class DateTimeFormattingType: public Object {
 public:
  static jclass Class;

  static object_ptr<DateTimeFormattingType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The time must be shown relative to the current time ([in ] X seconds, minutes, hours, days, months, years [ago]).
 */
class dateTimeFormattingTypeRelative final : public DateTimeFormattingType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The time must be shown relative to the current time ([in ] X seconds, minutes, hours, days, months, years [ago]).
   */
  dateTimeFormattingTypeRelative();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -648483424;

  static object_ptr<DateTimeFormattingType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The date and time must be shown as absolute timestamps.
 */
class dateTimeFormattingTypeAbsolute final : public DateTimeFormattingType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The precision with which hours, minutes and seconds are shown.
  object_ptr<DateTimePartPrecision> time_precision_;
  static jfieldID time_precision_fieldID;
  /// The precision with which the date is shown.
  object_ptr<DateTimePartPrecision> date_precision_;
  static jfieldID date_precision_fieldID;
  /// True, if the day of week must be shown.
  bool show_day_of_week_;
  static jfieldID show_day_of_week_fieldID;

  /**
   * The date and time must be shown as absolute timestamps.
   */
  dateTimeFormattingTypeAbsolute();

  /**
   * The date and time must be shown as absolute timestamps.
   *
   * \param[in] time_precision_ The precision with which hours, minutes and seconds are shown.
   * \param[in] date_precision_ The precision with which the date is shown.
   * \param[in] show_day_of_week_ True, if the day of week must be shown.
   */
  dateTimeFormattingTypeAbsolute(object_ptr<DateTimePartPrecision> &&time_precision_, object_ptr<DateTimePartPrecision> &&date_precision_, bool show_day_of_week_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 47463317;

  static object_ptr<DateTimeFormattingType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes precision with which to show a date or a time.
 */
class DateTimePartPrecision: public Object {
 public:
  static jclass Class;

  static object_ptr<DateTimePartPrecision> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Don't show the date or time.
 */
class dateTimePartPrecisionNone final : public DateTimePartPrecision {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Don't show the date or time.
   */
  dateTimePartPrecisionNone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1790302111;

  static object_ptr<DateTimePartPrecision> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Show the date or time in a short way (17.03.22 or 22:45).
 */
class dateTimePartPrecisionShort final : public DateTimePartPrecision {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Show the date or time in a short way (17.03.22 or 22:45).
   */
  dateTimePartPrecisionShort();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1290158159;

  static object_ptr<DateTimePartPrecision> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Show the date or time in a long way (March 17, 2022 or 22:45:00.)
 */
class dateTimePartPrecisionLong final : public DateTimePartPrecision {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Show the date or time in a long way (March 17, 2022 or 22:45:00.)
   */
  dateTimePartPrecisionLong();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -105378824;

  static object_ptr<DateTimePartPrecision> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * File with the date it was uploaded.
 */
class datedFile final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The file.
  object_ptr<file> file_;
  static jfieldID file_fieldID;
  /// Point in time (Unix timestamp) when the file was uploaded.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * File with the date it was uploaded.
   */
  datedFile();

  /**
   * File with the date it was uploaded.
   *
   * \param[in] file_ The file.
   * \param[in] date_ Point in time (Unix timestamp) when the file was uploaded.
   */
  datedFile(object_ptr<file> &&file_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1840795491;

  static object_ptr<datedFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Contains information about a tg: deep link.
 */
class deepLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text to be shown to the user.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// True, if the user must be asked to update the application.
  bool need_update_application_;
  static jfieldID need_update_application_fieldID;

  /**
   * Contains information about a tg: deep link.
   */
  deepLinkInfo();

  /**
   * Contains information about a tg: deep link.
   *
   * \param[in] text_ Text to be shown to the user.
   * \param[in] need_update_application_ True, if the user must be asked to update the application.
   */
  deepLinkInfo(object_ptr<formattedText> &&text_, bool need_update_application_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1864081662;

  static object_ptr<deepLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org.
 */
class DeviceToken: public Object {
 public:
  static jclass Class;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Firebase Cloud Messaging.
 */
class deviceTokenFirebaseCloudMessaging final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Device registration token; may be empty to deregister a device.
  string token_;
  static jfieldID token_fieldID;
  /// True, if push notifications must be additionally encrypted.
  bool encrypt_;
  static jfieldID encrypt_fieldID;

  /**
   * A token for Firebase Cloud Messaging.
   */
  deviceTokenFirebaseCloudMessaging();

  /**
   * A token for Firebase Cloud Messaging.
   *
   * \param[in] token_ Device registration token; may be empty to deregister a device.
   * \param[in] encrypt_ True, if push notifications must be additionally encrypted.
   */
  deviceTokenFirebaseCloudMessaging(string const &token_, bool encrypt_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -797881849;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Apple Push Notification service.
 */
class deviceTokenApplePush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Device token; may be empty to deregister a device.
  string device_token_;
  static jfieldID device_token_fieldID;
  /// True, if App Sandbox is enabled.
  bool is_app_sandbox_;
  static jfieldID is_app_sandbox_fieldID;

  /**
   * A token for Apple Push Notification service.
   */
  deviceTokenApplePush();

  /**
   * A token for Apple Push Notification service.
   *
   * \param[in] device_token_ Device token; may be empty to deregister a device.
   * \param[in] is_app_sandbox_ True, if App Sandbox is enabled.
   */
  deviceTokenApplePush(string const &device_token_, bool is_app_sandbox_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 387541955;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Apple Push Notification service VoIP notifications.
 */
class deviceTokenApplePushVoIP final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Device token; may be empty to deregister a device.
  string device_token_;
  static jfieldID device_token_fieldID;
  /// True, if App Sandbox is enabled.
  bool is_app_sandbox_;
  static jfieldID is_app_sandbox_fieldID;
  /// True, if push notifications must be additionally encrypted.
  bool encrypt_;
  static jfieldID encrypt_fieldID;

  /**
   * A token for Apple Push Notification service VoIP notifications.
   */
  deviceTokenApplePushVoIP();

  /**
   * A token for Apple Push Notification service VoIP notifications.
   *
   * \param[in] device_token_ Device token; may be empty to deregister a device.
   * \param[in] is_app_sandbox_ True, if App Sandbox is enabled.
   * \param[in] encrypt_ True, if push notifications must be additionally encrypted.
   */
  deviceTokenApplePushVoIP(string const &device_token_, bool is_app_sandbox_, bool encrypt_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 804275689;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Windows Push Notification Services.
 */
class deviceTokenWindowsPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The access token that will be used to send notifications; may be empty to deregister a device.
  string access_token_;
  static jfieldID access_token_fieldID;

  /**
   * A token for Windows Push Notification Services.
   */
  deviceTokenWindowsPush();

  /**
   * A token for Windows Push Notification Services.
   *
   * \param[in] access_token_ The access token that will be used to send notifications; may be empty to deregister a device.
   */
  explicit deviceTokenWindowsPush(string const &access_token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1410514289;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Microsoft Push Notification Service.
 */
class deviceTokenMicrosoftPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Push notification channel URI; may be empty to deregister a device.
  string channel_uri_;
  static jfieldID channel_uri_fieldID;

  /**
   * A token for Microsoft Push Notification Service.
   */
  deviceTokenMicrosoftPush();

  /**
   * A token for Microsoft Push Notification Service.
   *
   * \param[in] channel_uri_ Push notification channel URI; may be empty to deregister a device.
   */
  explicit deviceTokenMicrosoftPush(string const &channel_uri_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1224269900;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Microsoft Push Notification Service VoIP channel.
 */
class deviceTokenMicrosoftPushVoIP final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Push notification channel URI; may be empty to deregister a device.
  string channel_uri_;
  static jfieldID channel_uri_fieldID;

  /**
   * A token for Microsoft Push Notification Service VoIP channel.
   */
  deviceTokenMicrosoftPushVoIP();

  /**
   * A token for Microsoft Push Notification Service VoIP channel.
   *
   * \param[in] channel_uri_ Push notification channel URI; may be empty to deregister a device.
   */
  explicit deviceTokenMicrosoftPushVoIP(string const &channel_uri_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -785603759;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for web Push API.
 */
class deviceTokenWebPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device.
  string endpoint_;
  static jfieldID endpoint_fieldID;
  /// Base64url-encoded P-256 elliptic curve Diffie-Hellman public key.
  string p256dh_base64url_;
  static jfieldID p256dh_base64url_fieldID;
  /// Base64url-encoded authentication secret.
  string auth_base64url_;
  static jfieldID auth_base64url_fieldID;

  /**
   * A token for web Push API.
   */
  deviceTokenWebPush();

  /**
   * A token for web Push API.
   *
   * \param[in] endpoint_ Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device.
   * \param[in] p256dh_base64url_ Base64url-encoded P-256 elliptic curve Diffie-Hellman public key.
   * \param[in] auth_base64url_ Base64url-encoded authentication secret.
   */
  deviceTokenWebPush(string const &endpoint_, string const &p256dh_base64url_, string const &auth_base64url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1694507273;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Simple Push API for Firefox OS.
 */
class deviceTokenSimplePush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device.
  string endpoint_;
  static jfieldID endpoint_fieldID;

  /**
   * A token for Simple Push API for Firefox OS.
   */
  deviceTokenSimplePush();

  /**
   * A token for Simple Push API for Firefox OS.
   *
   * \param[in] endpoint_ Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device.
   */
  explicit deviceTokenSimplePush(string const &endpoint_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 49584736;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Ubuntu Push Client service.
 */
class deviceTokenUbuntuPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Token; may be empty to deregister a device.
  string token_;
  static jfieldID token_fieldID;

  /**
   * A token for Ubuntu Push Client service.
   */
  deviceTokenUbuntuPush();

  /**
   * A token for Ubuntu Push Client service.
   *
   * \param[in] token_ Token; may be empty to deregister a device.
   */
  explicit deviceTokenUbuntuPush(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1782320422;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for BlackBerry Push Service.
 */
class deviceTokenBlackBerryPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Token; may be empty to deregister a device.
  string token_;
  static jfieldID token_fieldID;

  /**
   * A token for BlackBerry Push Service.
   */
  deviceTokenBlackBerryPush();

  /**
   * A token for BlackBerry Push Service.
   *
   * \param[in] token_ Token; may be empty to deregister a device.
   */
  explicit deviceTokenBlackBerryPush(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1559167234;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for Tizen Push Service.
 */
class deviceTokenTizenPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Push service registration identifier; may be empty to deregister a device.
  string reg_id_;
  static jfieldID reg_id_fieldID;

  /**
   * A token for Tizen Push Service.
   */
  deviceTokenTizenPush();

  /**
   * A token for Tizen Push Service.
   *
   * \param[in] reg_id_ Push service registration identifier; may be empty to deregister a device.
   */
  explicit deviceTokenTizenPush(string const &reg_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1359947213;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A token for HUAWEI Push Service.
 */
class deviceTokenHuaweiPush final : public DeviceToken {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Device registration token; may be empty to deregister a device.
  string token_;
  static jfieldID token_fieldID;
  /// True, if push notifications must be additionally encrypted.
  bool encrypt_;
  static jfieldID encrypt_fieldID;

  /**
   * A token for HUAWEI Push Service.
   */
  deviceTokenHuaweiPush();

  /**
   * A token for HUAWEI Push Service.
   *
   * \param[in] token_ Device registration token; may be empty to deregister a device.
   * \param[in] encrypt_ True, if push notifications must be additionally encrypted.
   */
  deviceTokenHuaweiPush(string const &token_, bool encrypt_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1989103142;

  static object_ptr<DeviceToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * This class is an abstract base class.
 * Contains animated stickers which must be used for dice animation rendering.
 */
class DiceStickers: public Object {
 public:
  static jclass Class;

  static object_ptr<DiceStickers> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A regular animated sticker.
 */
class diceStickersRegular final : public DiceStickers {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animated sticker with the dice animation.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * A regular animated sticker.
   */
  diceStickersRegular();

  /**
   * A regular animated sticker.
   *
   * \param[in] sticker_ The animated sticker with the dice animation.
   */
  explicit diceStickersRegular(object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -740299570;

  static object_ptr<DiceStickers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Animated stickers to be combined into a slot machine.
 */
class diceStickersSlotMachine final : public DiceStickers {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish.
  object_ptr<sticker> background_;
  static jfieldID background_fieldID;
  /// The animated sticker with the lever animation. The lever animation must play once in the initial dice state.
  object_ptr<sticker> lever_;
  static jfieldID lever_fieldID;
  /// The animated sticker with the left reel.
  object_ptr<sticker> left_reel_;
  static jfieldID left_reel_fieldID;
  /// The animated sticker with the center reel.
  object_ptr<sticker> center_reel_;
  static jfieldID center_reel_fieldID;
  /// The animated sticker with the right reel.
  object_ptr<sticker> right_reel_;
  static jfieldID right_reel_fieldID;

  /**
   * Animated stickers to be combined into a slot machine.
   */
  diceStickersSlotMachine();

  /**
   * Animated stickers to be combined into a slot machine.
   *
   * \param[in] background_ The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish.
   * \param[in] lever_ The animated sticker with the lever animation. The lever animation must play once in the initial dice state.
   * \param[in] left_reel_ The animated sticker with the left reel.
   * \param[in] center_reel_ The animated sticker with the center reel.
   * \param[in] right_reel_ The animated sticker with the right reel.
   */
  diceStickersSlotMachine(object_ptr<sticker> &&background_, object_ptr<sticker> &&lever_, object_ptr<sticker> &&left_reel_, object_ptr<sticker> &&center_reel_, object_ptr<sticker> &&right_reel_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -375223124;

  static object_ptr<DiceStickers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class DiffEntityType;

/**
 * Represents a change of a text.
 */
class diffEntity final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Offset of the entity, in UTF-16 code units.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// Length of the entity, in UTF-16 code units.
  int32 length_;
  static jfieldID length_fieldID;
  /// Type of the entity.
  object_ptr<DiffEntityType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a change of a text.
   */
  diffEntity();

  /**
   * Represents a change of a text.
   *
   * \param[in] offset_ Offset of the entity, in UTF-16 code units.
   * \param[in] length_ Length of the entity, in UTF-16 code units.
   * \param[in] type_ Type of the entity.
   */
  diffEntity(int32 offset_, int32 length_, object_ptr<DiffEntityType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -509020080;

  static object_ptr<diffEntity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents a change of a text.
 */
class DiffEntityType: public Object {
 public:
  static jclass Class;

  static object_ptr<DiffEntityType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Addition of some text.
 */
class diffEntityTypeInsert final : public DiffEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Addition of some text.
   */
  diffEntityTypeInsert();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 119434282;

  static object_ptr<DiffEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Change of some text.
 */
class diffEntityTypeReplace final : public DiffEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The old text.
  string old_text_;
  static jfieldID old_text_fieldID;

  /**
   * Change of some text.
   */
  diffEntityTypeReplace();

  /**
   * Change of some text.
   *
   * \param[in] old_text_ The old text.
   */
  explicit diffEntityTypeReplace(string const &old_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1951790397;

  static object_ptr<DiffEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Removal of some text.
 */
class diffEntityTypeDelete final : public DiffEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Removal of some text.
   */
  diffEntityTypeDelete();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1198494499;

  static object_ptr<DiffEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class diffEntity;

/**
 * A text with some changes highlighted.
 */
class diffText final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text.
  string text_;
  static jfieldID text_fieldID;
  /// Entities describing changes in the text. Entities don't mutually intersect with each other.
  array<object_ptr<diffEntity>> entities_;
  static jfieldID entities_fieldID;

  /**
   * A text with some changes highlighted.
   */
  diffText();

  /**
   * A text with some changes highlighted.
   *
   * \param[in] text_ The text.
   * \param[in] entities_ Entities describing changes in the text. Entities don't mutually intersect with each other.
   */
  diffText(string const &text_, array<object_ptr<diffEntity>> &&entities_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1328070684;

  static object_ptr<diffText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class draftMessage;

class message;

/**
 * Contains information about a topic in a channel direct messages chat administered by the current user.
 */
class directMessagesChatTopic final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the topic belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Unique topic identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user or chat that sends the messages to the topic.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order.
  int64 order_;
  static jfieldID order_fieldID;
  /// True, if the other party can send unpaid messages even if the chat has paid messages enabled.
  bool can_send_unpaid_messages_;
  static jfieldID can_send_unpaid_messages_fieldID;
  /// True, if the topic is marked as unread.
  bool is_marked_as_unread_;
  static jfieldID is_marked_as_unread_fieldID;
  /// Number of unread messages in the chat.
  int53 unread_count_;
  static jfieldID unread_count_fieldID;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  static jfieldID last_read_inbox_message_id_fieldID;
  /// Identifier of the last read outgoing message.
  int53 last_read_outbox_message_id_;
  static jfieldID last_read_outbox_message_id_fieldID;
  /// Number of messages with unread reactions in the chat.
  int53 unread_reaction_count_;
  static jfieldID unread_reaction_count_fieldID;
  /// Last message in the topic; may be null if none or unknown.
  object_ptr<message> last_message_;
  static jfieldID last_message_fieldID;
  /// A draft of a message in the topic; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;

  /**
   * Contains information about a topic in a channel direct messages chat administered by the current user.
   */
  directMessagesChatTopic();

  /**
   * Contains information about a topic in a channel direct messages chat administered by the current user.
   *
   * \param[in] chat_id_ Identifier of the chat to which the topic belongs.
   * \param[in] id_ Unique topic identifier.
   * \param[in] sender_id_ Identifier of the user or chat that sends the messages to the topic.
   * \param[in] order_ A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order.
   * \param[in] can_send_unpaid_messages_ True, if the other party can send unpaid messages even if the chat has paid messages enabled.
   * \param[in] is_marked_as_unread_ True, if the topic is marked as unread.
   * \param[in] unread_count_ Number of unread messages in the chat.
   * \param[in] last_read_inbox_message_id_ Identifier of the last read incoming message.
   * \param[in] last_read_outbox_message_id_ Identifier of the last read outgoing message.
   * \param[in] unread_reaction_count_ Number of messages with unread reactions in the chat.
   * \param[in] last_message_ Last message in the topic; may be null if none or unknown.
   * \param[in] draft_message_ A draft of a message in the topic; may be null if none.
   */
  directMessagesChatTopic(int53 chat_id_, int53 id_, object_ptr<MessageSender> &&sender_id_, int64 order_, bool can_send_unpaid_messages_, bool is_marked_as_unread_, int53 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int53 unread_reaction_count_, object_ptr<message> &&last_message_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1778377757;

  static object_ptr<directMessagesChatTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes a document of any type.
 */
class document final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  static jfieldID file_name_fieldID;
  /// MIME type of the file; as defined by the sender.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// Document minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// File containing the document.
  object_ptr<file> document_;
  static jfieldID document_fieldID;

  /**
   * Describes a document of any type.
   */
  document();

  /**
   * Describes a document of any type.
   *
   * \param[in] file_name_ Original name of the file; as defined by the sender.
   * \param[in] mime_type_ MIME type of the file; as defined by the sender.
   * \param[in] minithumbnail_ Document minithumbnail; may be null.
   * \param[in] thumbnail_ Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null.
   * \param[in] document_ File containing the document.
   */
  document(string const &file_name_, string const &mime_type_, object_ptr<minithumbnail> &&minithumbnail_, object_ptr<thumbnail> &&thumbnail_, object_ptr<file> &&document_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1357271080;

  static object_ptr<document> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains number of being downloaded and recently downloaded files found.
 */
class downloadedFileCounts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of active file downloads found, including paused.
  int32 active_count_;
  static jfieldID active_count_fieldID;
  /// Number of paused file downloads found.
  int32 paused_count_;
  static jfieldID paused_count_fieldID;
  /// Number of completed file downloads found.
  int32 completed_count_;
  static jfieldID completed_count_fieldID;

  /**
   * Contains number of being downloaded and recently downloaded files found.
   */
  downloadedFileCounts();

  /**
   * Contains number of being downloaded and recently downloaded files found.
   *
   * \param[in] active_count_ Number of active file downloads found, including paused.
   * \param[in] paused_count_ Number of paused file downloads found.
   * \param[in] completed_count_ Number of completed file downloads found.
   */
  downloadedFileCounts(int32 active_count_, int32 paused_count_, int32 completed_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1973999550;

  static object_ptr<downloadedFileCounts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class InputMessageReplyTo;

class inputSuggestedPostInfo;

/**
 * Contains information about a message draft.
 */
class draftMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the message to be replied; inputMessageReplyToStory is unsupported; may be null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Point in time (Unix timestamp) when the draft was created.
  int32 date_;
  static jfieldID date_fieldID;
  /// Content of the message draft; must be of the type inputMessageText, inputMessageVideoNote, or inputMessageVoiceNote.
  object_ptr<InputMessageContent> input_message_text_;
  static jfieldID input_message_text_fieldID;
  /// Identifier of the effect to apply to the message when it is sent; 0 if none.
  int64 effect_id_;
  static jfieldID effect_id_fieldID;
  /// Information about the suggested post; may be null if none.
  object_ptr<inputSuggestedPostInfo> suggested_post_info_;
  static jfieldID suggested_post_info_fieldID;

  /**
   * Contains information about a message draft.
   */
  draftMessage();

  /**
   * Contains information about a message draft.
   *
   * \param[in] reply_to_ Information about the message to be replied; inputMessageReplyToStory is unsupported; may be null if none.
   * \param[in] date_ Point in time (Unix timestamp) when the draft was created.
   * \param[in] input_message_text_ Content of the message draft; must be of the type inputMessageText, inputMessageVideoNote, or inputMessageVoiceNote.
   * \param[in] effect_id_ Identifier of the effect to apply to the message when it is sent; 0 if none.
   * \param[in] suggested_post_info_ Information about the suggested post; may be null if none.
   */
  draftMessage(object_ptr<InputMessageReplyTo> &&reply_to_, int32 date_, object_ptr<InputMessageContent> &&input_message_text_, int64 effect_id_, object_ptr<inputSuggestedPostInfo> &&suggested_post_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1165040650;

  static object_ptr<draftMessage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains authentication data for an email address.
 */
class EmailAddressAuthentication: public Object {
 public:
  static jclass Class;

  static object_ptr<EmailAddressAuthentication> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication code delivered to a user's email address.
 */
class emailAddressAuthenticationCode final : public EmailAddressAuthentication {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The code.
  string code_;
  static jfieldID code_fieldID;

  /**
   * An authentication code delivered to a user's email address.
   */
  emailAddressAuthenticationCode();

  /**
   * An authentication code delivered to a user's email address.
   *
   * \param[in] code_ The code.
   */
  explicit emailAddressAuthenticationCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -993257022;

  static object_ptr<EmailAddressAuthentication> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication token received through Apple ID.
 */
class emailAddressAuthenticationAppleId final : public EmailAddressAuthentication {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The token.
  string token_;
  static jfieldID token_fieldID;

  /**
   * An authentication token received through Apple ID.
   */
  emailAddressAuthenticationAppleId();

  /**
   * An authentication token received through Apple ID.
   *
   * \param[in] token_ The token.
   */
  explicit emailAddressAuthenticationAppleId(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 633948265;

  static object_ptr<EmailAddressAuthentication> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authentication token received through Google ID.
 */
class emailAddressAuthenticationGoogleId final : public EmailAddressAuthentication {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The token.
  string token_;
  static jfieldID token_fieldID;

  /**
   * An authentication token received through Google ID.
   */
  emailAddressAuthenticationGoogleId();

  /**
   * An authentication token received through Google ID.
   *
   * \param[in] token_ The token.
   */
  explicit emailAddressAuthenticationGoogleId(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -19142846;

  static object_ptr<EmailAddressAuthentication> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about the email address authentication code that was sent.
 */
class emailAddressAuthenticationCodeInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pattern of the email address to which an authentication code was sent.
  string email_address_pattern_;
  static jfieldID email_address_pattern_fieldID;
  /// Length of the code; 0 if unknown.
  int32 length_;
  static jfieldID length_fieldID;

  /**
   * Information about the email address authentication code that was sent.
   */
  emailAddressAuthenticationCodeInfo();

  /**
   * Information about the email address authentication code that was sent.
   *
   * \param[in] email_address_pattern_ Pattern of the email address to which an authentication code was sent.
   * \param[in] length_ Length of the code; 0 if unknown.
   */
  emailAddressAuthenticationCodeInfo(string const &email_address_pattern_, int32 length_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1151066659;

  static object_ptr<emailAddressAuthenticationCodeInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes reset state of an email address.
 */
class EmailAddressResetState: public Object {
 public:
  static jclass Class;

  static object_ptr<EmailAddressResetState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Email address can be reset after the given period. Call resetAuthenticationEmailAddress to reset it and allow the user to authorize with a code sent to the user's phone number.
 */
class emailAddressResetStateAvailable final : public EmailAddressResetState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time required to wait before the email address can be reset; 0 if the user is subscribed to Telegram Premium.
  int32 wait_period_;
  static jfieldID wait_period_fieldID;

  /**
   * Email address can be reset after the given period. Call resetAuthenticationEmailAddress to reset it and allow the user to authorize with a code sent to the user's phone number.
   */
  emailAddressResetStateAvailable();

  /**
   * Email address can be reset after the given period. Call resetAuthenticationEmailAddress to reset it and allow the user to authorize with a code sent to the user's phone number.
   *
   * \param[in] wait_period_ Time required to wait before the email address can be reset; 0 if the user is subscribed to Telegram Premium.
   */
  explicit emailAddressResetStateAvailable(int32 wait_period_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1917177600;

  static object_ptr<EmailAddressResetState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Email address reset has already been requested. Call resetAuthenticationEmailAddress to check whether immediate reset is possible.
 */
class emailAddressResetStatePending final : public EmailAddressResetState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Left time before the email address will be reset, in seconds. updateAuthorizationState is not sent when this field changes.
  int32 reset_in_;
  static jfieldID reset_in_fieldID;

  /**
   * Email address reset has already been requested. Call resetAuthenticationEmailAddress to check whether immediate reset is possible.
   */
  emailAddressResetStatePending();

  /**
   * Email address reset has already been requested. Call resetAuthenticationEmailAddress to check whether immediate reset is possible.
   *
   * \param[in] reset_in_ Left time before the email address will be reset, in seconds. updateAuthorizationState is not sent when this field changes.
   */
  explicit emailAddressResetStatePending(int32 reset_in_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1885966805;

  static object_ptr<EmailAddressResetState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class emojiCategory;

/**
 * Represents a list of emoji categories.
 */
class emojiCategories final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of categories.
  array<object_ptr<emojiCategory>> categories_;
  static jfieldID categories_fieldID;

  /**
   * Represents a list of emoji categories.
   */
  emojiCategories();

  /**
   * Represents a list of emoji categories.
   *
   * \param[in] categories_ List of categories.
   */
  explicit emojiCategories(array<object_ptr<emojiCategory>> &&categories_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1455387824;

  static object_ptr<emojiCategories> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class EmojiCategorySource;

class sticker;

/**
 * Describes an emoji category.
 */
class emojiCategory final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the category.
  string name_;
  static jfieldID name_fieldID;
  /// Custom emoji sticker, which represents icon of the category.
  object_ptr<sticker> icon_;
  static jfieldID icon_fieldID;
  /// Source of stickers for the emoji category.
  object_ptr<EmojiCategorySource> source_;
  static jfieldID source_fieldID;
  /// True, if the category must be shown first when choosing a sticker for the start page.
  bool is_greeting_;
  static jfieldID is_greeting_fieldID;

  /**
   * Describes an emoji category.
   */
  emojiCategory();

  /**
   * Describes an emoji category.
   *
   * \param[in] name_ Name of the category.
   * \param[in] icon_ Custom emoji sticker, which represents icon of the category.
   * \param[in] source_ Source of stickers for the emoji category.
   * \param[in] is_greeting_ True, if the category must be shown first when choosing a sticker for the start page.
   */
  emojiCategory(string const &name_, object_ptr<sticker> &&icon_, object_ptr<EmojiCategorySource> &&source_, bool is_greeting_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 571335919;

  static object_ptr<emojiCategory> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes source of stickers for an emoji category.
 */
class EmojiCategorySource: public Object {
 public:
  static jclass Class;

  static object_ptr<EmojiCategorySource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The category contains a list of similar emoji to search for in getStickers and searchStickers for stickers, or getInlineQueryResults with the bot getOption(&quot;animation_search_bot_username&quot;) for animations.
 */
class emojiCategorySourceSearch final : public EmojiCategorySource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of emojis to search for.
  array<string> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * The category contains a list of similar emoji to search for in getStickers and searchStickers for stickers, or getInlineQueryResults with the bot getOption(&quot;animation_search_bot_username&quot;) for animations.
   */
  emojiCategorySourceSearch();

  /**
   * The category contains a list of similar emoji to search for in getStickers and searchStickers for stickers, or getInlineQueryResults with the bot getOption(&quot;animation_search_bot_username&quot;) for animations.
   *
   * \param[in] emojis_ List of emojis to search for.
   */
  explicit emojiCategorySourceSearch(array<string> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -453260262;

  static object_ptr<EmojiCategorySource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The category contains premium stickers that must be found by getPremiumStickers.
 */
class emojiCategorySourcePremium final : public EmojiCategorySource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The category contains premium stickers that must be found by getPremiumStickers.
   */
  emojiCategorySourcePremium();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1932358388;

  static object_ptr<EmojiCategorySource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of emoji category.
 */
class EmojiCategoryType: public Object {
 public:
  static jclass Class;

  static object_ptr<EmojiCategoryType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The category must be used by default (e.g., for custom emoji or animation search).
 */
class emojiCategoryTypeDefault final : public EmojiCategoryType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The category must be used by default (e.g., for custom emoji or animation search).
   */
  emojiCategoryTypeDefault();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1188782699;

  static object_ptr<EmojiCategoryType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The category must be used by default for regular sticker selection. It may contain greeting emoji category and premium stickers.
 */
class emojiCategoryTypeRegularStickers final : public EmojiCategoryType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The category must be used by default for regular sticker selection. It may contain greeting emoji category and premium stickers.
   */
  emojiCategoryTypeRegularStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1337484846;

  static object_ptr<EmojiCategoryType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The category must be used for emoji status selection.
 */
class emojiCategoryTypeEmojiStatus final : public EmojiCategoryType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The category must be used for emoji status selection.
   */
  emojiCategoryTypeEmojiStatus();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1381282631;

  static object_ptr<EmojiCategoryType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The category must be used for chat photo emoji selection.
 */
class emojiCategoryTypeChatPhoto final : public EmojiCategoryType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The category must be used for chat photo emoji selection.
   */
  emojiCategoryTypeChatPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1059063081;

  static object_ptr<EmojiCategoryType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class themeSettings;

/**
 * Describes a chat theme based on an emoji.
 */
class emojiChatTheme final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Theme name.
  string name_;
  static jfieldID name_fieldID;
  /// Theme settings for a light chat theme.
  object_ptr<themeSettings> light_settings_;
  static jfieldID light_settings_fieldID;
  /// Theme settings for a dark chat theme.
  object_ptr<themeSettings> dark_settings_;
  static jfieldID dark_settings_fieldID;

  /**
   * Describes a chat theme based on an emoji.
   */
  emojiChatTheme();

  /**
   * Describes a chat theme based on an emoji.
   *
   * \param[in] name_ Theme name.
   * \param[in] light_settings_ Theme settings for a light chat theme.
   * \param[in] dark_settings_ Theme settings for a dark chat theme.
   */
  emojiChatTheme(string const &name_, object_ptr<themeSettings> &&light_settings_, object_ptr<themeSettings> &&dark_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -329422882;

  static object_ptr<emojiChatTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an emoji with its keyword.
 */
class emojiKeyword final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The emoji.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// The keyword.
  string keyword_;
  static jfieldID keyword_fieldID;

  /**
   * Represents an emoji with its keyword.
   */
  emojiKeyword();

  /**
   * Represents an emoji with its keyword.
   *
   * \param[in] emoji_ The emoji.
   * \param[in] keyword_ The keyword.
   */
  emojiKeyword(string const &emoji_, string const &keyword_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2112285985;

  static object_ptr<emojiKeyword> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class emojiKeyword;

/**
 * Represents a list of emojis with their keywords.
 */
class emojiKeywords final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of emojis with their keywords.
  array<object_ptr<emojiKeyword>> emoji_keywords_;
  static jfieldID emoji_keywords_fieldID;

  /**
   * Represents a list of emojis with their keywords.
   */
  emojiKeywords();

  /**
   * Represents a list of emojis with their keywords.
   *
   * \param[in] emoji_keywords_ List of emojis with their keywords.
   */
  explicit emojiKeywords(array<object_ptr<emojiKeyword>> &&emoji_keywords_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 689723339;

  static object_ptr<emojiKeywords> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Contains information about an emoji reaction.
 */
class emojiReaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text representation of the reaction.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// Reaction title.
  string title_;
  static jfieldID title_fieldID;
  /// True, if the reaction can be added to new messages and enabled in chats.
  bool is_active_;
  static jfieldID is_active_fieldID;
  /// Static icon for the reaction.
  object_ptr<sticker> static_icon_;
  static jfieldID static_icon_fieldID;
  /// Appear animation for the reaction.
  object_ptr<sticker> appear_animation_;
  static jfieldID appear_animation_fieldID;
  /// Select animation for the reaction.
  object_ptr<sticker> select_animation_;
  static jfieldID select_animation_fieldID;
  /// Activate animation for the reaction.
  object_ptr<sticker> activate_animation_;
  static jfieldID activate_animation_fieldID;
  /// Effect animation for the reaction.
  object_ptr<sticker> effect_animation_;
  static jfieldID effect_animation_fieldID;
  /// Around animation for the reaction; may be null.
  object_ptr<sticker> around_animation_;
  static jfieldID around_animation_fieldID;
  /// Center animation for the reaction; may be null.
  object_ptr<sticker> center_animation_;
  static jfieldID center_animation_fieldID;

  /**
   * Contains information about an emoji reaction.
   */
  emojiReaction();

  /**
   * Contains information about an emoji reaction.
   *
   * \param[in] emoji_ Text representation of the reaction.
   * \param[in] title_ Reaction title.
   * \param[in] is_active_ True, if the reaction can be added to new messages and enabled in chats.
   * \param[in] static_icon_ Static icon for the reaction.
   * \param[in] appear_animation_ Appear animation for the reaction.
   * \param[in] select_animation_ Select animation for the reaction.
   * \param[in] activate_animation_ Activate animation for the reaction.
   * \param[in] effect_animation_ Effect animation for the reaction.
   * \param[in] around_animation_ Around animation for the reaction; may be null.
   * \param[in] center_animation_ Center animation for the reaction; may be null.
   */
  emojiReaction(string const &emoji_, string const &title_, bool is_active_, object_ptr<sticker> &&static_icon_, object_ptr<sticker> &&appear_animation_, object_ptr<sticker> &&select_animation_, object_ptr<sticker> &&activate_animation_, object_ptr<sticker> &&effect_animation_, object_ptr<sticker> &&around_animation_, object_ptr<sticker> &&center_animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1616063583;

  static object_ptr<emojiReaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class EmojiStatusType;

/**
 * Describes an emoji to be shown instead of the Telegram Premium badge.
 */
class emojiStatus final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the emoji status.
  object_ptr<EmojiStatusType> type_;
  static jfieldID type_fieldID;
  /// Point in time (Unix timestamp) when the status will expire; 0 if never.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;

  /**
   * Describes an emoji to be shown instead of the Telegram Premium badge.
   */
  emojiStatus();

  /**
   * Describes an emoji to be shown instead of the Telegram Premium badge.
   *
   * \param[in] type_ Type of the emoji status.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the status will expire; 0 if never.
   */
  emojiStatus(object_ptr<EmojiStatusType> &&type_, int32 expiration_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 973424912;

  static object_ptr<emojiStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a list of custom emoji identifiers for emoji statuses.
 */
class emojiStatusCustomEmojis final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of custom emoji identifiers.
  array<int64> custom_emoji_ids_;
  static jfieldID custom_emoji_ids_fieldID;

  /**
   * Contains a list of custom emoji identifiers for emoji statuses.
   */
  emojiStatusCustomEmojis();

  /**
   * Contains a list of custom emoji identifiers for emoji statuses.
   *
   * \param[in] custom_emoji_ids_ The list of custom emoji identifiers.
   */
  explicit emojiStatusCustomEmojis(array<int64> &&custom_emoji_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 917123337;

  static object_ptr<emojiStatusCustomEmojis> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGiftBackdropColors;

/**
 * This class is an abstract base class.
 * Describes type of emoji status.
 */
class EmojiStatusType: public Object {
 public:
  static jclass Class;

  static object_ptr<EmojiStatusType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A custom emoji set as emoji status.
 */
class emojiStatusTypeCustomEmoji final : public EmojiStatusType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the custom emoji in stickerFormatTgs format.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * A custom emoji set as emoji status.
   */
  emojiStatusTypeCustomEmoji();

  /**
   * A custom emoji set as emoji status.
   *
   * \param[in] custom_emoji_id_ Identifier of the custom emoji in stickerFormatTgs format.
   */
  explicit emojiStatusTypeCustomEmoji(int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1666780939;

  static object_ptr<EmojiStatusType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An upgraded gift set as emoji status.
 */
class emojiStatusTypeUpgradedGift final : public EmojiStatusType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the upgraded gift.
  int64 upgraded_gift_id_;
  static jfieldID upgraded_gift_id_fieldID;
  /// The title of the upgraded gift.
  string gift_title_;
  static jfieldID gift_title_fieldID;
  /// Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift.
  string gift_name_;
  static jfieldID gift_name_fieldID;
  /// Custom emoji identifier of the model of the upgraded gift.
  int64 model_custom_emoji_id_;
  static jfieldID model_custom_emoji_id_fieldID;
  /// Custom emoji identifier of the symbol of the upgraded gift.
  int64 symbol_custom_emoji_id_;
  static jfieldID symbol_custom_emoji_id_fieldID;
  /// Colors of the backdrop of the upgraded gift.
  object_ptr<upgradedGiftBackdropColors> backdrop_colors_;
  static jfieldID backdrop_colors_fieldID;

  /**
   * An upgraded gift set as emoji status.
   */
  emojiStatusTypeUpgradedGift();

  /**
   * An upgraded gift set as emoji status.
   *
   * \param[in] upgraded_gift_id_ Identifier of the upgraded gift.
   * \param[in] gift_title_ The title of the upgraded gift.
   * \param[in] gift_name_ Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift.
   * \param[in] model_custom_emoji_id_ Custom emoji identifier of the model of the upgraded gift.
   * \param[in] symbol_custom_emoji_id_ Custom emoji identifier of the symbol of the upgraded gift.
   * \param[in] backdrop_colors_ Colors of the backdrop of the upgraded gift.
   */
  emojiStatusTypeUpgradedGift(int64 upgraded_gift_id_, string const &gift_title_, string const &gift_name_, int64 model_custom_emoji_id_, int64 symbol_custom_emoji_id_, object_ptr<upgradedGiftBackdropColors> &&backdrop_colors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -837921804;

  static object_ptr<EmojiStatusType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatus;

/**
 * Contains a list of emoji statuses.
 */
class emojiStatuses final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of emoji statuses identifiers.
  array<object_ptr<emojiStatus>> emoji_statuses_;
  static jfieldID emoji_statuses_fieldID;

  /**
   * Contains a list of emoji statuses.
   */
  emojiStatuses();

  /**
   * Contains a list of emoji statuses.
   *
   * \param[in] emoji_statuses_ The list of emoji statuses identifiers.
   */
  explicit emojiStatuses(array<object_ptr<emojiStatus>> &&emoji_statuses_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1186104146;

  static object_ptr<emojiStatuses> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a list of emojis.
 */
class emojis final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of emojis.
  array<string> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * Represents a list of emojis.
   */
  emojis();

  /**
   * Represents a list of emojis.
   *
   * \param[in] emojis_ List of emojis.
   */
  explicit emojis(array<string> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 950339552;

  static object_ptr<emojis> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains encrypted Telegram Passport data credentials.
 */
class encryptedCredentials final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The encrypted credentials.
  bytes data_;
  static jfieldID data_fieldID;
  /// The decrypted data hash.
  bytes hash_;
  static jfieldID hash_fieldID;
  /// Secret for data decryption, encrypted with the service's public key.
  bytes secret_;
  static jfieldID secret_fieldID;

  /**
   * Contains encrypted Telegram Passport data credentials.
   */
  encryptedCredentials();

  /**
   * Contains encrypted Telegram Passport data credentials.
   *
   * \param[in] data_ The encrypted credentials.
   * \param[in] hash_ The decrypted data hash.
   * \param[in] secret_ Secret for data decryption, encrypted with the service's public key.
   */
  encryptedCredentials(bytes const &data_, bytes const &hash_, bytes const &secret_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1331106766;

  static object_ptr<encryptedCredentials> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PassportElementType;

class datedFile;

/**
 * Contains information about an encrypted Telegram Passport element; for bots only.
 */
class encryptedPassportElement final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of Telegram Passport element.
  object_ptr<PassportElementType> type_;
  static jfieldID type_fieldID;
  /// Encrypted JSON-encoded data about the user.
  bytes data_;
  static jfieldID data_fieldID;
  /// The front side of an identity document.
  object_ptr<datedFile> front_side_;
  static jfieldID front_side_fieldID;
  /// The reverse side of an identity document; may be null.
  object_ptr<datedFile> reverse_side_;
  static jfieldID reverse_side_fieldID;
  /// Selfie with the document; may be null.
  object_ptr<datedFile> selfie_;
  static jfieldID selfie_fieldID;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<datedFile>> translation_;
  static jfieldID translation_fieldID;
  /// List of attached files.
  array<object_ptr<datedFile>> files_;
  static jfieldID files_fieldID;
  /// Unencrypted data, phone number or email address.
  string value_;
  static jfieldID value_fieldID;
  /// Hash of the entire element.
  string hash_;
  static jfieldID hash_fieldID;

  /**
   * Contains information about an encrypted Telegram Passport element; for bots only.
   */
  encryptedPassportElement();

  /**
   * Contains information about an encrypted Telegram Passport element; for bots only.
   *
   * \param[in] type_ Type of Telegram Passport element.
   * \param[in] data_ Encrypted JSON-encoded data about the user.
   * \param[in] front_side_ The front side of an identity document.
   * \param[in] reverse_side_ The reverse side of an identity document; may be null.
   * \param[in] selfie_ Selfie with the document; may be null.
   * \param[in] translation_ List of files containing a certified English translation of the document.
   * \param[in] files_ List of attached files.
   * \param[in] value_ Unencrypted data, phone number or email address.
   * \param[in] hash_ Hash of the entire element.
   */
  encryptedPassportElement(object_ptr<PassportElementType> &&type_, bytes const &data_, object_ptr<datedFile> &&front_side_, object_ptr<datedFile> &&reverse_side_, object_ptr<datedFile> &&selfie_, array<object_ptr<datedFile>> &&translation_, array<object_ptr<datedFile>> &&files_, string const &value_, string const &hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2002386193;

  static object_ptr<encryptedPassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An object of this type can be returned on every function call, in case of an error.
 */
class error final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user.
  int32 code_;
  static jfieldID code_fieldID;
  /// Error message; subject to future changes.
  string message_;
  static jfieldID message_fieldID;

  /**
   * An object of this type can be returned on every function call, in case of an error.
   */
  error();

  /**
   * An object of this type can be returned on every function call, in case of an error.
   *
   * \param[in] code_ Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user.
   * \param[in] message_ Error message; subject to future changes.
   */
  error(int32 code_, string const &message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1679978726;

  static object_ptr<error> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes a fact-check added to the message by an independent checker.
 */
class factCheck final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the fact-check.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check is shown.
  string country_code_;
  static jfieldID country_code_fieldID;

  /**
   * Describes a fact-check added to the message by an independent checker.
   */
  factCheck();

  /**
   * Describes a fact-check added to the message by an independent checker.
   *
   * \param[in] text_ Text of the fact-check.
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check is shown.
   */
  factCheck(object_ptr<formattedText> &&text_, string const &country_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1048184552;

  static object_ptr<factCheck> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a user who has failed to be added to a chat.
 */
class failedToAddMember final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// True, if subscription to Telegram Premium would have allowed to add the user to the chat.
  bool premium_would_allow_invite_;
  static jfieldID premium_would_allow_invite_fieldID;
  /// True, if subscription to Telegram Premium is required to send the user chat invite link.
  bool premium_required_to_send_messages_;
  static jfieldID premium_required_to_send_messages_fieldID;

  /**
   * Contains information about a user who has failed to be added to a chat.
   */
  failedToAddMember();

  /**
   * Contains information about a user who has failed to be added to a chat.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] premium_would_allow_invite_ True, if subscription to Telegram Premium would have allowed to add the user to the chat.
   * \param[in] premium_required_to_send_messages_ True, if subscription to Telegram Premium is required to send the user chat invite link.
   */
  failedToAddMember(int53 user_id_, bool premium_would_allow_invite_, bool premium_required_to_send_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -282891070;

  static object_ptr<failedToAddMember> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class failedToAddMember;

/**
 * Represents a list of users that has failed to be added to a chat.
 */
class failedToAddMembers final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about users that weren't added to the chat.
  array<object_ptr<failedToAddMember>> failed_to_add_members_;
  static jfieldID failed_to_add_members_fieldID;

  /**
   * Represents a list of users that has failed to be added to a chat.
   */
  failedToAddMembers();

  /**
   * Represents a list of users that has failed to be added to a chat.
   *
   * \param[in] failed_to_add_members_ Information about users that weren't added to the chat.
   */
  explicit failedToAddMembers(array<object_ptr<failedToAddMember>> &&failed_to_add_members_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -272587152;

  static object_ptr<failedToAddMembers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class localFile;

class remoteFile;

/**
 * Represents a file.
 */
class file final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique file identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// File size, in bytes; 0 if unknown.
  int53 size_;
  static jfieldID size_fieldID;
  /// Approximate file size in bytes in case the exact file size is unknown. Can be used to show download/upload progress.
  int53 expected_size_;
  static jfieldID expected_size_fieldID;
  /// Information about the local copy of the file.
  object_ptr<localFile> local_;
  static jfieldID local_fieldID;
  /// Information about the remote copy of the file.
  object_ptr<remoteFile> remote_;
  static jfieldID remote_fieldID;

  /**
   * Represents a file.
   */
  file();

  /**
   * Represents a file.
   *
   * \param[in] id_ Unique file identifier.
   * \param[in] size_ File size, in bytes; 0 if unknown.
   * \param[in] expected_size_ Approximate file size in bytes in case the exact file size is unknown. Can be used to show download/upload progress.
   * \param[in] local_ Information about the local copy of the file.
   * \param[in] remote_ Information about the remote copy of the file.
   */
  file(int32 id_, int53 size_, int53 expected_size_, object_ptr<localFile> &&local_, object_ptr<remoteFile> &&remote_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1263291956;

  static object_ptr<file> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Describes a file added to file download list.
 */
class fileDownload final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File identifier.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// The message with the file.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// Point in time (Unix timestamp) when the file was added to the download list.
  int32 add_date_;
  static jfieldID add_date_fieldID;
  /// Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed.
  int32 complete_date_;
  static jfieldID complete_date_fieldID;
  /// True, if downloading of the file is paused.
  bool is_paused_;
  static jfieldID is_paused_fieldID;

  /**
   * Describes a file added to file download list.
   */
  fileDownload();

  /**
   * Describes a file added to file download list.
   *
   * \param[in] file_id_ File identifier.
   * \param[in] message_ The message with the file.
   * \param[in] add_date_ Point in time (Unix timestamp) when the file was added to the download list.
   * \param[in] complete_date_ Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed.
   * \param[in] is_paused_ True, if downloading of the file is paused.
   */
  fileDownload(int32 file_id_, object_ptr<message> &&message_, int32 add_date_, int32 complete_date_, bool is_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2092100780;

  static object_ptr<fileDownload> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains size of downloaded prefix of a file.
 */
class fileDownloadedPrefixSize final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The prefix size, in bytes.
  int53 size_;
  static jfieldID size_fieldID;

  /**
   * Contains size of downloaded prefix of a file.
   */
  fileDownloadedPrefixSize();

  /**
   * Contains size of downloaded prefix of a file.
   *
   * \param[in] size_ The prefix size, in bytes.
   */
  explicit fileDownloadedPrefixSize(int53 size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2015205381;

  static object_ptr<fileDownloadedPrefixSize> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the type of file.
 */
class FileType: public Object {
 public:
  static jclass Class;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The data is not a file.
 */
class fileTypeNone final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The data is not a file.
   */
  fileTypeNone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2003009189;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is an animation.
 */
class fileTypeAnimation final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is an animation.
   */
  fileTypeAnimation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -290816582;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is an audio file.
 */
class fileTypeAudio final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is an audio file.
   */
  fileTypeAudio();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -709112160;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a document.
 */
class fileTypeDocument final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a document.
   */
  fileTypeDocument();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -564722929;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a video for a live photo.
 */
class fileTypeLivePhotoVideo final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a video for a live photo.
   */
  fileTypeLivePhotoVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 444610924;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a notification sound.
 */
class fileTypeNotificationSound final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a notification sound.
   */
  fileTypeNotificationSound();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1020289271;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a photo.
 */
class fileTypePhoto final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a photo.
   */
  fileTypePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1718914651;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a photo published as a story.
 */
class fileTypePhotoStory final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a photo published as a story.
   */
  fileTypePhotoStory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2018995956;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a profile photo.
 */
class fileTypeProfilePhoto final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a profile photo.
   */
  fileTypeProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1795089315;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file was sent to a secret chat (the file type is not known to the server).
 */
class fileTypeSecret final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file was sent to a secret chat (the file type is not known to the server).
   */
  fileTypeSecret();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1871899401;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a thumbnail of a file from a secret chat.
 */
class fileTypeSecretThumbnail final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a thumbnail of a file from a secret chat.
   */
  fileTypeSecretThumbnail();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1401326026;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a file from Secure storage used for storing Telegram Passport files.
 */
class fileTypeSecure final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a file from Secure storage used for storing Telegram Passport files.
   */
  fileTypeSecure();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1419133146;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a self-destructing video for a live photo in a private chat.
 */
class fileTypeSelfDestructingLivePhotoVideo final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a self-destructing video for a live photo in a private chat.
   */
  fileTypeSelfDestructingLivePhotoVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1331098431;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a self-destructing photo in a private chat.
 */
class fileTypeSelfDestructingPhoto final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a self-destructing photo in a private chat.
   */
  fileTypeSelfDestructingPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2077176475;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a self-destructing video in a private chat.
 */
class fileTypeSelfDestructingVideo final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a self-destructing video in a private chat.
   */
  fileTypeSelfDestructingVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1223900123;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a self-destructing video note in a private chat.
 */
class fileTypeSelfDestructingVideoNote final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a self-destructing video note in a private chat.
   */
  fileTypeSelfDestructingVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1495274177;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a self-destructing voice note in a private chat.
 */
class fileTypeSelfDestructingVoiceNote final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a self-destructing voice note in a private chat.
   */
  fileTypeSelfDestructingVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1691409181;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a sticker.
 */
class fileTypeSticker final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a sticker.
   */
  fileTypeSticker();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 475233385;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a thumbnail of another file.
 */
class fileTypeThumbnail final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a thumbnail of another file.
   */
  fileTypeThumbnail();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -12443298;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file type is not yet known.
 */
class fileTypeUnknown final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file type is not yet known.
   */
  fileTypeUnknown();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2011566768;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a video.
 */
class fileTypeVideo final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a video.
   */
  fileTypeVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1430816539;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a video note.
 */
class fileTypeVideoNote final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a video note.
   */
  fileTypeVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -518412385;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a video published as a story.
 */
class fileTypeVideoStory final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a video published as a story.
   */
  fileTypeVideoStory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2146754143;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a voice note.
 */
class fileTypeVoiceNote final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a voice note.
   */
  fileTypeVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -588681661;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file is a wallpaper or a background pattern.
 */
class fileTypeWallpaper final : public FileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The file is a wallpaper or a background pattern.
   */
  fileTypeWallpaper();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1854930076;

  static object_ptr<FileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains settings for Firebase Authentication in the official applications.
 */
class FirebaseAuthenticationSettings: public Object {
 public:
  static jclass Class;

  static object_ptr<FirebaseAuthenticationSettings> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Settings for Firebase Authentication in the official Android application.
 */
class firebaseAuthenticationSettingsAndroid final : public FirebaseAuthenticationSettings {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Settings for Firebase Authentication in the official Android application.
   */
  firebaseAuthenticationSettingsAndroid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1771112932;

  static object_ptr<FirebaseAuthenticationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Settings for Firebase Authentication in the official iOS application.
 */
class firebaseAuthenticationSettingsIos final : public FirebaseAuthenticationSettings {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Device token from Apple Push Notification service.
  string device_token_;
  static jfieldID device_token_fieldID;
  /// True, if App Sandbox is enabled.
  bool is_app_sandbox_;
  static jfieldID is_app_sandbox_fieldID;

  /**
   * Settings for Firebase Authentication in the official iOS application.
   */
  firebaseAuthenticationSettingsIos();

  /**
   * Settings for Firebase Authentication in the official iOS application.
   *
   * \param[in] device_token_ Device token from Apple Push Notification service.
   * \param[in] is_app_sandbox_ True, if App Sandbox is enabled.
   */
  firebaseAuthenticationSettingsIos(string const &device_token_, bool is_app_sandbox_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 222930116;

  static object_ptr<FirebaseAuthenticationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes parameters to be used for device verification.
 */
class FirebaseDeviceVerificationParameters: public Object {
 public:
  static jclass Class;

  static object_ptr<FirebaseDeviceVerificationParameters> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Device verification must be performed with the SafetyNet Attestation API.
 */
class firebaseDeviceVerificationParametersSafetyNet final : public FirebaseDeviceVerificationParameters {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Nonce to pass to the SafetyNet Attestation API.
  bytes nonce_;
  static jfieldID nonce_fieldID;

  /**
   * Device verification must be performed with the SafetyNet Attestation API.
   */
  firebaseDeviceVerificationParametersSafetyNet();

  /**
   * Device verification must be performed with the SafetyNet Attestation API.
   *
   * \param[in] nonce_ Nonce to pass to the SafetyNet Attestation API.
   */
  explicit firebaseDeviceVerificationParametersSafetyNet(bytes const &nonce_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 731296497;

  static object_ptr<FirebaseDeviceVerificationParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Device verification must be performed with the classic Play Integrity verification (https://developer.android.com/google/play/integrity/classic).
 */
class firebaseDeviceVerificationParametersPlayIntegrity final : public FirebaseDeviceVerificationParameters {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Base64url-encoded nonce to pass to the Play Integrity API.
  string nonce_;
  static jfieldID nonce_fieldID;
  /// Cloud project number to pass to the Play Integrity API.
  int64 cloud_project_number_;
  static jfieldID cloud_project_number_fieldID;

  /**
   * Device verification must be performed with the classic Play Integrity verification (https://developer.android.com/google/play/integrity/classic).
   */
  firebaseDeviceVerificationParametersPlayIntegrity();

  /**
   * Device verification must be performed with the classic Play Integrity verification (https://developer.android.com/google/play/integrity/classic).
   *
   * \param[in] nonce_ Base64url-encoded nonce to pass to the Play Integrity API.
   * \param[in] cloud_project_number_ Cloud project number to pass to the Play Integrity API.
   */
  firebaseDeviceVerificationParametersPlayIntegrity(string const &nonce_, int64 cloud_project_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -889936502;

  static object_ptr<FirebaseDeviceVerificationParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class diffText;

class formattedText;

/**
 * A text fixed using fixTextWithAi.
 */
class fixedText final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The resulting text.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Changes made to the original text.
  object_ptr<diffText> diff_text_;
  static jfieldID diff_text_fieldID;

  /**
   * A text fixed using fixTextWithAi.
   */
  fixedText();

  /**
   * A text fixed using fixTextWithAi.
   *
   * \param[in] text_ The resulting text.
   * \param[in] diff_text_ Changes made to the original text.
   */
  fixedText(object_ptr<formattedText> &&text_, object_ptr<diffText> &&diff_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1714470508;

  static object_ptr<fixedText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class textEntity;

/**
 * A text with some entities.
 */
class formattedText final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text.
  string text_;
  static jfieldID text_fieldID;
  /// Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code, PreCode, and DateTime entities can't contain other entities. BlockQuote entities can't contain other BlockQuote entities. Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. All other entities can't contain each other.
  array<object_ptr<textEntity>> entities_;
  static jfieldID entities_fieldID;

  /**
   * A text with some entities.
   */
  formattedText();

  /**
   * A text with some entities.
   *
   * \param[in] text_ The text.
   * \param[in] entities_ Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code, PreCode, and DateTime entities can't contain other entities. BlockQuote entities can't contain other BlockQuote entities. Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. All other entities can't contain each other.
   */
  formattedText(string const &text_, array<object_ptr<textEntity>> &&entities_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -252624564;

  static object_ptr<formattedText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatNotificationSettings;

class draftMessage;

class forumTopicInfo;

class message;

/**
 * Describes a forum topic.
 */
class forumTopic final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Basic information about the topic.
  object_ptr<forumTopicInfo> info_;
  static jfieldID info_fieldID;
  /// Last message in the topic; may be null if unknown.
  object_ptr<message> last_message_;
  static jfieldID last_message_fieldID;
  /// A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order.
  int64 order_;
  static jfieldID order_fieldID;
  /// True, if the topic is pinned in the topic list.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;
  /// Number of unread messages in the topic.
  int32 unread_count_;
  static jfieldID unread_count_fieldID;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  static jfieldID last_read_inbox_message_id_fieldID;
  /// Identifier of the last read outgoing message.
  int53 last_read_outbox_message_id_;
  static jfieldID last_read_outbox_message_id_fieldID;
  /// Number of unread messages with a mention/reply in the topic.
  int32 unread_mention_count_;
  static jfieldID unread_mention_count_fieldID;
  /// Number of messages with unread reactions in the topic.
  int32 unread_reaction_count_;
  static jfieldID unread_reaction_count_fieldID;
  /// Number of messages with unread poll votes in the topic.
  int32 unread_poll_vote_count_;
  static jfieldID unread_poll_vote_count_fieldID;
  /// Notification settings for the topic.
  object_ptr<chatNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;
  /// A draft of a message in the topic; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;

  /**
   * Describes a forum topic.
   */
  forumTopic();

  /**
   * Describes a forum topic.
   *
   * \param[in] info_ Basic information about the topic.
   * \param[in] last_message_ Last message in the topic; may be null if unknown.
   * \param[in] order_ A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order.
   * \param[in] is_pinned_ True, if the topic is pinned in the topic list.
   * \param[in] unread_count_ Number of unread messages in the topic.
   * \param[in] last_read_inbox_message_id_ Identifier of the last read incoming message.
   * \param[in] last_read_outbox_message_id_ Identifier of the last read outgoing message.
   * \param[in] unread_mention_count_ Number of unread messages with a mention/reply in the topic.
   * \param[in] unread_reaction_count_ Number of messages with unread reactions in the topic.
   * \param[in] unread_poll_vote_count_ Number of messages with unread poll votes in the topic.
   * \param[in] notification_settings_ Notification settings for the topic.
   * \param[in] draft_message_ A draft of a message in the topic; may be null if none.
   */
  forumTopic(object_ptr<forumTopicInfo> &&info_, object_ptr<message> &&last_message_, int64 order_, bool is_pinned_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, int32 unread_reaction_count_, int32 unread_poll_vote_count_, object_ptr<chatNotificationSettings> &&notification_settings_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 779443783;

  static object_ptr<forumTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a forum topic icon.
 */
class forumTopicIcon final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Color of the topic icon in RGB format.
  int32 color_;
  static jfieldID color_fieldID;
  /// Unique identifier of the custom emoji shown on the topic icon; 0 if none.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * Describes a forum topic icon.
   */
  forumTopicIcon();

  /**
   * Describes a forum topic icon.
   *
   * \param[in] color_ Color of the topic icon in RGB format.
   * \param[in] custom_emoji_id_ Unique identifier of the custom emoji shown on the topic icon; 0 if none.
   */
  forumTopicIcon(int32 color_, int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -818765421;

  static object_ptr<forumTopicIcon> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class forumTopicIcon;

/**
 * Contains basic information about a forum topic.
 */
class forumTopicInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a forum supergroup chat or a chat with a bot to which the topic belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier of the topic.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// Name of the topic.
  string name_;
  static jfieldID name_fieldID;
  /// Icon of the topic.
  object_ptr<forumTopicIcon> icon_;
  static jfieldID icon_fieldID;
  /// Point in time (Unix timestamp) when the topic was created.
  int32 creation_date_;
  static jfieldID creation_date_fieldID;
  /// Identifier of the creator of the topic.
  object_ptr<MessageSender> creator_id_;
  static jfieldID creator_id_fieldID;
  /// True, if the topic is the General topic.
  bool is_general_;
  static jfieldID is_general_fieldID;
  /// True, if the topic was created by the current user.
  bool is_outgoing_;
  static jfieldID is_outgoing_fieldID;
  /// True, if the topic is closed. If the topic is closed, then the user must have can_manage_topics administrator right in the supergroup or must be the creator of the topic to send messages there.
  bool is_closed_;
  static jfieldID is_closed_fieldID;
  /// True, if the topic is hidden above the topic list and closed; for General topic only.
  bool is_hidden_;
  static jfieldID is_hidden_fieldID;
  /// True, if the name of the topic wasn't added explicitly.
  bool is_name_implicit_;
  static jfieldID is_name_implicit_fieldID;

  /**
   * Contains basic information about a forum topic.
   */
  forumTopicInfo();

  /**
   * Contains basic information about a forum topic.
   *
   * \param[in] chat_id_ Identifier of a forum supergroup chat or a chat with a bot to which the topic belongs.
   * \param[in] forum_topic_id_ Forum topic identifier of the topic.
   * \param[in] name_ Name of the topic.
   * \param[in] icon_ Icon of the topic.
   * \param[in] creation_date_ Point in time (Unix timestamp) when the topic was created.
   * \param[in] creator_id_ Identifier of the creator of the topic.
   * \param[in] is_general_ True, if the topic is the General topic.
   * \param[in] is_outgoing_ True, if the topic was created by the current user.
   * \param[in] is_closed_ True, if the topic is closed. If the topic is closed, then the user must have can_manage_topics administrator right in the supergroup or must be the creator of the topic to send messages there.
   * \param[in] is_hidden_ True, if the topic is hidden above the topic list and closed; for General topic only.
   * \param[in] is_name_implicit_ True, if the name of the topic wasn't added explicitly.
   */
  forumTopicInfo(int53 chat_id_, int32 forum_topic_id_, string const &name_, object_ptr<forumTopicIcon> &&icon_, int32 creation_date_, object_ptr<MessageSender> &&creator_id_, bool is_general_, bool is_outgoing_, bool is_closed_, bool is_hidden_, bool is_name_implicit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1951851836;

  static object_ptr<forumTopicInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class forumTopic;

/**
 * Describes a list of forum topics.
 */
class forumTopics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of forum topics found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of forum topics.
  array<object_ptr<forumTopic>> topics_;
  static jfieldID topics_fieldID;
  /// Offset date for the next getForumTopics request.
  int32 next_offset_date_;
  static jfieldID next_offset_date_fieldID;
  /// Offset message identifier for the next getForumTopics request.
  int53 next_offset_message_id_;
  static jfieldID next_offset_message_id_fieldID;
  /// Offset forum topic identifier for the next getForumTopics request.
  int32 next_offset_forum_topic_id_;
  static jfieldID next_offset_forum_topic_id_fieldID;

  /**
   * Describes a list of forum topics.
   */
  forumTopics();

  /**
   * Describes a list of forum topics.
   *
   * \param[in] total_count_ Approximate total number of forum topics found.
   * \param[in] topics_ List of forum topics.
   * \param[in] next_offset_date_ Offset date for the next getForumTopics request.
   * \param[in] next_offset_message_id_ Offset message identifier for the next getForumTopics request.
   * \param[in] next_offset_forum_topic_id_ Offset forum topic identifier for the next getForumTopics request.
   */
  forumTopics(int32 total_count_, array<object_ptr<forumTopic>> &&topics_, int32 next_offset_date_, int53 next_offset_message_id_, int32 next_offset_forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1877886267;

  static object_ptr<forumTopics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Contains information about the last message from which a new message was forwarded last time.
 */
class forwardSource final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message that was forwarded belonged; may be 0 if unknown.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message; may be 0 if unknown.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the sender of the message; may be null if unknown or the new message was forwarded not to Saved Messages.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Name of the sender of the message if the sender is hidden by their privacy settings.
  string sender_name_;
  static jfieldID sender_name_fieldID;
  /// Point in time (Unix timestamp) when the message is sent; 0 if unknown.
  int32 date_;
  static jfieldID date_fieldID;
  /// True, if the message that was forwarded is outgoing; always false if sender is unknown.
  bool is_outgoing_;
  static jfieldID is_outgoing_fieldID;

  /**
   * Contains information about the last message from which a new message was forwarded last time.
   */
  forwardSource();

  /**
   * Contains information about the last message from which a new message was forwarded last time.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message that was forwarded belonged; may be 0 if unknown.
   * \param[in] message_id_ Identifier of the message; may be 0 if unknown.
   * \param[in] sender_id_ Identifier of the sender of the message; may be null if unknown or the new message was forwarded not to Saved Messages.
   * \param[in] sender_name_ Name of the sender of the message if the sender is hidden by their privacy settings.
   * \param[in] date_ Point in time (Unix timestamp) when the message is sent; 0 if unknown.
   * \param[in] is_outgoing_ True, if the message that was forwarded is outgoing; always false if sender is unknown.
   */
  forwardSource(int53 chat_id_, int53 message_id_, object_ptr<MessageSender> &&sender_id_, string const &sender_name_, int32 date_, bool is_outgoing_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1795337929;

  static object_ptr<forwardSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class affiliateProgramInfo;

/**
 * Describes a found affiliate program.
 */
class foundAffiliateProgram final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot created the program.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Information about the affiliate program.
  object_ptr<affiliateProgramInfo> info_;
  static jfieldID info_fieldID;

  /**
   * Describes a found affiliate program.
   */
  foundAffiliateProgram();

  /**
   * Describes a found affiliate program.
   *
   * \param[in] bot_user_id_ User identifier of the bot created the program.
   * \param[in] info_ Information about the affiliate program.
   */
  foundAffiliateProgram(int53 bot_user_id_, object_ptr<affiliateProgramInfo> &&info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -966565242;

  static object_ptr<foundAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class foundAffiliateProgram;

/**
 * Represents a list of found affiliate programs.
 */
class foundAffiliatePrograms final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The total number of found affiliate programs.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of affiliate programs.
  array<object_ptr<foundAffiliateProgram>> programs_;
  static jfieldID programs_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of found affiliate programs.
   */
  foundAffiliatePrograms();

  /**
   * Represents a list of found affiliate programs.
   *
   * \param[in] total_count_ The total number of found affiliate programs.
   * \param[in] programs_ The list of affiliate programs.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  foundAffiliatePrograms(int32 total_count_, array<object_ptr<foundAffiliateProgram>> &&programs_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 186317057;

  static object_ptr<foundAffiliatePrograms> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatBoost;

/**
 * Contains a list of boosts applied to a chat.
 */
class foundChatBoosts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of boosts applied to the chat.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of boosts.
  array<object_ptr<chatBoost>> boosts_;
  static jfieldID boosts_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Contains a list of boosts applied to a chat.
   */
  foundChatBoosts();

  /**
   * Contains a list of boosts applied to a chat.
   *
   * \param[in] total_count_ Total number of boosts applied to the chat.
   * \param[in] boosts_ List of boosts.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  foundChatBoosts(int32 total_count_, array<object_ptr<chatBoost>> &&boosts_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 51457680;

  static object_ptr<foundChatBoosts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Contains a list of messages found by a search in a given chat.
 */
class foundChatMessages final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of messages found; -1 if unknown.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of messages.
  array<object_ptr<message>> messages_;
  static jfieldID messages_fieldID;
  /// The offset for the next request. If 0, there are no more results.
  int53 next_from_message_id_;
  static jfieldID next_from_message_id_fieldID;

  /**
   * Contains a list of messages found by a search in a given chat.
   */
  foundChatMessages();

  /**
   * Contains a list of messages found by a search in a given chat.
   *
   * \param[in] total_count_ Approximate total number of messages found; -1 if unknown.
   * \param[in] messages_ List of messages.
   * \param[in] next_from_message_id_ The offset for the next request. If 0, there are no more results.
   */
  foundChatMessages(int32 total_count_, array<object_ptr<message>> &&messages_, int53 next_from_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 427484196;

  static object_ptr<foundChatMessages> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class downloadedFileCounts;

class fileDownload;

/**
 * Contains a list of downloaded files, found by a search.
 */
class foundFileDownloads final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of suitable files, ignoring offset.
  object_ptr<downloadedFileCounts> total_counts_;
  static jfieldID total_counts_fieldID;
  /// The list of files.
  array<object_ptr<fileDownload>> files_;
  static jfieldID files_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Contains a list of downloaded files, found by a search.
   */
  foundFileDownloads();

  /**
   * Contains a list of downloaded files, found by a search.
   *
   * \param[in] total_counts_ Total number of suitable files, ignoring offset.
   * \param[in] files_ The list of files.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  foundFileDownloads(object_ptr<downloadedFileCounts> &&total_counts_, array<object_ptr<fileDownload>> &&files_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1395890392;

  static object_ptr<foundFileDownloads> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Contains a list of messages found by a search.
 */
class foundMessages final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of messages found; -1 if unknown.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of messages.
  array<object_ptr<message>> messages_;
  static jfieldID messages_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Contains a list of messages found by a search.
   */
  foundMessages();

  /**
   * Contains a list of messages found by a search.
   *
   * \param[in] total_count_ Approximate total number of messages found; -1 if unknown.
   * \param[in] messages_ List of messages.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  foundMessages(int32 total_count_, array<object_ptr<message>> &&messages_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -529809608;

  static object_ptr<foundMessages> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains 0-based match position.
 */
class foundPosition final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The position of the match.
  int32 position_;
  static jfieldID position_fieldID;

  /**
   * Contains 0-based match position.
   */
  foundPosition();

  /**
   * Contains 0-based match position.
   *
   * \param[in] position_ The position of the match.
   */
  explicit foundPosition(int32 position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1886724216;

  static object_ptr<foundPosition> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains 0-based positions of matched objects.
 */
class foundPositions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of matched objects.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The positions of the matched objects.
  array<int32> positions_;
  static jfieldID positions_fieldID;

  /**
   * Contains 0-based positions of matched objects.
   */
  foundPositions();

  /**
   * Contains 0-based positions of matched objects.
   *
   * \param[in] total_count_ Total number of matched objects.
   * \param[in] positions_ The positions of the matched objects.
   */
  foundPositions(int32 total_count_, array<int32> &&positions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -80518368;

  static object_ptr<foundPositions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

class publicPostSearchLimits;

/**
 * Contains a list of messages found by a public post search.
 */
class foundPublicPosts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of found public posts.
  array<object_ptr<message>> messages_;
  static jfieldID messages_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;
  /// Updated public post search limits after the query; repeated requests with the same query will be free; may be null if they didn't change.
  object_ptr<publicPostSearchLimits> search_limits_;
  static jfieldID search_limits_fieldID;
  /// True, if the query has failed because search limits are exceeded. In this case search_limits.daily_free_query_count will be equal to 0.
  bool are_limits_exceeded_;
  static jfieldID are_limits_exceeded_fieldID;

  /**
   * Contains a list of messages found by a public post search.
   */
  foundPublicPosts();

  /**
   * Contains a list of messages found by a public post search.
   *
   * \param[in] messages_ List of found public posts.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   * \param[in] search_limits_ Updated public post search limits after the query; repeated requests with the same query will be free; may be null if they didn't change.
   * \param[in] are_limits_exceeded_ True, if the query has failed because search limits are exceeded. In this case search_limits.daily_free_query_count will be equal to 0.
   */
  foundPublicPosts(array<object_ptr<message>> &&messages_, string const &next_offset_, object_ptr<publicPostSearchLimits> &&search_limits_, bool are_limits_exceeded_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1231347940;

  static object_ptr<foundPublicPosts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class story;

/**
 * Contains a list of stories found by a search.
 */
class foundStories final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of stories found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of stories.
  array<object_ptr<story>> stories_;
  static jfieldID stories_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Contains a list of stories found by a search.
   */
  foundStories();

  /**
   * Contains a list of stories found by a search.
   *
   * \param[in] total_count_ Approximate total number of stories found.
   * \param[in] stories_ List of stories.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  foundStories(int32 total_count_, array<object_ptr<story>> &&stories_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1678513512;

  static object_ptr<foundStories> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a list of found users.
 */
class foundUsers final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of the found users.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of found users.
   */
  foundUsers();

  /**
   * Represents a list of found users.
   *
   * \param[in] user_ids_ Identifiers of the found users.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  foundUsers(array<int53> &&user_ids_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1150570075;

  static object_ptr<foundUsers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class webApp;

/**
 * Contains information about a Web App found by its short name.
 */
class foundWebApp final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The Web App.
  object_ptr<webApp> web_app_;
  static jfieldID web_app_fieldID;
  /// True, if the user must be asked for the permission to the bot to send them messages.
  bool request_write_access_;
  static jfieldID request_write_access_fieldID;
  /// True, if there is no need to show an ordinary open URL confirmation before opening the Web App. The field must be ignored and confirmation must be shown anyway if the Web App link was hidden.
  bool skip_confirmation_;
  static jfieldID skip_confirmation_fieldID;

  /**
   * Contains information about a Web App found by its short name.
   */
  foundWebApp();

  /**
   * Contains information about a Web App found by its short name.
   *
   * \param[in] web_app_ The Web App.
   * \param[in] request_write_access_ True, if the user must be asked for the permission to the bot to send them messages.
   * \param[in] skip_confirmation_ True, if there is no need to show an ordinary open URL confirmation before opening the Web App. The field must be ignored and confirmation must be shown anyway if the Web App link was hidden.
   */
  foundWebApp(object_ptr<webApp> &&web_app_, bool request_write_access_, bool skip_confirmation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -290926562;

  static object_ptr<foundWebApp> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class animation;

class formattedText;

class photo;

/**
 * Describes a game. Use getInternalLink with internalLinkTypeGame to share the game.
 */
class game final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique game identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Game short name.
  string short_name_;
  static jfieldID short_name_fieldID;
  /// Game title.
  string title_;
  static jfieldID title_fieldID;
  /// Game text, usually containing scoreboards for a game.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Game description.
  string description_;
  static jfieldID description_fieldID;
  /// Game photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Game animation; may be null.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;

  /**
   * Describes a game. Use getInternalLink with internalLinkTypeGame to share the game.
   */
  game();

  /**
   * Describes a game. Use getInternalLink with internalLinkTypeGame to share the game.
   *
   * \param[in] id_ Unique game identifier.
   * \param[in] short_name_ Game short name.
   * \param[in] title_ Game title.
   * \param[in] text_ Game text, usually containing scoreboards for a game.
   * \param[in] description_ Game description.
   * \param[in] photo_ Game photo.
   * \param[in] animation_ Game animation; may be null.
   */
  game(int64 id_, string const &short_name_, string const &title_, object_ptr<formattedText> &&text_, string const &description_, object_ptr<photo> &&photo_, object_ptr<animation> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1565597752;

  static object_ptr<game> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains one row of the game high score table.
 */
class gameHighScore final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Position in the high score table.
  int32 position_;
  static jfieldID position_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// User score.
  int32 score_;
  static jfieldID score_fieldID;

  /**
   * Contains one row of the game high score table.
   */
  gameHighScore();

  /**
   * Contains one row of the game high score table.
   *
   * \param[in] position_ Position in the high score table.
   * \param[in] user_id_ User identifier.
   * \param[in] score_ User score.
   */
  gameHighScore(int32 position_, int53 user_id_, int32 score_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 342871838;

  static object_ptr<gameHighScore> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class gameHighScore;

/**
 * Contains a list of game high scores.
 */
class gameHighScores final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of game high scores.
  array<object_ptr<gameHighScore>> scores_;
  static jfieldID scores_fieldID;

  /**
   * Contains a list of game high scores.
   */
  gameHighScores();

  /**
   * Contains a list of game high scores.
   *
   * \param[in] scores_ A list of game high scores.
   */
  explicit gameHighScores(array<object_ptr<gameHighScore>> &&scores_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -725770727;

  static object_ptr<gameHighScores> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftAuction;

class giftBackground;

class giftPurchaseLimits;

class sticker;

/**
 * Describes a gift that can be sent to another user or channel chat.
 */
class gift final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the gift.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the chat that published the gift; 0 if none.
  int53 publisher_chat_id_;
  static jfieldID publisher_chat_id_fieldID;
  /// The sticker representing the gift.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// Number of Telegram Stars that must be paid for the gift.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
  int53 default_sell_star_count_;
  static jfieldID default_sell_star_count_fieldID;
  /// Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
  int53 upgrade_star_count_;
  static jfieldID upgrade_star_count_fieldID;
  /// Number of unique gift variants that are available for the upgraded gift; 0 if unknown.
  int32 upgrade_variant_count_;
  static jfieldID upgrade_variant_count_fieldID;
  /// True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.
  bool has_colors_;
  static jfieldID has_colors_fieldID;
  /// True, if the gift is a birthday gift.
  bool is_for_birthday_;
  static jfieldID is_for_birthday_fieldID;
  /// True, if the gift can be bought only by Telegram Premium subscribers.
  bool is_premium_;
  static jfieldID is_premium_fieldID;
  /// Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.
  object_ptr<giftAuction> auction_info_;
  static jfieldID auction_info_fieldID;
  /// Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now.
  int32 next_send_date_;
  static jfieldID next_send_date_fieldID;
  /// Number of times the gift can be purchased by the current user; may be null if not limited.
  object_ptr<giftPurchaseLimits> user_limits_;
  static jfieldID user_limits_fieldID;
  /// Number of times the gift can be purchased all users; may be null if not limited.
  object_ptr<giftPurchaseLimits> overall_limits_;
  static jfieldID overall_limits_fieldID;
  /// Background of the gift.
  object_ptr<giftBackground> background_;
  static jfieldID background_fieldID;
  /// Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
  int32 first_send_date_;
  static jfieldID first_send_date_fieldID;
  /// Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
  int32 last_send_date_;
  static jfieldID last_send_date_fieldID;

  /**
   * Describes a gift that can be sent to another user or channel chat.
   */
  gift();

  /**
   * Describes a gift that can be sent to another user or channel chat.
   *
   * \param[in] id_ Unique identifier of the gift.
   * \param[in] publisher_chat_id_ Identifier of the chat that published the gift; 0 if none.
   * \param[in] sticker_ The sticker representing the gift.
   * \param[in] star_count_ Number of Telegram Stars that must be paid for the gift.
   * \param[in] default_sell_star_count_ Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
   * \param[in] upgrade_star_count_ Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
   * \param[in] upgrade_variant_count_ Number of unique gift variants that are available for the upgraded gift; 0 if unknown.
   * \param[in] has_colors_ True, if the gift can be used to customize the user's name, and backgrounds of profile photo, reply header, and link preview.
   * \param[in] is_for_birthday_ True, if the gift is a birthday gift.
   * \param[in] is_premium_ True, if the gift can be bought only by Telegram Premium subscribers.
   * \param[in] auction_info_ Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly.
   * \param[in] next_send_date_ Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can't be sent now.
   * \param[in] user_limits_ Number of times the gift can be purchased by the current user; may be null if not limited.
   * \param[in] overall_limits_ Number of times the gift can be purchased all users; may be null if not limited.
   * \param[in] background_ Background of the gift.
   * \param[in] first_send_date_ Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
   * \param[in] last_send_date_ Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
   */
  gift(int64 id_, int53 publisher_chat_id_, object_ptr<sticker> &&sticker_, int53 star_count_, int53 default_sell_star_count_, int53 upgrade_star_count_, int32 upgrade_variant_count_, bool has_colors_, bool is_for_birthday_, bool is_premium_, object_ptr<giftAuction> &&auction_info_, int32 next_send_date_, object_ptr<giftPurchaseLimits> &&user_limits_, object_ptr<giftPurchaseLimits> &&overall_limits_, object_ptr<giftBackground> &&background_, int32 first_send_date_, int32 last_send_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1567244615;

  static object_ptr<gift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an auction on which a gift can be purchased.
 */
class giftAuction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the auction.
  string id_;
  static jfieldID id_fieldID;
  /// Number of gifts distributed in each round.
  int32 gifts_per_round_;
  static jfieldID gifts_per_round_fieldID;
  /// Point in time (Unix timestamp) when the auction will start.
  int32 start_date_;
  static jfieldID start_date_fieldID;

  /**
   * Describes an auction on which a gift can be purchased.
   */
  giftAuction();

  /**
   * Describes an auction on which a gift can be purchased.
   *
   * \param[in] id_ Identifier of the auction.
   * \param[in] gifts_per_round_ Number of gifts distributed in each round.
   * \param[in] start_date_ Point in time (Unix timestamp) when the auction will start.
   */
  giftAuction(string const &id_, int32 gifts_per_round_, int32 start_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -907929982;

  static object_ptr<giftAuction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class formattedText;

/**
 * Represents a gift that was acquired by the current user on an auction.
 */
class giftAuctionAcquiredGift final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Receiver of the gift.
  object_ptr<MessageSender> receiver_id_;
  static jfieldID receiver_id_fieldID;
  /// Point in time (Unix timestamp) when the gift was acquired.
  int32 date_;
  static jfieldID date_fieldID;
  /// The number of Telegram Stars that were paid for the gift.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the auction round in which the gift was acquired.
  int32 auction_round_number_;
  static jfieldID auction_round_number_fieldID;
  /// Position of the user in the round among all auction participants.
  int32 auction_round_position_;
  static jfieldID auction_round_position_fieldID;
  /// Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
  int32 unique_gift_number_;
  static jfieldID unique_gift_number_fieldID;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
  bool is_private_;
  static jfieldID is_private_fieldID;

  /**
   * Represents a gift that was acquired by the current user on an auction.
   */
  giftAuctionAcquiredGift();

  /**
   * Represents a gift that was acquired by the current user on an auction.
   *
   * \param[in] receiver_id_ Receiver of the gift.
   * \param[in] date_ Point in time (Unix timestamp) when the gift was acquired.
   * \param[in] star_count_ The number of Telegram Stars that were paid for the gift.
   * \param[in] auction_round_number_ Identifier of the auction round in which the gift was acquired.
   * \param[in] auction_round_position_ Position of the user in the round among all auction participants.
   * \param[in] unique_gift_number_ Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
   * \param[in] text_ Message added to the gift.
   * \param[in] is_private_ True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
   */
  giftAuctionAcquiredGift(object_ptr<MessageSender> &&receiver_id_, int32 date_, int53 star_count_, int32 auction_round_number_, int32 auction_round_position_, int32 unique_gift_number_, object_ptr<formattedText> &&text_, bool is_private_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1109930332;

  static object_ptr<giftAuctionAcquiredGift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftAuctionAcquiredGift;

/**
 * Represents a list of gifts that were acquired by the current user on an auction.
 */
class giftAuctionAcquiredGifts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of acquired gifts.
  array<object_ptr<giftAuctionAcquiredGift>> gifts_;
  static jfieldID gifts_fieldID;

  /**
   * Represents a list of gifts that were acquired by the current user on an auction.
   */
  giftAuctionAcquiredGifts();

  /**
   * Represents a list of gifts that were acquired by the current user on an auction.
   *
   * \param[in] gifts_ The list of acquired gifts.
   */
  explicit giftAuctionAcquiredGifts(array<object_ptr<giftAuctionAcquiredGift>> &&gifts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1203777214;

  static object_ptr<giftAuctionAcquiredGifts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class AuctionState;

class gift;

/**
 * Represent auction state of a gift.
 */
class giftAuctionState final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;
  /// Auction state of the gift.
  object_ptr<AuctionState> state_;
  static jfieldID state_fieldID;

  /**
   * Represent auction state of a gift.
   */
  giftAuctionState();

  /**
   * Represent auction state of a gift.
   *
   * \param[in] gift_ The gift.
   * \param[in] state_ Auction state of the gift.
   */
  giftAuctionState(object_ptr<gift> &&gift_, object_ptr<AuctionState> &&state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1691485529;

  static object_ptr<giftAuctionState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes background of a gift.
 */
class giftBackground final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Center color in RGB format.
  int32 center_color_;
  static jfieldID center_color_fieldID;
  /// Edge color in RGB format.
  int32 edge_color_;
  static jfieldID edge_color_fieldID;
  /// Text color in RGB format.
  int32 text_color_;
  static jfieldID text_color_fieldID;

  /**
   * Describes background of a gift.
   */
  giftBackground();

  /**
   * Describes background of a gift.
   *
   * \param[in] center_color_ Center color in RGB format.
   * \param[in] edge_color_ Edge color in RGB format.
   * \param[in] text_color_ Text color in RGB format.
   */
  giftBackground(int32 center_color_, int32 edge_color_, int32 text_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 269232091;

  static object_ptr<giftBackground> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class themeSettings;

class upgradedGift;

/**
 * Describes a chat theme based on an upgraded gift.
 */
class giftChatTheme final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// Theme settings for a light chat theme.
  object_ptr<themeSettings> light_settings_;
  static jfieldID light_settings_fieldID;
  /// Theme settings for a dark chat theme.
  object_ptr<themeSettings> dark_settings_;
  static jfieldID dark_settings_fieldID;

  /**
   * Describes a chat theme based on an upgraded gift.
   */
  giftChatTheme();

  /**
   * Describes a chat theme based on an upgraded gift.
   *
   * \param[in] gift_ The gift.
   * \param[in] light_settings_ Theme settings for a light chat theme.
   * \param[in] dark_settings_ Theme settings for a dark chat theme.
   */
  giftChatTheme(object_ptr<upgradedGift> &&gift_, object_ptr<themeSettings> &&light_settings_, object_ptr<themeSettings> &&dark_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 631944675;

  static object_ptr<giftChatTheme> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftChatTheme;

/**
 * Contains a list of chat themes based on upgraded gifts.
 */
class giftChatThemes final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of chat themes.
  array<object_ptr<giftChatTheme>> themes_;
  static jfieldID themes_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Contains a list of chat themes based on upgraded gifts.
   */
  giftChatThemes();

  /**
   * Contains a list of chat themes based on upgraded gifts.
   *
   * \param[in] themes_ A list of chat themes.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  giftChatThemes(array<object_ptr<giftChatTheme>> &&themes_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2032762331;

  static object_ptr<giftChatThemes> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Describes collection of gifts.
 */
class giftCollection final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the collection.
  int32 id_;
  static jfieldID id_fieldID;
  /// Name of the collection.
  string name_;
  static jfieldID name_fieldID;
  /// Icon of the collection; may be null if none.
  object_ptr<sticker> icon_;
  static jfieldID icon_fieldID;
  /// Total number of gifts in the collection.
  int32 gift_count_;
  static jfieldID gift_count_fieldID;

  /**
   * Describes collection of gifts.
   */
  giftCollection();

  /**
   * Describes collection of gifts.
   *
   * \param[in] id_ Unique identifier of the collection.
   * \param[in] name_ Name of the collection.
   * \param[in] icon_ Icon of the collection; may be null if none.
   * \param[in] gift_count_ Total number of gifts in the collection.
   */
  giftCollection(int32 id_, string const &name_, object_ptr<sticker> &&icon_, int32 gift_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -974976984;

  static object_ptr<giftCollection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftCollection;

/**
 * Contains a list of gift collections.
 */
class giftCollections final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of gift collections.
  array<object_ptr<giftCollection>> collections_;
  static jfieldID collections_fieldID;

  /**
   * Contains a list of gift collections.
   */
  giftCollections();

  /**
   * Contains a list of gift collections.
   *
   * \param[in] collections_ List of gift collections.
   */
  explicit giftCollections(array<object_ptr<giftCollection>> &&collections_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2061353335;

  static object_ptr<giftCollections> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGift;

/**
 * Describes a gift available for resale.
 */
class giftForResale final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// Unique identifier of the received gift for the current user; only for the gifts owned by the current user.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;

  /**
   * Describes a gift available for resale.
   */
  giftForResale();

  /**
   * Describes a gift available for resale.
   *
   * \param[in] gift_ The gift.
   * \param[in] received_gift_id_ Unique identifier of the received gift for the current user; only for the gifts owned by the current user.
   */
  giftForResale(object_ptr<upgradedGift> &&gift_, string const &received_gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1130990515;

  static object_ptr<giftForResale> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes order in which upgraded gifts for resale will be sorted.
 */
class GiftForResaleOrder: public Object {
 public:
  static jclass Class;

  static object_ptr<GiftForResaleOrder> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gifts will be sorted by their price from the lowest to the highest.
 */
class giftForResaleOrderPrice final : public GiftForResaleOrder {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gifts will be sorted by their price from the lowest to the highest.
   */
  giftForResaleOrderPrice();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1371740258;

  static object_ptr<GiftForResaleOrder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gifts will be sorted by the last date when their price was changed from the newest to the oldest.
 */
class giftForResaleOrderPriceChangeDate final : public GiftForResaleOrder {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gifts will be sorted by the last date when their price was changed from the newest to the oldest.
   */
  giftForResaleOrderPriceChangeDate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1694144054;

  static object_ptr<GiftForResaleOrder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gifts will be sorted by their number from the smallest to the largest.
 */
class giftForResaleOrderNumber final : public GiftForResaleOrder {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gifts will be sorted by their number from the smallest to the largest.
   */
  giftForResaleOrderNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1301157632;

  static object_ptr<GiftForResaleOrder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes the maximum number of times that a specific gift can be purchased.
 */
class giftPurchaseLimits final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum number of times the gifts can be purchased.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Number of remaining times the gift can be purchased.
  int32 remaining_count_;
  static jfieldID remaining_count_fieldID;

  /**
   * Describes the maximum number of times that a specific gift can be purchased.
   */
  giftPurchaseLimits();

  /**
   * Describes the maximum number of times that a specific gift can be purchased.
   *
   * \param[in] total_count_ The maximum number of times the gifts can be purchased.
   * \param[in] remaining_count_ Number of remaining times the gift can be purchased.
   */
  giftPurchaseLimits(int32 total_count_, int32 remaining_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1628985177;

  static object_ptr<giftPurchaseLimits> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes state of a gift purchase offer.
 */
class GiftPurchaseOfferState: public Object {
 public:
  static jclass Class;

  static object_ptr<GiftPurchaseOfferState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The offer must be accepted or rejected.
 */
class giftPurchaseOfferStatePending final : public GiftPurchaseOfferState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The offer must be accepted or rejected.
   */
  giftPurchaseOfferStatePending();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 568086522;

  static object_ptr<GiftPurchaseOfferState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The offer was accepted.
 */
class giftPurchaseOfferStateAccepted final : public GiftPurchaseOfferState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The offer was accepted.
   */
  giftPurchaseOfferStateAccepted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 267078794;

  static object_ptr<GiftPurchaseOfferState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The offer was rejected.
 */
class giftPurchaseOfferStateRejected final : public GiftPurchaseOfferState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The offer was rejected.
   */
  giftPurchaseOfferStateRejected();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1637834462;

  static object_ptr<GiftPurchaseOfferState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes parameters of a unique gift available for resale.
 */
class giftResaleParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Resale price of the gift in Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Resale price of the gift in 1/100 of Toncoin.
  int53 toncoin_cent_count_;
  static jfieldID toncoin_cent_count_fieldID;
  /// True, if the gift can be bought only using Toncoins.
  bool toncoin_only_;
  static jfieldID toncoin_only_fieldID;

  /**
   * Describes parameters of a unique gift available for resale.
   */
  giftResaleParameters();

  /**
   * Describes parameters of a unique gift available for resale.
   *
   * \param[in] star_count_ Resale price of the gift in Telegram Stars.
   * \param[in] toncoin_cent_count_ Resale price of the gift in 1/100 of Toncoin.
   * \param[in] toncoin_only_ True, if the gift can be bought only using Toncoins.
   */
  giftResaleParameters(int53 star_count_, int53 toncoin_cent_count_, bool toncoin_only_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2144380890;

  static object_ptr<giftResaleParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes price of a resold gift.
 */
class GiftResalePrice: public Object {
 public:
  static jclass Class;

  static object_ptr<GiftResalePrice> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes price of a resold gift in Telegram Stars.
 */
class giftResalePriceStar final : public GiftResalePrice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The Telegram Star amount expected to be paid for the gift. Must be in the range getOption(&quot;gift_resale_star_count_min&quot;)-getOption(&quot;gift_resale_star_count_max&quot;) for gifts put for resale.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Describes price of a resold gift in Telegram Stars.
   */
  giftResalePriceStar();

  /**
   * Describes price of a resold gift in Telegram Stars.
   *
   * \param[in] star_count_ The Telegram Star amount expected to be paid for the gift. Must be in the range getOption(&quot;gift_resale_star_count_min&quot;)-getOption(&quot;gift_resale_star_count_max&quot;) for gifts put for resale.
   */
  explicit giftResalePriceStar(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1184402054;

  static object_ptr<GiftResalePrice> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes price of a resold gift in Toncoins.
 */
class giftResalePriceTon final : public GiftResalePrice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The amount of 1/100 of Toncoin expected to be paid for the gift. Must be in the range getOption(&quot;gift_resale_toncoin_cent_count_min&quot;)-getOption(&quot;gift_resale_toncoin_cent_count_max&quot;).
  int53 toncoin_cent_count_;
  static jfieldID toncoin_cent_count_fieldID;

  /**
   * Describes price of a resold gift in Toncoins.
   */
  giftResalePriceTon();

  /**
   * Describes price of a resold gift in Toncoins.
   *
   * \param[in] toncoin_cent_count_ The amount of 1/100 of Toncoin expected to be paid for the gift. Must be in the range getOption(&quot;gift_resale_toncoin_cent_count_min&quot;)-getOption(&quot;gift_resale_toncoin_cent_count_max&quot;).
   */
  explicit giftResalePriceTon(int53 toncoin_cent_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -415435950;

  static object_ptr<GiftResalePrice> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class GiftResalePrice;

/**
 * This class is an abstract base class.
 * Describes result of sending a resold gift.
 */
class GiftResaleResult: public Object {
 public:
  static jclass Class;

  static object_ptr<GiftResaleResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Operation was successfully completed.
 */
class giftResaleResultOk final : public GiftResaleResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the received gift; only for the gifts sent to the current user.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;

  /**
   * Operation was successfully completed.
   */
  giftResaleResultOk();

  /**
   * Operation was successfully completed.
   *
   * \param[in] received_gift_id_ Unique identifier of the received gift; only for the gifts sent to the current user.
   */
  explicit giftResaleResultOk(string const &received_gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -778580572;

  static object_ptr<GiftResaleResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Operation has failed, because price has increased. If the price has decreased, then the buying will succeed anyway.
 */
class giftResaleResultPriceIncreased final : public GiftResaleResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New price for the gift.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;

  /**
   * Operation has failed, because price has increased. If the price has decreased, then the buying will succeed anyway.
   */
  giftResaleResultPriceIncreased();

  /**
   * Operation has failed, because price has increased. If the price has decreased, then the buying will succeed anyway.
   *
   * \param[in] price_ New price for the gift.
   */
  explicit giftResaleResultPriceIncreased(object_ptr<GiftResalePrice> &&price_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1954623859;

  static object_ptr<GiftResaleResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class acceptedGiftTypes;

/**
 * Contains settings for gift receiving for a user.
 */
class giftSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if a button for sending a gift to the user or by the user must always be shown in the input field.
  bool show_gift_button_;
  static jfieldID show_gift_button_fieldID;
  /// Types of gifts accepted by the user; for Telegram Premium users only.
  object_ptr<acceptedGiftTypes> accepted_gift_types_;
  static jfieldID accepted_gift_types_fieldID;

  /**
   * Contains settings for gift receiving for a user.
   */
  giftSettings();

  /**
   * Contains settings for gift receiving for a user.
   *
   * \param[in] show_gift_button_ True, if a button for sending a gift to the user or by the user must always be shown in the input field.
   * \param[in] accepted_gift_types_ Types of gifts accepted by the user; for Telegram Premium users only.
   */
  giftSettings(bool show_gift_button_, object_ptr<acceptedGiftTypes> &&accepted_gift_types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 45783168;

  static object_ptr<giftSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftUpgradePrice;

class upgradedGiftBackdrop;

class upgradedGiftModel;

class upgradedGiftSymbol;

/**
 * Contains examples of possible upgraded gifts for the given regular gift.
 */
class giftUpgradePreview final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Examples of possible models that can be chosen for the gift after upgrade.
  array<object_ptr<upgradedGiftModel>> models_;
  static jfieldID models_fieldID;
  /// Examples of possible symbols that can be chosen for the gift after upgrade.
  array<object_ptr<upgradedGiftSymbol>> symbols_;
  static jfieldID symbols_fieldID;
  /// Examples of possible backdrops that can be chosen for the gift after upgrade.
  array<object_ptr<upgradedGiftBackdrop>> backdrops_;
  static jfieldID backdrops_fieldID;
  /// Examples of price for gift upgrade from the maximum price to the minimum price.
  array<object_ptr<giftUpgradePrice>> prices_;
  static jfieldID prices_fieldID;
  /// Next changes for the price for gift upgrade with more granularity than in prices.
  array<object_ptr<giftUpgradePrice>> next_prices_;
  static jfieldID next_prices_fieldID;

  /**
   * Contains examples of possible upgraded gifts for the given regular gift.
   */
  giftUpgradePreview();

  /**
   * Contains examples of possible upgraded gifts for the given regular gift.
   *
   * \param[in] models_ Examples of possible models that can be chosen for the gift after upgrade.
   * \param[in] symbols_ Examples of possible symbols that can be chosen for the gift after upgrade.
   * \param[in] backdrops_ Examples of possible backdrops that can be chosen for the gift after upgrade.
   * \param[in] prices_ Examples of price for gift upgrade from the maximum price to the minimum price.
   * \param[in] next_prices_ Next changes for the price for gift upgrade with more granularity than in prices.
   */
  giftUpgradePreview(array<object_ptr<upgradedGiftModel>> &&models_, array<object_ptr<upgradedGiftSymbol>> &&symbols_, array<object_ptr<upgradedGiftBackdrop>> &&backdrops_, array<object_ptr<giftUpgradePrice>> &&prices_, array<object_ptr<giftUpgradePrice>> &&next_prices_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -330012073;

  static object_ptr<giftUpgradePreview> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a price required to pay to upgrade a gift.
 */
class giftUpgradePrice final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the price will be in effect.
  int32 date_;
  static jfieldID date_fieldID;
  /// The Telegram Star amount required to pay to upgrade the gift.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Describes a price required to pay to upgrade a gift.
   */
  giftUpgradePrice();

  /**
   * Describes a price required to pay to upgrade a gift.
   *
   * \param[in] date_ Point in time (Unix timestamp) when the price will be in effect.
   * \param[in] star_count_ The Telegram Star amount required to pay to upgrade the gift.
   */
  giftUpgradePrice(int32 date_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -914121900;

  static object_ptr<giftUpgradePrice> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGiftBackdrop;

class upgradedGiftModel;

class upgradedGiftSymbol;

/**
 * Contains all possible variants of upgraded gifts for the given regular gift.
 */
class giftUpgradeVariants final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Models that can be chosen for the gift after upgrade.
  array<object_ptr<upgradedGiftModel>> models_;
  static jfieldID models_fieldID;
  /// Symbols that can be chosen for the gift after upgrade.
  array<object_ptr<upgradedGiftSymbol>> symbols_;
  static jfieldID symbols_fieldID;
  /// Backdrops that can be chosen for the gift after upgrade.
  array<object_ptr<upgradedGiftBackdrop>> backdrops_;
  static jfieldID backdrops_fieldID;

  /**
   * Contains all possible variants of upgraded gifts for the given regular gift.
   */
  giftUpgradeVariants();

  /**
   * Contains all possible variants of upgraded gifts for the given regular gift.
   *
   * \param[in] models_ Models that can be chosen for the gift after upgrade.
   * \param[in] symbols_ Symbols that can be chosen for the gift after upgrade.
   * \param[in] backdrops_ Backdrops that can be chosen for the gift after upgrade.
   */
  giftUpgradeVariants(array<object_ptr<upgradedGiftModel>> &&models_, array<object_ptr<upgradedGiftSymbol>> &&symbols_, array<object_ptr<upgradedGiftBackdrop>> &&backdrops_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -797379063;

  static object_ptr<giftUpgradeVariants> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class attributeCraftPersistenceProbability;

class receivedGift;

/**
 * Represents a list of gifts received by a user or a chat.
 */
class giftsForCrafting final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The total number of received gifts.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of gifts.
  array<object_ptr<receivedGift>> gifts_;
  static jfieldID gifts_fieldID;
  /// The 4 objects that describe probabilities of the crafted gift to have the backdrop or symbol of one of the original gifts for the cases when 1, 2, 3 or 4 gifts are used in the craft correspondingly.
  array<object_ptr<attributeCraftPersistenceProbability>> attribute_persistence_probabilities_;
  static jfieldID attribute_persistence_probabilities_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of gifts received by a user or a chat.
   */
  giftsForCrafting();

  /**
   * Represents a list of gifts received by a user or a chat.
   *
   * \param[in] total_count_ The total number of received gifts.
   * \param[in] gifts_ The list of gifts.
   * \param[in] attribute_persistence_probabilities_ The 4 objects that describe probabilities of the crafted gift to have the backdrop or symbol of one of the original gifts for the cases when 1, 2, 3 or 4 gifts are used in the craft correspondingly.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  giftsForCrafting(int32 total_count_, array<object_ptr<receivedGift>> &&gifts_, array<object_ptr<attributeCraftPersistenceProbability>> &&attribute_persistence_probabilities_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -474640200;

  static object_ptr<giftsForCrafting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class giftForResale;

class upgradedGiftBackdropCount;

class upgradedGiftModelCount;

class upgradedGiftSymbolCount;

/**
 * Describes gifts available for resale.
 */
class giftsForResale final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of gifts found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The gifts.
  array<object_ptr<giftForResale>> gifts_;
  static jfieldID gifts_fieldID;
  /// Available models; for searchGiftsForResale requests without offset and attributes only.
  array<object_ptr<upgradedGiftModelCount>> models_;
  static jfieldID models_fieldID;
  /// Available symbols; for searchGiftsForResale requests without offset and attributes only.
  array<object_ptr<upgradedGiftSymbolCount>> symbols_;
  static jfieldID symbols_fieldID;
  /// Available backdrops; for searchGiftsForResale requests without offset and attributes only.
  array<object_ptr<upgradedGiftBackdropCount>> backdrops_;
  static jfieldID backdrops_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Describes gifts available for resale.
   */
  giftsForResale();

  /**
   * Describes gifts available for resale.
   *
   * \param[in] total_count_ Total number of gifts found.
   * \param[in] gifts_ The gifts.
   * \param[in] models_ Available models; for searchGiftsForResale requests without offset and attributes only.
   * \param[in] symbols_ Available symbols; for searchGiftsForResale requests without offset and attributes only.
   * \param[in] backdrops_ Available backdrops; for searchGiftsForResale requests without offset and attributes only.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  giftsForResale(int32 total_count_, array<object_ptr<giftForResale>> &&gifts_, array<object_ptr<upgradedGiftModelCount>> &&models_, array<object_ptr<upgradedGiftSymbolCount>> &&symbols_, array<object_ptr<upgradedGiftBackdropCount>> &&backdrops_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 35082425;

  static object_ptr<giftsForResale> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class GiveawayParticipantStatus;

/**
 * This class is an abstract base class.
 * Contains information about a giveaway.
 */
class GiveawayInfo: public Object {
 public:
  static jclass Class;

  static object_ptr<GiveawayInfo> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an ongoing giveaway.
 */
class giveawayInfoOngoing final : public GiveawayInfo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the giveaway was created.
  int32 creation_date_;
  static jfieldID creation_date_fieldID;
  /// Status of the current user in the giveaway.
  object_ptr<GiveawayParticipantStatus> status_;
  static jfieldID status_fieldID;
  /// True, if the giveaway has ended and results are being prepared.
  bool is_ended_;
  static jfieldID is_ended_fieldID;

  /**
   * Describes an ongoing giveaway.
   */
  giveawayInfoOngoing();

  /**
   * Describes an ongoing giveaway.
   *
   * \param[in] creation_date_ Point in time (Unix timestamp) when the giveaway was created.
   * \param[in] status_ Status of the current user in the giveaway.
   * \param[in] is_ended_ True, if the giveaway has ended and results are being prepared.
   */
  giveawayInfoOngoing(int32 creation_date_, object_ptr<GiveawayParticipantStatus> &&status_, bool is_ended_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1649336400;

  static object_ptr<GiveawayInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a completed giveaway.
 */
class giveawayInfoCompleted final : public GiveawayInfo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the giveaway was created.
  int32 creation_date_;
  static jfieldID creation_date_fieldID;
  /// Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway.
  int32 actual_winners_selection_date_;
  static jfieldID actual_winners_selection_date_fieldID;
  /// True, if the giveaway was canceled and was fully refunded.
  bool was_refunded_;
  static jfieldID was_refunded_fieldID;
  /// True, if the current user is a winner of the giveaway.
  bool is_winner_;
  static jfieldID is_winner_fieldID;
  /// Number of winners in the giveaway.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Number of winners, which activated their gift codes; for Telegram Premium giveaways only.
  int32 activation_count_;
  static jfieldID activation_count_fieldID;
  /// Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Premium giveaway.
  string gift_code_;
  static jfieldID gift_code_fieldID;
  /// The Telegram Star amount won by the current user; 0 if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star giveaway.
  int53 won_star_count_;
  static jfieldID won_star_count_fieldID;

  /**
   * Describes a completed giveaway.
   */
  giveawayInfoCompleted();

  /**
   * Describes a completed giveaway.
   *
   * \param[in] creation_date_ Point in time (Unix timestamp) when the giveaway was created.
   * \param[in] actual_winners_selection_date_ Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway.
   * \param[in] was_refunded_ True, if the giveaway was canceled and was fully refunded.
   * \param[in] is_winner_ True, if the current user is a winner of the giveaway.
   * \param[in] winner_count_ Number of winners in the giveaway.
   * \param[in] activation_count_ Number of winners, which activated their gift codes; for Telegram Premium giveaways only.
   * \param[in] gift_code_ Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Premium giveaway.
   * \param[in] won_star_count_ The Telegram Star amount won by the current user; 0 if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Star giveaway.
   */
  giveawayInfoCompleted(int32 creation_date_, int32 actual_winners_selection_date_, bool was_refunded_, bool is_winner_, int32 winner_count_, int32 activation_count_, string const &gift_code_, int53 won_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 848085852;

  static object_ptr<GiveawayInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes parameters of a giveaway.
 */
class giveawayParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Telegram Premium subscription, or for the specified time. If the chat is a channel, then can_post_messages administrator right is required in the channel, otherwise, the user must be an administrator in the supergroup.
  int53 boosted_chat_id_;
  static jfieldID boosted_chat_id_fieldID;
  /// Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption(&quot;giveaway_additional_chat_count_max&quot;) additional chats.
  array<int53> additional_chat_ids_;
  static jfieldID additional_chat_ids_fieldID;
  /// Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption(&quot;giveaway_duration_max&quot;) seconds in the future in scheduled giveaways.
  int32 winners_selection_date_;
  static jfieldID winners_selection_date_fieldID;
  /// True, if only new members of the chats will be eligible for the giveaway.
  bool only_new_members_;
  static jfieldID only_new_members_fieldID;
  /// True, if the list of winners of the giveaway will be available to everyone.
  bool has_public_winners_;
  static jfieldID has_public_winners_fieldID;
  /// The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption(&quot;giveaway_country_count_max&quot;) chosen countries. Users with phone number that was bought at https://fragment.com can participate in any giveaway and the country code &quot;FT&quot; must not be specified in the list.
  array<string> country_codes_;
  static jfieldID country_codes_fieldID;
  /// Additional description of the giveaway prize; 0-128 characters.
  string prize_description_;
  static jfieldID prize_description_fieldID;

  /**
   * Describes parameters of a giveaway.
   */
  giveawayParameters();

  /**
   * Describes parameters of a giveaway.
   *
   * \param[in] boosted_chat_id_ Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Telegram Premium subscription, or for the specified time. If the chat is a channel, then can_post_messages administrator right is required in the channel, otherwise, the user must be an administrator in the supergroup.
   * \param[in] additional_chat_ids_ Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption(&quot;giveaway_additional_chat_count_max&quot;) additional chats.
   * \param[in] winners_selection_date_ Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption(&quot;giveaway_duration_max&quot;) seconds in the future in scheduled giveaways.
   * \param[in] only_new_members_ True, if only new members of the chats will be eligible for the giveaway.
   * \param[in] has_public_winners_ True, if the list of winners of the giveaway will be available to everyone.
   * \param[in] country_codes_ The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption(&quot;giveaway_country_count_max&quot;) chosen countries. Users with phone number that was bought at https://fragment.com can participate in any giveaway and the country code &quot;FT&quot; must not be specified in the list.
   * \param[in] prize_description_ Additional description of the giveaway prize; 0-128 characters.
   */
  giveawayParameters(int53 boosted_chat_id_, array<int53> &&additional_chat_ids_, int32 winners_selection_date_, bool only_new_members_, bool has_public_winners_, array<string> &&country_codes_, string const &prize_description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1171549354;

  static object_ptr<giveawayParameters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about status of a user in a giveaway.
 */
class GiveawayParticipantStatus: public Object {
 public:
  static jclass Class;

  static object_ptr<GiveawayParticipantStatus> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is eligible for the giveaway.
 */
class giveawayParticipantStatusEligible final : public GiveawayParticipantStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is eligible for the giveaway.
   */
  giveawayParticipantStatusEligible();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 304799383;

  static object_ptr<GiveawayParticipantStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user participates in the giveaway.
 */
class giveawayParticipantStatusParticipating final : public GiveawayParticipantStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user participates in the giveaway.
   */
  giveawayParticipantStatusParticipating();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 492036975;

  static object_ptr<GiveawayParticipantStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't participate in the giveaway, because they have already been member of the chat.
 */
class giveawayParticipantStatusAlreadyWasMember final : public GiveawayParticipantStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the user joined the chat.
  int32 joined_chat_date_;
  static jfieldID joined_chat_date_fieldID;

  /**
   * The user can't participate in the giveaway, because they have already been member of the chat.
   */
  giveawayParticipantStatusAlreadyWasMember();

  /**
   * The user can't participate in the giveaway, because they have already been member of the chat.
   *
   * \param[in] joined_chat_date_ Point in time (Unix timestamp) when the user joined the chat.
   */
  explicit giveawayParticipantStatusAlreadyWasMember(int32 joined_chat_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 301577632;

  static object_ptr<GiveawayParticipantStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't participate in the giveaway, because they are an administrator in one of the chats that created the giveaway.
 */
class giveawayParticipantStatusAdministrator final : public GiveawayParticipantStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat administered by the user.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The user can't participate in the giveaway, because they are an administrator in one of the chats that created the giveaway.
   */
  giveawayParticipantStatusAdministrator();

  /**
   * The user can't participate in the giveaway, because they are an administrator in one of the chats that created the giveaway.
   *
   * \param[in] chat_id_ Identifier of the chat administered by the user.
   */
  explicit giveawayParticipantStatusAdministrator(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -934593931;

  static object_ptr<GiveawayParticipantStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't participate in the giveaway, because they phone number is from a disallowed country.
 */
class giveawayParticipantStatusDisallowedCountry final : public GiveawayParticipantStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 3166-1 alpha-2 country code of the user's country.
  string user_country_code_;
  static jfieldID user_country_code_fieldID;

  /**
   * The user can't participate in the giveaway, because they phone number is from a disallowed country.
   */
  giveawayParticipantStatusDisallowedCountry();

  /**
   * The user can't participate in the giveaway, because they phone number is from a disallowed country.
   *
   * \param[in] user_country_code_ A two-letter ISO 3166-1 alpha-2 country code of the user's country.
   */
  explicit giveawayParticipantStatusDisallowedCountry(string const &user_country_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1879794779;

  static object_ptr<GiveawayParticipantStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about a giveaway prize.
 */
class GiveawayPrize: public Object {
 public:
  static jclass Class;

  static object_ptr<GiveawayPrize> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The giveaway sends Telegram Premium subscriptions to the winners.
 */
class giveawayPrizePremium final : public GiveawayPrize {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of months the Telegram Premium subscription will be active after code activation.
  int32 month_count_;
  static jfieldID month_count_fieldID;

  /**
   * The giveaway sends Telegram Premium subscriptions to the winners.
   */
  giveawayPrizePremium();

  /**
   * The giveaway sends Telegram Premium subscriptions to the winners.
   *
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active after code activation.
   */
  explicit giveawayPrizePremium(int32 month_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 454224248;

  static object_ptr<GiveawayPrize> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The giveaway sends Telegram Stars to the winners.
 */
class giveawayPrizeStars final : public GiveawayPrize {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that will be shared by all winners.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * The giveaway sends Telegram Stars to the winners.
   */
  giveawayPrizeStars();

  /**
   * The giveaway sends Telegram Stars to the winners.
   *
   * \param[in] star_count_ Number of Telegram Stars that will be shared by all winners.
   */
  explicit giveawayPrizeStars(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1790173276;

  static object_ptr<GiveawayPrize> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class groupCallRecentSpeaker;

/**
 * Describes a group call.
 */
class groupCall final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// Persistent unique group call identifier.
  int64 unique_id_;
  static jfieldID unique_id_fieldID;
  /// Group call title; for video chats only.
  string title_;
  static jfieldID title_fieldID;
  /// Invite link for the group call; for group calls that aren't bound to a chat. For video chats call getVideoChatInviteLink to get the link. For live stories in chats with username call getInternalLink with internalLinkTypeLiveStory.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// The minimum number of Telegram Stars that must be paid by general participant for each sent message to the call; for live stories only.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;
  /// Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 if it is already active or was ended; for video chats only.
  int32 scheduled_start_date_;
  static jfieldID scheduled_start_date_fieldID;
  /// True, if the group call is scheduled and the current user will receive a notification when the group call starts; for video chats only.
  bool enabled_start_notification_;
  static jfieldID enabled_start_notification_fieldID;
  /// True, if the call is active.
  bool is_active_;
  static jfieldID is_active_fieldID;
  /// True, if the call is bound to a chat.
  bool is_video_chat_;
  static jfieldID is_video_chat_fieldID;
  /// True, if the call is a live story of a chat.
  bool is_live_story_;
  static jfieldID is_live_story_fieldID;
  /// True, if the call is an RTMP stream instead of an ordinary video chat; for video chats and live stories only.
  bool is_rtmp_stream_;
  static jfieldID is_rtmp_stream_fieldID;
  /// True, if the call is joined.
  bool is_joined_;
  static jfieldID is_joined_fieldID;
  /// True, if user was kicked from the call because of network loss and the call needs to be rejoined.
  bool need_rejoin_;
  static jfieldID need_rejoin_fieldID;
  /// True, if the user is the owner of the call and can end the call, change volume level of other users, or ban users there; for group calls that aren't bound to a chat.
  bool is_owned_;
  static jfieldID is_owned_fieldID;
  /// True, if the current user can manage the group call; for video chats and live stories only.
  bool can_be_managed_;
  static jfieldID can_be_managed_fieldID;
  /// Number of participants in the group call.
  int32 participant_count_;
  static jfieldID participant_count_fieldID;
  /// True, if group call participants, which are muted, aren't returned in participant list; for video chats only.
  bool has_hidden_listeners_;
  static jfieldID has_hidden_listeners_fieldID;
  /// True, if all group call participants are loaded.
  bool loaded_all_participants_;
  static jfieldID loaded_all_participants_fieldID;
  /// Message sender chosen to send messages to the group call; for live stories only; may be null if the call isn't a live story.
  object_ptr<MessageSender> message_sender_id_;
  static jfieldID message_sender_id_fieldID;
  /// At most 3 recently speaking users in the group call.
  array<object_ptr<groupCallRecentSpeaker>> recent_speakers_;
  static jfieldID recent_speakers_fieldID;
  /// True, if the current user's video is enabled.
  bool is_my_video_enabled_;
  static jfieldID is_my_video_enabled_fieldID;
  /// True, if the current user's video is paused.
  bool is_my_video_paused_;
  static jfieldID is_my_video_paused_fieldID;
  /// True, if the current user can broadcast video or share screen.
  bool can_enable_video_;
  static jfieldID can_enable_video_fieldID;
  /// True, if only group call administrators can unmute new participants; for video chats only.
  bool mute_new_participants_;
  static jfieldID mute_new_participants_fieldID;
  /// True, if the current user can enable or disable mute_new_participants setting; for video chats only.
  bool can_toggle_mute_new_participants_;
  static jfieldID can_toggle_mute_new_participants_fieldID;
  /// True, if the current user can send messages to the group call.
  bool can_send_messages_;
  static jfieldID can_send_messages_fieldID;
  /// True, if sending of messages is allowed in the group call.
  bool are_messages_allowed_;
  static jfieldID are_messages_allowed_fieldID;
  /// True, if the current user can enable or disable sending of messages in the group call.
  bool can_toggle_are_messages_allowed_;
  static jfieldID can_toggle_are_messages_allowed_fieldID;
  /// True, if the user can delete messages in the group call.
  bool can_delete_messages_;
  static jfieldID can_delete_messages_fieldID;
  /// Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on.
  int32 record_duration_;
  static jfieldID record_duration_fieldID;
  /// True, if a video file is being recorded for the call.
  bool is_video_recorded_;
  static jfieldID is_video_recorded_fieldID;
  /// Call duration, in seconds; for ended calls only.
  int32 duration_;
  static jfieldID duration_fieldID;

  /**
   * Describes a group call.
   */
  groupCall();

  /**
   * Describes a group call.
   *
   * \param[in] id_ Group call identifier.
   * \param[in] unique_id_ Persistent unique group call identifier.
   * \param[in] title_ Group call title; for video chats only.
   * \param[in] invite_link_ Invite link for the group call; for group calls that aren't bound to a chat. For video chats call getVideoChatInviteLink to get the link. For live stories in chats with username call getInternalLink with internalLinkTypeLiveStory.
   * \param[in] paid_message_star_count_ The minimum number of Telegram Stars that must be paid by general participant for each sent message to the call; for live stories only.
   * \param[in] scheduled_start_date_ Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 if it is already active or was ended; for video chats only.
   * \param[in] enabled_start_notification_ True, if the group call is scheduled and the current user will receive a notification when the group call starts; for video chats only.
   * \param[in] is_active_ True, if the call is active.
   * \param[in] is_video_chat_ True, if the call is bound to a chat.
   * \param[in] is_live_story_ True, if the call is a live story of a chat.
   * \param[in] is_rtmp_stream_ True, if the call is an RTMP stream instead of an ordinary video chat; for video chats and live stories only.
   * \param[in] is_joined_ True, if the call is joined.
   * \param[in] need_rejoin_ True, if user was kicked from the call because of network loss and the call needs to be rejoined.
   * \param[in] is_owned_ True, if the user is the owner of the call and can end the call, change volume level of other users, or ban users there; for group calls that aren't bound to a chat.
   * \param[in] can_be_managed_ True, if the current user can manage the group call; for video chats and live stories only.
   * \param[in] participant_count_ Number of participants in the group call.
   * \param[in] has_hidden_listeners_ True, if group call participants, which are muted, aren't returned in participant list; for video chats only.
   * \param[in] loaded_all_participants_ True, if all group call participants are loaded.
   * \param[in] message_sender_id_ Message sender chosen to send messages to the group call; for live stories only; may be null if the call isn't a live story.
   * \param[in] recent_speakers_ At most 3 recently speaking users in the group call.
   * \param[in] is_my_video_enabled_ True, if the current user's video is enabled.
   * \param[in] is_my_video_paused_ True, if the current user's video is paused.
   * \param[in] can_enable_video_ True, if the current user can broadcast video or share screen.
   * \param[in] mute_new_participants_ True, if only group call administrators can unmute new participants; for video chats only.
   * \param[in] can_toggle_mute_new_participants_ True, if the current user can enable or disable mute_new_participants setting; for video chats only.
   * \param[in] can_send_messages_ True, if the current user can send messages to the group call.
   * \param[in] are_messages_allowed_ True, if sending of messages is allowed in the group call.
   * \param[in] can_toggle_are_messages_allowed_ True, if the current user can enable or disable sending of messages in the group call.
   * \param[in] can_delete_messages_ True, if the user can delete messages in the group call.
   * \param[in] record_duration_ Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on.
   * \param[in] is_video_recorded_ True, if a video file is being recorded for the call.
   * \param[in] duration_ Call duration, in seconds; for ended calls only.
   */
  groupCall(int32 id_, int64 unique_id_, string const &title_, string const &invite_link_, int53 paid_message_star_count_, int32 scheduled_start_date_, bool enabled_start_notification_, bool is_active_, bool is_video_chat_, bool is_live_story_, bool is_rtmp_stream_, bool is_joined_, bool need_rejoin_, bool is_owned_, bool can_be_managed_, int32 participant_count_, bool has_hidden_listeners_, bool loaded_all_participants_, object_ptr<MessageSender> &&message_sender_id_, array<object_ptr<groupCallRecentSpeaker>> &&recent_speakers_, bool is_my_video_enabled_, bool is_my_video_paused_, bool can_enable_video_, bool mute_new_participants_, bool can_toggle_mute_new_participants_, bool can_send_messages_, bool are_messages_allowed_, bool can_toggle_are_messages_allowed_, bool can_delete_messages_, int32 record_duration_, bool is_video_recorded_, int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1673382770;

  static object_ptr<groupCall> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes data channel for a group call.
 */
class GroupCallDataChannel: public Object {
 public:
  static jclass Class;

  static object_ptr<GroupCallDataChannel> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The main data channel for audio and video data.
 */
class groupCallDataChannelMain final : public GroupCallDataChannel {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The main data channel for audio and video data.
   */
  groupCallDataChannelMain();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -32177779;

  static object_ptr<GroupCallDataChannel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The data channel for screen sharing.
 */
class groupCallDataChannelScreenSharing final : public GroupCallDataChannel {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The data channel for screen sharing.
   */
  groupCallDataChannelScreenSharing();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -601649103;

  static object_ptr<GroupCallDataChannel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains the group call identifier.
 */
class groupCallId final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 id_;
  static jfieldID id_fieldID;

  /**
   * Contains the group call identifier.
   */
  groupCallId();

  /**
   * Contains the group call identifier.
   *
   * \param[in] id_ Group call identifier.
   */
  explicit groupCallId(int32 id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 350534469;

  static object_ptr<groupCallId> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a just created or just joined group call.
 */
class groupCallInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Join response payload for tgcalls; empty if the call isn't joined.
  string join_payload_;
  static jfieldID join_payload_fieldID;

  /**
   * Contains information about a just created or just joined group call.
   */
  groupCallInfo();

  /**
   * Contains information about a just created or just joined group call.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] join_payload_ Join response payload for tgcalls; empty if the call isn't joined.
   */
  groupCallInfo(int32 group_call_id_, string const &join_payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 892575956;

  static object_ptr<groupCallInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes parameters used to join a group call.
 */
class groupCallJoinParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Audio channel synchronization source identifier; received from tgcalls.
  int32 audio_source_id_;
  static jfieldID audio_source_id_fieldID;
  /// Group call join payload; received from tgcalls.
  string payload_;
  static jfieldID payload_fieldID;
  /// Pass true to join the call with muted microphone.
  bool is_muted_;
  static jfieldID is_muted_fieldID;
  /// Pass true if the user's video is enabled.
  bool is_my_video_enabled_;
  static jfieldID is_my_video_enabled_fieldID;

  /**
   * Describes parameters used to join a group call.
   */
  groupCallJoinParameters();

  /**
   * Describes parameters used to join a group call.
   *
   * \param[in] audio_source_id_ Audio channel synchronization source identifier; received from tgcalls.
   * \param[in] payload_ Group call join payload; received from tgcalls.
   * \param[in] is_muted_ Pass true to join the call with muted microphone.
   * \param[in] is_my_video_enabled_ Pass true if the user's video is enabled.
   */
  groupCallJoinParameters(int32 audio_source_id_, string const &payload_, bool is_muted_, bool is_my_video_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1763438054;

  static object_ptr<groupCallJoinParameters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class formattedText;

/**
 * Represents a message sent in a group call.
 */
class groupCallMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique message identifier within the group call.
  int32 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Point in time (Unix timestamp) when the message was sent.
  int32 date_;
  static jfieldID date_fieldID;
  /// Text of the message. If empty, then the message is a paid reaction in a live story.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// The number of Telegram Stars that were paid to send the message; for live stories only.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;
  /// True, if the message is sent by the owner of the call and must be treated as a message of the maximum level; for live stories only.
  bool is_from_owner_;
  static jfieldID is_from_owner_fieldID;
  /// True, if the message can be deleted by the current user; for live stories only.
  bool can_be_deleted_;
  static jfieldID can_be_deleted_fieldID;

  /**
   * Represents a message sent in a group call.
   */
  groupCallMessage();

  /**
   * Represents a message sent in a group call.
   *
   * \param[in] message_id_ Unique message identifier within the group call.
   * \param[in] sender_id_ Identifier of the sender of the message.
   * \param[in] date_ Point in time (Unix timestamp) when the message was sent.
   * \param[in] text_ Text of the message. If empty, then the message is a paid reaction in a live story.
   * \param[in] paid_message_star_count_ The number of Telegram Stars that were paid to send the message; for live stories only.
   * \param[in] is_from_owner_ True, if the message is sent by the owner of the call and must be treated as a message of the maximum level; for live stories only.
   * \param[in] can_be_deleted_ True, if the message can be deleted by the current user; for live stories only.
   */
  groupCallMessage(int32 message_id_, object_ptr<MessageSender> &&sender_id_, int32 date_, object_ptr<formattedText> &&text_, int53 paid_message_star_count_, bool is_from_owner_, bool can_be_deleted_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 216155597;

  static object_ptr<groupCallMessage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a level of features for a message sent in a live story group call.
 */
class groupCallMessageLevel final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The minimum number of Telegram Stars required to get features of the level.
  int53 min_star_count_;
  static jfieldID min_star_count_fieldID;
  /// The amount of time the message of this level will be pinned, in seconds.
  int32 pin_duration_;
  static jfieldID pin_duration_fieldID;
  /// The maximum allowed length of the message text.
  int32 max_text_length_;
  static jfieldID max_text_length_fieldID;
  /// The maximum allowed number of custom emoji in the message text.
  int32 max_custom_emoji_count_;
  static jfieldID max_custom_emoji_count_fieldID;
  /// The first color used to show the message text in the RGB format.
  int32 first_color_;
  static jfieldID first_color_fieldID;
  /// The second color used to show the message text in the RGB format.
  int32 second_color_;
  static jfieldID second_color_fieldID;
  /// Background color for the message the RGB format.
  int32 background_color_;
  static jfieldID background_color_fieldID;

  /**
   * Represents a level of features for a message sent in a live story group call.
   */
  groupCallMessageLevel();

  /**
   * Represents a level of features for a message sent in a live story group call.
   *
   * \param[in] min_star_count_ The minimum number of Telegram Stars required to get features of the level.
   * \param[in] pin_duration_ The amount of time the message of this level will be pinned, in seconds.
   * \param[in] max_text_length_ The maximum allowed length of the message text.
   * \param[in] max_custom_emoji_count_ The maximum allowed number of custom emoji in the message text.
   * \param[in] first_color_ The first color used to show the message text in the RGB format.
   * \param[in] second_color_ The second color used to show the message text in the RGB format.
   * \param[in] background_color_ Background color for the message the RGB format.
   */
  groupCallMessageLevel(int53 min_star_count_, int32 pin_duration_, int32 max_text_length_, int32 max_custom_emoji_count_, int32 first_color_, int32 second_color_, int32 background_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 994685918;

  static object_ptr<groupCallMessageLevel> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class groupCallParticipantVideoInfo;

/**
 * Represents a group call participant.
 */
class groupCallParticipant final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call participant.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// User's audio channel synchronization source identifier.
  int32 audio_source_id_;
  static jfieldID audio_source_id_fieldID;
  /// User's screen sharing audio channel synchronization source identifier.
  int32 screen_sharing_audio_source_id_;
  static jfieldID screen_sharing_audio_source_id_fieldID;
  /// Information about user's video channel; may be null if there is no active video.
  object_ptr<groupCallParticipantVideoInfo> video_info_;
  static jfieldID video_info_fieldID;
  /// Information about user's screen sharing video channel; may be null if there is no active screen sharing video.
  object_ptr<groupCallParticipantVideoInfo> screen_sharing_video_info_;
  static jfieldID screen_sharing_video_info_fieldID;
  /// The participant user's bio or the participant chat's description.
  string bio_;
  static jfieldID bio_fieldID;
  /// True, if the participant is the current user.
  bool is_current_user_;
  static jfieldID is_current_user_fieldID;
  /// True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking.
  bool is_speaking_;
  static jfieldID is_speaking_fieldID;
  /// True, if the participant hand is raised.
  bool is_hand_raised_;
  static jfieldID is_hand_raised_fieldID;
  /// True, if the current user can mute the participant for all other group call participants.
  bool can_be_muted_for_all_users_;
  static jfieldID can_be_muted_for_all_users_fieldID;
  /// True, if the current user can allow the participant to unmute themselves or unmute the participant (if the participant is the current user).
  bool can_be_unmuted_for_all_users_;
  static jfieldID can_be_unmuted_for_all_users_fieldID;
  /// True, if the current user can mute the participant only for self.
  bool can_be_muted_for_current_user_;
  static jfieldID can_be_muted_for_current_user_fieldID;
  /// True, if the current user can unmute the participant for self.
  bool can_be_unmuted_for_current_user_;
  static jfieldID can_be_unmuted_for_current_user_fieldID;
  /// True, if the participant is muted for all users.
  bool is_muted_for_all_users_;
  static jfieldID is_muted_for_all_users_fieldID;
  /// True, if the participant is muted for the current user.
  bool is_muted_for_current_user_;
  static jfieldID is_muted_for_current_user_fieldID;
  /// True, if the participant is muted for all users, but can unmute themselves.
  bool can_unmute_self_;
  static jfieldID can_unmute_self_fieldID;
  /// Participant's volume level; 1-20000 in hundreds of percents.
  int32 volume_level_;
  static jfieldID volume_level_fieldID;
  /// User's order in the group call participant list. Orders must be compared lexicographically. The bigger is order, the higher is user in the list. If order is empty, the user must be removed from the participant list.
  string order_;
  static jfieldID order_fieldID;

  /**
   * Represents a group call participant.
   */
  groupCallParticipant();

  /**
   * Represents a group call participant.
   *
   * \param[in] participant_id_ Identifier of the group call participant.
   * \param[in] audio_source_id_ User's audio channel synchronization source identifier.
   * \param[in] screen_sharing_audio_source_id_ User's screen sharing audio channel synchronization source identifier.
   * \param[in] video_info_ Information about user's video channel; may be null if there is no active video.
   * \param[in] screen_sharing_video_info_ Information about user's screen sharing video channel; may be null if there is no active screen sharing video.
   * \param[in] bio_ The participant user's bio or the participant chat's description.
   * \param[in] is_current_user_ True, if the participant is the current user.
   * \param[in] is_speaking_ True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking.
   * \param[in] is_hand_raised_ True, if the participant hand is raised.
   * \param[in] can_be_muted_for_all_users_ True, if the current user can mute the participant for all other group call participants.
   * \param[in] can_be_unmuted_for_all_users_ True, if the current user can allow the participant to unmute themselves or unmute the participant (if the participant is the current user).
   * \param[in] can_be_muted_for_current_user_ True, if the current user can mute the participant only for self.
   * \param[in] can_be_unmuted_for_current_user_ True, if the current user can unmute the participant for self.
   * \param[in] is_muted_for_all_users_ True, if the participant is muted for all users.
   * \param[in] is_muted_for_current_user_ True, if the participant is muted for the current user.
   * \param[in] can_unmute_self_ True, if the participant is muted for all users, but can unmute themselves.
   * \param[in] volume_level_ Participant's volume level; 1-20000 in hundreds of percents.
   * \param[in] order_ User's order in the group call participant list. Orders must be compared lexicographically. The bigger is order, the higher is user in the list. If order is empty, the user must be removed from the participant list.
   */
  groupCallParticipant(object_ptr<MessageSender> &&participant_id_, int32 audio_source_id_, int32 screen_sharing_audio_source_id_, object_ptr<groupCallParticipantVideoInfo> &&video_info_, object_ptr<groupCallParticipantVideoInfo> &&screen_sharing_video_info_, string const &bio_, bool is_current_user_, bool is_speaking_, bool is_hand_raised_, bool can_be_muted_for_all_users_, bool can_be_unmuted_for_all_users_, bool can_be_muted_for_current_user_, bool can_be_unmuted_for_current_user_, bool is_muted_for_all_users_, bool is_muted_for_current_user_, bool can_unmute_self_, int32 volume_level_, string const &order_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2059182571;

  static object_ptr<groupCallParticipant> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class groupCallVideoSourceGroup;

/**
 * Contains information about a group call participant's video channel.
 */
class groupCallParticipantVideoInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of synchronization source groups of the video.
  array<object_ptr<groupCallVideoSourceGroup>> source_groups_;
  static jfieldID source_groups_fieldID;
  /// Video channel endpoint identifier.
  string endpoint_id_;
  static jfieldID endpoint_id_fieldID;
  /// True, if the video is paused. This flag needs to be ignored, if new video frames are received.
  bool is_paused_;
  static jfieldID is_paused_fieldID;

  /**
   * Contains information about a group call participant's video channel.
   */
  groupCallParticipantVideoInfo();

  /**
   * Contains information about a group call participant's video channel.
   *
   * \param[in] source_groups_ List of synchronization source groups of the video.
   * \param[in] endpoint_id_ Video channel endpoint identifier.
   * \param[in] is_paused_ True, if the video is paused. This flag needs to be ignored, if new video frames are received.
   */
  groupCallParticipantVideoInfo(array<object_ptr<groupCallVideoSourceGroup>> &&source_groups_, string const &endpoint_id_, bool is_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -14294645;

  static object_ptr<groupCallParticipantVideoInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Contains identifiers of group call participants.
 */
class groupCallParticipants final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of group call participants.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Identifiers of the participants.
  array<object_ptr<MessageSender>> participant_ids_;
  static jfieldID participant_ids_fieldID;

  /**
   * Contains identifiers of group call participants.
   */
  groupCallParticipants();

  /**
   * Contains identifiers of group call participants.
   *
   * \param[in] total_count_ Total number of group call participants.
   * \param[in] participant_ids_ Identifiers of the participants.
   */
  groupCallParticipants(int32 total_count_, array<object_ptr<MessageSender>> &&participant_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1042491570;

  static object_ptr<groupCallParticipants> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Describes a recently speaking participant in a group call.
 */
class groupCallRecentSpeaker final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call participant identifier.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// True, is the user has spoken recently.
  bool is_speaking_;
  static jfieldID is_speaking_fieldID;

  /**
   * Describes a recently speaking participant in a group call.
   */
  groupCallRecentSpeaker();

  /**
   * Describes a recently speaking participant in a group call.
   *
   * \param[in] participant_id_ Group call participant identifier.
   * \param[in] is_speaking_ True, is the user has spoken recently.
   */
  groupCallRecentSpeaker(object_ptr<MessageSender> &&participant_id_, bool is_speaking_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1819519436;

  static object_ptr<groupCallRecentSpeaker> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an available stream in a video chat or a live story.
 */
class groupCallStream final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of an audio/video channel.
  int32 channel_id_;
  static jfieldID channel_id_fieldID;
  /// Scale of segment durations in the stream. The duration is 1000/(2**scale) milliseconds.
  int32 scale_;
  static jfieldID scale_fieldID;
  /// Point in time when the stream currently ends; Unix timestamp in milliseconds.
  int53 time_offset_;
  static jfieldID time_offset_fieldID;

  /**
   * Describes an available stream in a video chat or a live story.
   */
  groupCallStream();

  /**
   * Describes an available stream in a video chat or a live story.
   *
   * \param[in] channel_id_ Identifier of an audio/video channel.
   * \param[in] scale_ Scale of segment durations in the stream. The duration is 1000/(2**scale) milliseconds.
   * \param[in] time_offset_ Point in time when the stream currently ends; Unix timestamp in milliseconds.
   */
  groupCallStream(int32 channel_id_, int32 scale_, int53 time_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -264564795;

  static object_ptr<groupCallStream> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class groupCallStream;

/**
 * Represents a list of group call streams.
 */
class groupCallStreams final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of group call streams.
  array<object_ptr<groupCallStream>> streams_;
  static jfieldID streams_fieldID;

  /**
   * Represents a list of group call streams.
   */
  groupCallStreams();

  /**
   * Represents a list of group call streams.
   *
   * \param[in] streams_ A list of group call streams.
   */
  explicit groupCallStreams(array<object_ptr<groupCallStream>> &&streams_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1032959578;

  static object_ptr<groupCallStreams> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the quality of a group call video.
 */
class GroupCallVideoQuality: public Object {
 public:
  static jclass Class;

  static object_ptr<GroupCallVideoQuality> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The worst available video quality.
 */
class groupCallVideoQualityThumbnail final : public GroupCallVideoQuality {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The worst available video quality.
   */
  groupCallVideoQualityThumbnail();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -379186304;

  static object_ptr<GroupCallVideoQuality> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The medium video quality.
 */
class groupCallVideoQualityMedium final : public GroupCallVideoQuality {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The medium video quality.
   */
  groupCallVideoQualityMedium();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 394968234;

  static object_ptr<GroupCallVideoQuality> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The best available video quality.
 */
class groupCallVideoQualityFull final : public GroupCallVideoQuality {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The best available video quality.
   */
  groupCallVideoQualityFull();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2125916617;

  static object_ptr<GroupCallVideoQuality> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a group of video synchronization source identifiers.
 */
class groupCallVideoSourceGroup final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The semantics of sources, one of &quot;SIM&quot; or &quot;FID&quot;.
  string semantics_;
  static jfieldID semantics_fieldID;
  /// The list of synchronization source identifiers.
  array<int32> source_ids_;
  static jfieldID source_ids_fieldID;

  /**
   * Describes a group of video synchronization source identifiers.
   */
  groupCallVideoSourceGroup();

  /**
   * Describes a group of video synchronization source identifiers.
   *
   * \param[in] semantics_ The semantics of sources, one of &quot;SIM&quot; or &quot;FID&quot;.
   * \param[in] source_ids_ The list of synchronization source identifiers.
   */
  groupCallVideoSourceGroup(string const &semantics_, array<int32> &&source_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1190900785;

  static object_ptr<groupCallVideoSourceGroup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a list of hashtags.
 */
class hashtags final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of hashtags.
  array<string> hashtags_;
  static jfieldID hashtags_fieldID;

  /**
   * Contains a list of hashtags.
   */
  hashtags();

  /**
   * Contains a list of hashtags.
   *
   * \param[in] hashtags_ A list of hashtags.
   */
  explicit hashtags(array<string> &&hashtags_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 676798885;

  static object_ptr<hashtags> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains an HTTP URL.
 */
class httpUrl final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The URL.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Contains an HTTP URL.
   */
  httpUrl();

  /**
   * Contains an HTTP URL.
   *
   * \param[in] url_ The URL.
   */
  explicit httpUrl(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2018019930;

  static object_ptr<httpUrl> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class date;

class datedFile;

/**
 * An identity document.
 */
class identityDocument final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Document number; 1-24 characters.
  string number_;
  static jfieldID number_fieldID;
  /// Document expiration date; may be null if not applicable.
  object_ptr<date> expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// Front side of the document.
  object_ptr<datedFile> front_side_;
  static jfieldID front_side_fieldID;
  /// Reverse side of the document; only for driver license and identity card; may be null.
  object_ptr<datedFile> reverse_side_;
  static jfieldID reverse_side_fieldID;
  /// Selfie with the document; may be null.
  object_ptr<datedFile> selfie_;
  static jfieldID selfie_fieldID;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<datedFile>> translation_;
  static jfieldID translation_fieldID;

  /**
   * An identity document.
   */
  identityDocument();

  /**
   * An identity document.
   *
   * \param[in] number_ Document number; 1-24 characters.
   * \param[in] expiration_date_ Document expiration date; may be null if not applicable.
   * \param[in] front_side_ Front side of the document.
   * \param[in] reverse_side_ Reverse side of the document; only for driver license and identity card; may be null.
   * \param[in] selfie_ Selfie with the document; may be null.
   * \param[in] translation_ List of files containing a certified English translation of the document.
   */
  identityDocument(string const &number_, object_ptr<date> &&expiration_date_, object_ptr<datedFile> &&front_side_, object_ptr<datedFile> &&reverse_side_, object_ptr<datedFile> &&selfie_, array<object_ptr<datedFile>> &&translation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1001703606;

  static object_ptr<identityDocument> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes a contact to import.
 */
class importedContact final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Phone number of the user.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// First name of the user; 1-64 characters.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// Last name of the user; 0-64 characters.
  string last_name_;
  static jfieldID last_name_fieldID;
  /// Note to add about the user; 0-getOption(&quot;user_note_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed; pass null to keep the current user's note.
  object_ptr<formattedText> note_;
  static jfieldID note_fieldID;

  /**
   * Describes a contact to import.
   */
  importedContact();

  /**
   * Describes a contact to import.
   *
   * \param[in] phone_number_ Phone number of the user.
   * \param[in] first_name_ First name of the user; 1-64 characters.
   * \param[in] last_name_ Last name of the user; 0-64 characters.
   * \param[in] note_ Note to add about the user; 0-getOption(&quot;user_note_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed; pass null to keep the current user's note.
   */
  importedContact(string const &phone_number_, string const &first_name_, string const &last_name_, object_ptr<formattedText> &&note_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1818209156;

  static object_ptr<importedContact> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents the result of an importContacts request.
 */
class importedContacts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;
  /// The number of users that imported the corresponding contact; 0 for already registered users or if unavailable.
  array<int32> importer_count_;
  static jfieldID importer_count_fieldID;

  /**
   * Represents the result of an importContacts request.
   */
  importedContacts();

  /**
   * Represents the result of an importContacts request.
   *
   * \param[in] user_ids_ User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user.
   * \param[in] importer_count_ The number of users that imported the corresponding contact; 0 for already registered users or if unavailable.
   */
  importedContacts(array<int53> &&user_ids_, array<int32> &&importer_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2068432290;

  static object_ptr<importedContacts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ButtonStyle;

class InlineKeyboardButtonType;

/**
 * Represents a single button in an inline keyboard.
 */
class inlineKeyboardButton final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the button.
  string text_;
  static jfieldID text_fieldID;
  /// Identifier of the custom emoji that must be shown on the button; 0 if none.
  int64 icon_custom_emoji_id_;
  static jfieldID icon_custom_emoji_id_fieldID;
  /// Style of the button.
  object_ptr<ButtonStyle> style_;
  static jfieldID style_fieldID;
  /// Type of the button.
  object_ptr<InlineKeyboardButtonType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a single button in an inline keyboard.
   */
  inlineKeyboardButton();

  /**
   * Represents a single button in an inline keyboard.
   *
   * \param[in] text_ Text of the button.
   * \param[in] icon_custom_emoji_id_ Identifier of the custom emoji that must be shown on the button; 0 if none.
   * \param[in] style_ Style of the button.
   * \param[in] type_ Type of the button.
   */
  inlineKeyboardButton(string const &text_, int64 icon_custom_emoji_id_, object_ptr<ButtonStyle> &&style_, object_ptr<InlineKeyboardButtonType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1457530830;

  static object_ptr<inlineKeyboardButton> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class TargetChat;

/**
 * This class is an abstract base class.
 * Describes the type of inline keyboard button.
 */
class InlineKeyboardButtonType: public Object {
 public:
  static jclass Class;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that opens a specified URL.
 */
class inlineKeyboardButtonTypeUrl final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// HTTP or tg:// URL to open. If the link is of the type internalLinkTypeWebApp, then the button must be marked as a Web App button.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A button that opens a specified URL.
   */
  inlineKeyboardButtonTypeUrl();

  /**
   * A button that opens a specified URL.
   *
   * \param[in] url_ HTTP or tg:// URL to open. If the link is of the type internalLinkTypeWebApp, then the button must be marked as a Web App button.
   */
  explicit inlineKeyboardButtonTypeUrl(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1130741420;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo.
 */
class inlineKeyboardButtonTypeLoginUrl final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An HTTP URL to pass to getLoginUrlInfo.
  string url_;
  static jfieldID url_fieldID;
  /// Unique button identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// If non-empty, new text of the button in forwarded messages.
  string forward_text_;
  static jfieldID forward_text_fieldID;

  /**
   * A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo.
   */
  inlineKeyboardButtonTypeLoginUrl();

  /**
   * A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo.
   *
   * \param[in] url_ An HTTP URL to pass to getLoginUrlInfo.
   * \param[in] id_ Unique button identifier.
   * \param[in] forward_text_ If non-empty, new text of the button in forwarded messages.
   */
  inlineKeyboardButtonTypeLoginUrl(string const &url_, int53 id_, string const &forward_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1203413081;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that opens a Web App by calling openWebApp.
 */
class inlineKeyboardButtonTypeWebApp final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An HTTP URL to pass to openWebApp.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A button that opens a Web App by calling openWebApp.
   */
  inlineKeyboardButtonTypeWebApp();

  /**
   * A button that opens a Web App by calling openWebApp.
   *
   * \param[in] url_ An HTTP URL to pass to openWebApp.
   */
  explicit inlineKeyboardButtonTypeWebApp(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1767471672;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that sends a callback query to a bot.
 */
class inlineKeyboardButtonTypeCallback final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Data to be sent to the bot via a callback query.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * A button that sends a callback query to a bot.
   */
  inlineKeyboardButtonTypeCallback();

  /**
   * A button that sends a callback query to a bot.
   *
   * \param[in] data_ Data to be sent to the bot via a callback query.
   */
  explicit inlineKeyboardButtonTypeCallback(bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1127515139;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot.
 */
class inlineKeyboardButtonTypeCallbackWithPassword final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Data to be sent to the bot via a callback query.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot.
   */
  inlineKeyboardButtonTypeCallbackWithPassword();

  /**
   * A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot.
   *
   * \param[in] data_ Data to be sent to the bot via a callback query.
   */
  explicit inlineKeyboardButtonTypeCallbackWithPassword(bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 908018248;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame.
 */
class inlineKeyboardButtonTypeCallbackGame final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame.
   */
  inlineKeyboardButtonTypeCallbackGame();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -383429528;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that forces an inline query to the bot to be inserted in the input field.
 */
class inlineKeyboardButtonTypeSwitchInline final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline query to be sent to the bot.
  string query_;
  static jfieldID query_fieldID;
  /// Target chat from which to send the inline query.
  object_ptr<TargetChat> target_chat_;
  static jfieldID target_chat_fieldID;

  /**
   * A button that forces an inline query to the bot to be inserted in the input field.
   */
  inlineKeyboardButtonTypeSwitchInline();

  /**
   * A button that forces an inline query to the bot to be inserted in the input field.
   *
   * \param[in] query_ Inline query to be sent to the bot.
   * \param[in] target_chat_ Target chat from which to send the inline query.
   */
  inlineKeyboardButtonTypeSwitchInline(string const &query_, object_ptr<TargetChat> &&target_chat_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 544906485;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice.
 */
class inlineKeyboardButtonTypeBuy final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice.
   */
  inlineKeyboardButtonTypeBuy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1360739440;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button with a user reference to be handled in the same way as textEntityTypeMentionName entities.
 */
class inlineKeyboardButtonTypeUser final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A button with a user reference to be handled in the same way as textEntityTypeMentionName entities.
   */
  inlineKeyboardButtonTypeUser();

  /**
   * A button with a user reference to be handled in the same way as textEntityTypeMentionName entities.
   *
   * \param[in] user_id_ User identifier.
   */
  explicit inlineKeyboardButtonTypeUser(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1836574114;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that copies specified text to clipboard.
 */
class inlineKeyboardButtonTypeCopyText final : public InlineKeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text to copy to clipboard.
  string text_;
  static jfieldID text_fieldID;

  /**
   * A button that copies specified text to clipboard.
   */
  inlineKeyboardButtonTypeCopyText();

  /**
   * A button that copies specified text to clipboard.
   *
   * \param[in] text_ The text to copy to clipboard.
   */
  explicit inlineKeyboardButtonTypeCopyText(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 68883206;

  static object_ptr<InlineKeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains identifier of a sent guest message.
 */
class inlineMessageId final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the message.
  string id_;
  static jfieldID id_fieldID;

  /**
   * Contains identifier of a sent guest message.
   */
  inlineMessageId();

  /**
   * Contains identifier of a sent guest message.
   *
   * \param[in] id_ Unique identifier for the message.
   */
  explicit inlineMessageId(string const &id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1908477921;

  static object_ptr<inlineMessageId> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class animation;

class audio;

class contact;

class document;

class game;

class location;

class photo;

class sticker;

class thumbnail;

class venue;

class video;

class voiceNote;

/**
 * This class is an abstract base class.
 * Represents a single result of an inline query.
 */
class InlineQueryResult: public Object {
 public:
  static jclass Class;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to an article or web page.
 */
class inlineQueryResultArticle final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// URL of the result, if it exists.
  string url_;
  static jfieldID url_fieldID;
  /// Title of the result.
  string title_;
  static jfieldID title_fieldID;
  /// A short description of the result.
  string description_;
  static jfieldID description_fieldID;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;

  /**
   * Represents a link to an article or web page.
   */
  inlineQueryResultArticle();

  /**
   * Represents a link to an article or web page.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] url_ URL of the result, if it exists.
   * \param[in] title_ Title of the result.
   * \param[in] description_ A short description of the result.
   * \param[in] thumbnail_ Result thumbnail in JPEG format; may be null.
   */
  inlineQueryResultArticle(string const &id_, string const &url_, string const &title_, string const &description_, object_ptr<thumbnail> &&thumbnail_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 269930522;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a user contact.
 */
class inlineQueryResultContact final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// A user contact.
  object_ptr<contact> contact_;
  static jfieldID contact_fieldID;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;

  /**
   * Represents a user contact.
   */
  inlineQueryResultContact();

  /**
   * Represents a user contact.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] contact_ A user contact.
   * \param[in] thumbnail_ Result thumbnail in JPEG format; may be null.
   */
  inlineQueryResultContact(string const &id_, object_ptr<contact> &&contact_, object_ptr<thumbnail> &&thumbnail_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -181960174;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a point on the map.
 */
class inlineQueryResultLocation final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Location result.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Title of the result.
  string title_;
  static jfieldID title_fieldID;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;

  /**
   * Represents a point on the map.
   */
  inlineQueryResultLocation();

  /**
   * Represents a point on the map.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] location_ Location result.
   * \param[in] title_ Title of the result.
   * \param[in] thumbnail_ Result thumbnail in JPEG format; may be null.
   */
  inlineQueryResultLocation(string const &id_, object_ptr<location> &&location_, string const &title_, object_ptr<thumbnail> &&thumbnail_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 466004752;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents information about a venue.
 */
class inlineQueryResultVenue final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Venue result.
  object_ptr<venue> venue_;
  static jfieldID venue_fieldID;
  /// Result thumbnail in JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;

  /**
   * Represents information about a venue.
   */
  inlineQueryResultVenue();

  /**
   * Represents information about a venue.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] venue_ Venue result.
   * \param[in] thumbnail_ Result thumbnail in JPEG format; may be null.
   */
  inlineQueryResultVenue(string const &id_, object_ptr<venue> &&venue_, object_ptr<thumbnail> &&thumbnail_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1281036382;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents information about a game.
 */
class inlineQueryResultGame final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Game result.
  object_ptr<game> game_;
  static jfieldID game_fieldID;

  /**
   * Represents information about a game.
   */
  inlineQueryResultGame();

  /**
   * Represents information about a game.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] game_ Game result.
   */
  inlineQueryResultGame(string const &id_, object_ptr<game> &&game_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1706916987;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an animation file.
 */
class inlineQueryResultAnimation final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Animation file.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;
  /// Animation title.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Represents an animation file.
   */
  inlineQueryResultAnimation();

  /**
   * Represents an animation file.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] animation_ Animation file.
   * \param[in] title_ Animation title.
   */
  inlineQueryResultAnimation(string const &id_, object_ptr<animation> &&animation_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2009984267;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an audio file.
 */
class inlineQueryResultAudio final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Audio file.
  object_ptr<audio> audio_;
  static jfieldID audio_fieldID;

  /**
   * Represents an audio file.
   */
  inlineQueryResultAudio();

  /**
   * Represents an audio file.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] audio_ Audio file.
   */
  inlineQueryResultAudio(string const &id_, object_ptr<audio> &&audio_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 842650360;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a document.
 */
class inlineQueryResultDocument final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Document.
  object_ptr<document> document_;
  static jfieldID document_fieldID;
  /// Document title.
  string title_;
  static jfieldID title_fieldID;
  /// Document description.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Represents a document.
   */
  inlineQueryResultDocument();

  /**
   * Represents a document.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] document_ Document.
   * \param[in] title_ Document title.
   * \param[in] description_ Document description.
   */
  inlineQueryResultDocument(string const &id_, object_ptr<document> &&document_, string const &title_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1491268539;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a photo.
 */
class inlineQueryResultPhoto final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Title of the result, if known.
  string title_;
  static jfieldID title_fieldID;
  /// A short description of the result, if known.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Represents a photo.
   */
  inlineQueryResultPhoto();

  /**
   * Represents a photo.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] photo_ Photo.
   * \param[in] title_ Title of the result, if known.
   * \param[in] description_ A short description of the result, if known.
   */
  inlineQueryResultPhoto(string const &id_, object_ptr<photo> &&photo_, string const &title_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1848319440;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a sticker.
 */
class inlineQueryResultSticker final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Sticker.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Represents a sticker.
   */
  inlineQueryResultSticker();

  /**
   * Represents a sticker.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] sticker_ Sticker.
   */
  inlineQueryResultSticker(string const &id_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1848224245;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a video.
 */
class inlineQueryResultVideo final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Video.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Title of the video.
  string title_;
  static jfieldID title_fieldID;
  /// Description of the video.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Represents a video.
   */
  inlineQueryResultVideo();

  /**
   * Represents a video.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] video_ Video.
   * \param[in] title_ Title of the video.
   * \param[in] description_ Description of the video.
   */
  inlineQueryResultVideo(string const &id_, object_ptr<video> &&video_, string const &title_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1373158683;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a voice note.
 */
class inlineQueryResultVoiceNote final : public InlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Voice note.
  object_ptr<voiceNote> voice_note_;
  static jfieldID voice_note_fieldID;
  /// Title of the voice note.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Represents a voice note.
   */
  inlineQueryResultVoiceNote();

  /**
   * Represents a voice note.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] voice_note_ Voice note.
   * \param[in] title_ Title of the voice note.
   */
  inlineQueryResultVoiceNote(string const &id_, object_ptr<voiceNote> &&voice_note_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1897393105;

  static object_ptr<InlineQueryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InlineQueryResult;

class inlineQueryResultsButton;

/**
 * Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query.
 */
class inlineQueryResults final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the inline query.
  int64 inline_query_id_;
  static jfieldID inline_query_id_fieldID;
  /// Button to be shown above inline query results; may be null.
  object_ptr<inlineQueryResultsButton> button_;
  static jfieldID button_fieldID;
  /// Results of the query.
  array<object_ptr<InlineQueryResult>> results_;
  static jfieldID results_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query.
   */
  inlineQueryResults();

  /**
   * Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query.
   *
   * \param[in] inline_query_id_ Unique identifier of the inline query.
   * \param[in] button_ Button to be shown above inline query results; may be null.
   * \param[in] results_ Results of the query.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  inlineQueryResults(int64 inline_query_id_, object_ptr<inlineQueryResultsButton> &&button_, array<object_ptr<InlineQueryResult>> &&results_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1830685615;

  static object_ptr<inlineQueryResults> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InlineQueryResultsButtonType;

/**
 * Represents a button to be shown above inline query results.
 */
class inlineQueryResultsButton final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text of the button.
  string text_;
  static jfieldID text_fieldID;
  /// Type of the button.
  object_ptr<InlineQueryResultsButtonType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a button to be shown above inline query results.
   */
  inlineQueryResultsButton();

  /**
   * Represents a button to be shown above inline query results.
   *
   * \param[in] text_ The text of the button.
   * \param[in] type_ Type of the button.
   */
  inlineQueryResultsButton(string const &text_, object_ptr<InlineQueryResultsButtonType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -790689618;

  static object_ptr<inlineQueryResultsButton> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents type of button in results of inline query.
 */
class InlineQueryResultsButtonType: public Object {
 public:
  static jclass Class;

  static object_ptr<InlineQueryResultsButtonType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter.
 */
class inlineQueryResultsButtonTypeStartBot final : public InlineQueryResultsButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The parameter for the bot start message.
  string parameter_;
  static jfieldID parameter_fieldID;

  /**
   * Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter.
   */
  inlineQueryResultsButtonTypeStartBot();

  /**
   * Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter.
   *
   * \param[in] parameter_ The parameter for the bot start message.
   */
  explicit inlineQueryResultsButtonTypeStartBot(string const &parameter_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -23400235;

  static object_ptr<InlineQueryResultsButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes the button that opens a Web App by calling getWebAppUrl.
 */
class inlineQueryResultsButtonTypeWebApp final : public InlineQueryResultsButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An HTTP URL to pass to getWebAppUrl.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Describes the button that opens a Web App by calling getWebAppUrl.
   */
  inlineQueryResultsButtonTypeWebApp();

  /**
   * Describes the button that opens a Web App by calling getWebAppUrl.
   *
   * \param[in] url_ An HTTP URL to pass to getWebAppUrl.
   */
  explicit inlineQueryResultsButtonTypeWebApp(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1197382814;

  static object_ptr<InlineQueryResultsButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

/**
 * This class is an abstract base class.
 * Contains information about background to set.
 */
class InputBackground: public Object {
 public:
  static jclass Class;

  static object_ptr<InputBackground> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A background from a local file.
 */
class inputBackgroundLocal final : public InputBackground {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns.
  object_ptr<InputFile> background_;
  static jfieldID background_fieldID;

  /**
   * A background from a local file.
   */
  inputBackgroundLocal();

  /**
   * A background from a local file.
   *
   * \param[in] background_ Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns.
   */
  explicit inputBackgroundLocal(object_ptr<InputFile> &&background_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1747094364;

  static object_ptr<InputBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A background from the server.
 */
class inputBackgroundRemote final : public InputBackground {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The background identifier.
  int64 background_id_;
  static jfieldID background_id_fieldID;

  /**
   * A background from the server.
   */
  inputBackgroundRemote();

  /**
   * A background from the server.
   *
   * \param[in] background_id_ The background identifier.
   */
  explicit inputBackgroundRemote(int64 background_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -274976231;

  static object_ptr<InputBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A background previously set in the chat; for chat backgrounds only.
 */
class inputBackgroundPrevious final : public InputBackground {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the background.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * A background previously set in the chat; for chat backgrounds only.
   */
  inputBackgroundPrevious();

  /**
   * A background previously set in the chat; for chat backgrounds only.
   *
   * \param[in] message_id_ Identifier of the message with the background.
   */
  explicit inputBackgroundPrevious(int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -351905954;

  static object_ptr<InputBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes a business chat link to create or edit.
 */
class inputBusinessChatLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message draft text that will be added to the input field.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Link title.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Describes a business chat link to create or edit.
   */
  inputBusinessChatLink();

  /**
   * Describes a business chat link to create or edit.
   *
   * \param[in] text_ Message draft text that will be added to the input field.
   * \param[in] title_ Link title.
   */
  inputBusinessChatLink(object_ptr<formattedText> &&text_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 237858296;

  static object_ptr<inputBusinessChatLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

/**
 * Describes settings for a business account start page to set.
 */
class inputBusinessStartPage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title text of the start page; 0-getOption(&quot;business_start_page_title_length_max&quot;) characters.
  string title_;
  static jfieldID title_fieldID;
  /// Message text of the start page; 0-getOption(&quot;business_start_page_message_length_max&quot;) characters.
  string message_;
  static jfieldID message_fieldID;
  /// Greeting sticker of the start page; pass null if none. The sticker must belong to a sticker set and must not be a custom emoji.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Describes settings for a business account start page to set.
   */
  inputBusinessStartPage();

  /**
   * Describes settings for a business account start page to set.
   *
   * \param[in] title_ Title text of the start page; 0-getOption(&quot;business_start_page_title_length_max&quot;) characters.
   * \param[in] message_ Message text of the start page; 0-getOption(&quot;business_start_page_message_length_max&quot;) characters.
   * \param[in] sticker_ Greeting sticker of the start page; pass null if none. The sticker must belong to a sticker set and must not be a custom emoji.
   */
  inputBusinessStartPage(string const &title_, string const &message_, object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -327383072;

  static object_ptr<inputBusinessStartPage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a call.
 */
class InputCall: public Object {
 public:
  static jclass Class;

  static object_ptr<InputCall> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A just ended call.
 */
class inputCallDiscarded final : public InputCall {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the call.
  int32 call_id_;
  static jfieldID call_id_fieldID;

  /**
   * A just ended call.
   */
  inputCallDiscarded();

  /**
   * A just ended call.
   *
   * \param[in] call_id_ Identifier of the call.
   */
  explicit inputCallDiscarded(int32 call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1956569937;

  static object_ptr<InputCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A call from a message of the type messageCall with non-zero messageCall.unique_id.
 */
class inputCallFromMessage final : public InputCall {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * A call from a message of the type messageCall with non-zero messageCall.unique_id.
   */
  inputCallFromMessage();

  /**
   * A call from a message of the type messageCall with non-zero messageCall.unique_id.
   *
   * \param[in] chat_id_ Chat identifier of the message.
   * \param[in] message_id_ Message identifier.
   */
  inputCallFromMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 980874855;

  static object_ptr<InputCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class chatPhotoSticker;

/**
 * This class is an abstract base class.
 * Describes a photo to be set as a user profile or chat photo.
 */
class InputChatPhoto: public Object {
 public:
  static jclass Class;

  static object_ptr<InputChatPhoto> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A previously used profile photo of the current user.
 */
class inputChatPhotoPrevious final : public InputChatPhoto {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the current user's profile photo to reuse.
  int64 chat_photo_id_;
  static jfieldID chat_photo_id_fieldID;

  /**
   * A previously used profile photo of the current user.
   */
  inputChatPhotoPrevious();

  /**
   * A previously used profile photo of the current user.
   *
   * \param[in] chat_photo_id_ Identifier of the current user's profile photo to reuse.
   */
  explicit inputChatPhotoPrevious(int64 chat_photo_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 23128529;

  static object_ptr<InputChatPhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A static photo in JPEG format.
 */
class inputChatPhotoStatic final : public InputChatPhoto {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed.
  object_ptr<InputFile> photo_;
  static jfieldID photo_fieldID;

  /**
   * A static photo in JPEG format.
   */
  inputChatPhotoStatic();

  /**
   * A static photo in JPEG format.
   *
   * \param[in] photo_ Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed.
   */
  explicit inputChatPhotoStatic(object_ptr<InputFile> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1979179699;

  static object_ptr<InputChatPhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 1280 and be at most 2MB in size.
 */
class inputChatPhotoAnimation final : public InputChatPhoto {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed.
  object_ptr<InputFile> animation_;
  static jfieldID animation_fieldID;
  /// Timestamp of the frame, which will be used as static chat photo.
  double main_frame_timestamp_;
  static jfieldID main_frame_timestamp_fieldID;

  /**
   * An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 1280 and be at most 2MB in size.
   */
  inputChatPhotoAnimation();

  /**
   * An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 1280 and be at most 2MB in size.
   *
   * \param[in] animation_ Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed.
   * \param[in] main_frame_timestamp_ Timestamp of the frame, which will be used as static chat photo.
   */
  inputChatPhotoAnimation(object_ptr<InputFile> &&animation_, double main_frame_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 90846242;

  static object_ptr<InputChatPhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A sticker on a custom background.
 */
class inputChatPhotoSticker final : public InputChatPhoto {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the sticker.
  object_ptr<chatPhotoSticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * A sticker on a custom background.
   */
  inputChatPhotoSticker();

  /**
   * A sticker on a custom background.
   *
   * \param[in] sticker_ Information about the sticker.
   */
  explicit inputChatPhotoSticker(object_ptr<chatPhotoSticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1315861341;

  static object_ptr<InputChatPhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a chat theme to set.
 */
class InputChatTheme: public Object {
 public:
  static jclass Class;

  static object_ptr<InputChatTheme> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A theme based on an emoji.
 */
class inputChatThemeEmoji final : public InputChatTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the theme.
  string name_;
  static jfieldID name_fieldID;

  /**
   * A theme based on an emoji.
   */
  inputChatThemeEmoji();

  /**
   * A theme based on an emoji.
   *
   * \param[in] name_ Name of the theme.
   */
  explicit inputChatThemeEmoji(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1461787199;

  static object_ptr<InputChatTheme> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A theme based on an upgraded gift.
 */
class inputChatThemeGift final : public InputChatTheme {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the upgraded gift. A gift can be used only in one chat in a time. When the same gift is used in another chat, theme in the previous chat is reset to default.
  string name_;
  static jfieldID name_fieldID;

  /**
   * A theme based on an upgraded gift.
   */
  inputChatThemeGift();

  /**
   * A theme based on an upgraded gift.
   *
   * \param[in] name_ Name of the upgraded gift. A gift can be used only in one chat in a time. When the same gift is used in another chat, theme in the previous chat is reset to default.
   */
  explicit inputChatThemeGift(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2026976301;

  static object_ptr<InputChatTheme> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class inputChecklistTask;

/**
 * Describes a checklist to be sent.
 */
class inputChecklist final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the checklist; 1-getOption(&quot;checklist_title_length_max&quot;) characters. May contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities.
  object_ptr<formattedText> title_;
  static jfieldID title_fieldID;
  /// List of tasks in the checklist; 1-getOption(&quot;checklist_task_count_max&quot;) tasks.
  array<object_ptr<inputChecklistTask>> tasks_;
  static jfieldID tasks_fieldID;
  /// True, if other users can add tasks to the list.
  bool others_can_add_tasks_;
  static jfieldID others_can_add_tasks_fieldID;
  /// True, if other users can mark tasks as done or not done.
  bool others_can_mark_tasks_as_done_;
  static jfieldID others_can_mark_tasks_as_done_fieldID;

  /**
   * Describes a checklist to be sent.
   */
  inputChecklist();

  /**
   * Describes a checklist to be sent.
   *
   * \param[in] title_ Title of the checklist; 1-getOption(&quot;checklist_title_length_max&quot;) characters. May contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities.
   * \param[in] tasks_ List of tasks in the checklist; 1-getOption(&quot;checklist_task_count_max&quot;) tasks.
   * \param[in] others_can_add_tasks_ True, if other users can add tasks to the list.
   * \param[in] others_can_mark_tasks_as_done_ True, if other users can mark tasks as done or not done.
   */
  inputChecklist(object_ptr<formattedText> &&title_, array<object_ptr<inputChecklistTask>> &&tasks_, bool others_can_add_tasks_, bool others_can_mark_tasks_as_done_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -145125739;

  static object_ptr<inputChecklist> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes a task in a checklist to be sent.
 */
class inputChecklistTask final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the task; must be positive.
  int32 id_;
  static jfieldID id_fieldID;
  /// Text of the task; 1-getOption(&quot;checklist_task_text_length_max&quot;) characters without line feeds. May contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Describes a task in a checklist to be sent.
   */
  inputChecklistTask();

  /**
   * Describes a task in a checklist to be sent.
   *
   * \param[in] id_ Unique identifier of the task; must be positive.
   * \param[in] text_ Text of the task; 1-getOption(&quot;checklist_task_text_length_max&quot;) characters without line feeds. May contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities.
   */
  inputChecklistTask(int32 id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1633462225;

  static object_ptr<inputChecklistTask> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about the payment method chosen by the user.
 */
class InputCredentials: public Object {
 public:
  static jclass Class;

  static object_ptr<InputCredentials> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password.
 */
class inputCredentialsSaved final : public InputCredentials {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the saved credentials.
  string saved_credentials_id_;
  static jfieldID saved_credentials_id_fieldID;

  /**
   * Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password.
   */
  inputCredentialsSaved();

  /**
   * Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password.
   *
   * \param[in] saved_credentials_id_ Identifier of the saved credentials.
   */
  explicit inputCredentialsSaved(string const &saved_credentials_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2034385364;

  static object_ptr<InputCredentials> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Applies if a user enters new credentials on a payment provider website.
 */
class inputCredentialsNew final : public InputCredentials {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// JSON-encoded data with the credential identifier from the payment provider.
  string data_;
  static jfieldID data_fieldID;
  /// True, if the credential identifier can be saved on the server side.
  bool allow_save_;
  static jfieldID allow_save_fieldID;

  /**
   * Applies if a user enters new credentials on a payment provider website.
   */
  inputCredentialsNew();

  /**
   * Applies if a user enters new credentials on a payment provider website.
   *
   * \param[in] data_ JSON-encoded data with the credential identifier from the payment provider.
   * \param[in] allow_save_ True, if the credential identifier can be saved on the server side.
   */
  inputCredentialsNew(string const &data_, bool allow_save_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -829689558;

  static object_ptr<InputCredentials> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Applies if a user enters new credentials using Apple Pay.
 */
class inputCredentialsApplePay final : public InputCredentials {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// JSON-encoded data with the credential identifier.
  string data_;
  static jfieldID data_fieldID;

  /**
   * Applies if a user enters new credentials using Apple Pay.
   */
  inputCredentialsApplePay();

  /**
   * Applies if a user enters new credentials using Apple Pay.
   *
   * \param[in] data_ JSON-encoded data with the credential identifier.
   */
  explicit inputCredentialsApplePay(string const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1246570799;

  static object_ptr<InputCredentials> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Applies if a user enters new credentials using Google Pay.
 */
class inputCredentialsGooglePay final : public InputCredentials {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// JSON-encoded data with the credential identifier.
  string data_;
  static jfieldID data_fieldID;

  /**
   * Applies if a user enters new credentials using Google Pay.
   */
  inputCredentialsGooglePay();

  /**
   * Applies if a user enters new credentials using Google Pay.
   *
   * \param[in] data_ JSON-encoded data with the credential identifier.
   */
  explicit inputCredentialsGooglePay(string const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 844384100;

  static object_ptr<InputCredentials> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Points to a file.
 */
class InputFile: public Object {
 public:
  static jclass Class;

  static object_ptr<InputFile> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file defined by its unique identifier.
 */
class inputFileId final : public InputFile {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique file identifier.
  int32 id_;
  static jfieldID id_fieldID;

  /**
   * A file defined by its unique identifier.
   */
  inputFileId();

  /**
   * A file defined by its unique identifier.
   *
   * \param[in] id_ Unique file identifier.
   */
  explicit inputFileId(int32 id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1788906253;

  static object_ptr<InputFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file defined by its remote identifier. The remote identifier is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
 */
class inputFileRemote final : public InputFile {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Remote file identifier.
  string id_;
  static jfieldID id_fieldID;

  /**
   * A file defined by its remote identifier. The remote identifier is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
   */
  inputFileRemote();

  /**
   * A file defined by its remote identifier. The remote identifier is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
   *
   * \param[in] id_ Remote file identifier.
   */
  explicit inputFileRemote(string const &id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -107574466;

  static object_ptr<InputFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file defined by a local path.
 */
class inputFileLocal final : public InputFile {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Local path to the file.
  string path_;
  static jfieldID path_fieldID;

  /**
   * A file defined by a local path.
   */
  inputFileLocal();

  /**
   * A file defined by a local path.
   *
   * \param[in] path_ Local path to the file.
   */
  explicit inputFileLocal(string const &path_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2056030919;

  static object_ptr<InputFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file generated by the application. The application must handle updates updateFileGenerationStart and updateFileGenerationStop to generate the file when asked by TDLib.
 */
class inputFileGenerated final : public InputFile {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Local path to a file from which the file is generated. The path doesn't have to be a valid path and is used by TDLib only to detect name and MIME type of the generated file.
  string original_path_;
  static jfieldID original_path_fieldID;
  /// String specifying the conversion applied to the original file; must be persistent across application restarts. Conversions beginning with '\#' are reserved for internal TDLib usage.
  string conversion_;
  static jfieldID conversion_fieldID;
  /// Expected size of the generated file, in bytes; pass 0 if unknown.
  int53 expected_size_;
  static jfieldID expected_size_fieldID;

  /**
   * A file generated by the application. The application must handle updates updateFileGenerationStart and updateFileGenerationStop to generate the file when asked by TDLib.
   */
  inputFileGenerated();

  /**
   * A file generated by the application. The application must handle updates updateFileGenerationStart and updateFileGenerationStop to generate the file when asked by TDLib.
   *
   * \param[in] original_path_ Local path to a file from which the file is generated. The path doesn't have to be a valid path and is used by TDLib only to detect name and MIME type of the generated file.
   * \param[in] conversion_ String specifying the conversion applied to the original file; must be persistent across application restarts. Conversions beginning with '\#' are reserved for internal TDLib usage.
   * \param[in] expected_size_ Expected size of the generated file, in bytes; pass 0 if unknown.
   */
  inputFileGenerated(string const &original_path_, string const &conversion_, int53 expected_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1333385216;

  static object_ptr<InputFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a non-joined group call that isn't bound to a chat.
 */
class InputGroupCall: public Object {
 public:
  static jclass Class;

  static object_ptr<InputGroupCall> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The group call is accessible through a link.
 */
class inputGroupCallLink final : public InputGroupCall {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link for the group call.
  string link_;
  static jfieldID link_fieldID;

  /**
   * The group call is accessible through a link.
   */
  inputGroupCallLink();

  /**
   * The group call is accessible through a link.
   *
   * \param[in] link_ The link for the group call.
   */
  explicit inputGroupCallLink(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -812157480;

  static object_ptr<InputGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The group call is accessible through a message of the type messageGroupCall.
 */
class inputGroupCallMessage final : public InputGroupCall {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message of the type messageGroupCall.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * The group call is accessible through a message of the type messageGroupCall.
   */
  inputGroupCallMessage();

  /**
   * The group call is accessible through a message of the type messageGroupCall.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message of the type messageGroupCall.
   */
  inputGroupCallMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -341793768;

  static object_ptr<InputGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class date;

/**
 * An identity document to be saved to Telegram Passport.
 */
class inputIdentityDocument final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Document number; 1-24 characters.
  string number_;
  static jfieldID number_fieldID;
  /// Document expiration date; pass null if not applicable.
  object_ptr<date> expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// Front side of the document.
  object_ptr<InputFile> front_side_;
  static jfieldID front_side_fieldID;
  /// Reverse side of the document; only for driver license and identity card; pass null otherwise.
  object_ptr<InputFile> reverse_side_;
  static jfieldID reverse_side_fieldID;
  /// Selfie with the document; pass null if unavailable.
  object_ptr<InputFile> selfie_;
  static jfieldID selfie_fieldID;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<InputFile>> translation_;
  static jfieldID translation_fieldID;

  /**
   * An identity document to be saved to Telegram Passport.
   */
  inputIdentityDocument();

  /**
   * An identity document to be saved to Telegram Passport.
   *
   * \param[in] number_ Document number; 1-24 characters.
   * \param[in] expiration_date_ Document expiration date; pass null if not applicable.
   * \param[in] front_side_ Front side of the document.
   * \param[in] reverse_side_ Reverse side of the document; only for driver license and identity card; pass null otherwise.
   * \param[in] selfie_ Selfie with the document; pass null if unavailable.
   * \param[in] translation_ List of files containing a certified English translation of the document.
   */
  inputIdentityDocument(string const &number_, object_ptr<date> &&expiration_date_, object_ptr<InputFile> &&front_side_, object_ptr<InputFile> &&reverse_side_, object_ptr<InputFile> &&selfie_, array<object_ptr<InputFile>> &&translation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 767353688;

  static object_ptr<inputIdentityDocument> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class contact;

class location;

class venue;

/**
 * This class is an abstract base class.
 * Represents a single result of an inline query; for bots only.
 */
class InputInlineQueryResult: public Object {
 public:
  static jclass Class;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video.
 */
class inputInlineQueryResultAnimation final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the query result.
  string title_;
  static jfieldID title_fieldID;
  /// URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// MIME type of the video thumbnail. If non-empty, must be one of &quot;image/jpeg&quot;, &quot;image/gif&quot; and &quot;video/mp4&quot;.
  string thumbnail_mime_type_;
  static jfieldID thumbnail_mime_type_fieldID;
  /// The URL of the video file (file size must not exceed 1MB).
  string video_url_;
  static jfieldID video_url_fieldID;
  /// MIME type of the video file. Must be one of &quot;image/gif&quot; and &quot;video/mp4&quot;.
  string video_mime_type_;
  static jfieldID video_mime_type_fieldID;
  /// Duration of the video, in seconds.
  int32 video_duration_;
  static jfieldID video_duration_fieldID;
  /// Width of the video.
  int32 video_width_;
  static jfieldID video_width_fieldID;
  /// Height of the video.
  int32 video_height_;
  static jfieldID video_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video.
   */
  inputInlineQueryResultAnimation();

  /**
   * Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] title_ Title of the query result.
   * \param[in] thumbnail_url_ URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists.
   * \param[in] thumbnail_mime_type_ MIME type of the video thumbnail. If non-empty, must be one of &quot;image/jpeg&quot;, &quot;image/gif&quot; and &quot;video/mp4&quot;.
   * \param[in] video_url_ The URL of the video file (file size must not exceed 1MB).
   * \param[in] video_mime_type_ MIME type of the video file. Must be one of &quot;image/gif&quot; and &quot;video/mp4&quot;.
   * \param[in] video_duration_ Duration of the video, in seconds.
   * \param[in] video_width_ Width of the video.
   * \param[in] video_height_ Height of the video.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultAnimation(string const &id_, string const &title_, string const &thumbnail_url_, string const &thumbnail_mime_type_, string const &video_url_, string const &video_mime_type_, int32 video_duration_, int32 video_width_, int32 video_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1489808874;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to an article or web page.
 */
class inputInlineQueryResultArticle final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// URL of the result, if it exists.
  string url_;
  static jfieldID url_fieldID;
  /// Title of the result.
  string title_;
  static jfieldID title_fieldID;
  /// A short description of the result.
  string description_;
  static jfieldID description_fieldID;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  static jfieldID thumbnail_width_fieldID;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  static jfieldID thumbnail_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to an article or web page.
   */
  inputInlineQueryResultArticle();

  /**
   * Represents a link to an article or web page.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] url_ URL of the result, if it exists.
   * \param[in] title_ Title of the result.
   * \param[in] description_ A short description of the result.
   * \param[in] thumbnail_url_ URL of the result thumbnail, if it exists.
   * \param[in] thumbnail_width_ Thumbnail width, if known.
   * \param[in] thumbnail_height_ Thumbnail height, if known.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultArticle(string const &id_, string const &url_, string const &title_, string const &description_, string const &thumbnail_url_, int32 thumbnail_width_, int32 thumbnail_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1983218620;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to an MP3 audio file.
 */
class inputInlineQueryResultAudio final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the audio file.
  string title_;
  static jfieldID title_fieldID;
  /// Performer of the audio file.
  string performer_;
  static jfieldID performer_fieldID;
  /// The URL of the audio file.
  string audio_url_;
  static jfieldID audio_url_fieldID;
  /// Audio file duration, in seconds.
  int32 audio_duration_;
  static jfieldID audio_duration_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAudio, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to an MP3 audio file.
   */
  inputInlineQueryResultAudio();

  /**
   * Represents a link to an MP3 audio file.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] title_ Title of the audio file.
   * \param[in] performer_ Performer of the audio file.
   * \param[in] audio_url_ The URL of the audio file.
   * \param[in] audio_duration_ Audio file duration, in seconds.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAudio, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultAudio(string const &id_, string const &title_, string const &performer_, string const &audio_url_, int32 audio_duration_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1260139988;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a user contact.
 */
class inputInlineQueryResultContact final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// User contact.
  object_ptr<contact> contact_;
  static jfieldID contact_fieldID;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  static jfieldID thumbnail_width_fieldID;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  static jfieldID thumbnail_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a user contact.
   */
  inputInlineQueryResultContact();

  /**
   * Represents a user contact.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] contact_ User contact.
   * \param[in] thumbnail_url_ URL of the result thumbnail, if it exists.
   * \param[in] thumbnail_width_ Thumbnail width, if known.
   * \param[in] thumbnail_height_ Thumbnail height, if known.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultContact(string const &id_, object_ptr<contact> &&contact_, string const &thumbnail_url_, int32 thumbnail_width_, int32 thumbnail_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1846064594;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to a file.
 */
class inputInlineQueryResultDocument final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the resulting file.
  string title_;
  static jfieldID title_fieldID;
  /// Short description of the result, if known.
  string description_;
  static jfieldID description_fieldID;
  /// URL of the file.
  string document_url_;
  static jfieldID document_url_fieldID;
  /// MIME type of the file content; only &quot;application/pdf&quot; and &quot;application/zip&quot; are currently allowed.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// The URL of the file thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// Width of the thumbnail.
  int32 thumbnail_width_;
  static jfieldID thumbnail_width_fieldID;
  /// Height of the thumbnail.
  int32 thumbnail_height_;
  static jfieldID thumbnail_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageDocument, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to a file.
   */
  inputInlineQueryResultDocument();

  /**
   * Represents a link to a file.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] title_ Title of the resulting file.
   * \param[in] description_ Short description of the result, if known.
   * \param[in] document_url_ URL of the file.
   * \param[in] mime_type_ MIME type of the file content; only &quot;application/pdf&quot; and &quot;application/zip&quot; are currently allowed.
   * \param[in] thumbnail_url_ The URL of the file thumbnail, if it exists.
   * \param[in] thumbnail_width_ Width of the thumbnail.
   * \param[in] thumbnail_height_ Height of the thumbnail.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageDocument, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultDocument(string const &id_, string const &title_, string const &description_, string const &document_url_, string const &mime_type_, string const &thumbnail_url_, int32 thumbnail_width_, int32 thumbnail_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 578801869;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a game.
 */
class inputInlineQueryResultGame final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Short name of the game.
  string game_short_name_;
  static jfieldID game_short_name_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Represents a game.
   */
  inputInlineQueryResultGame();

  /**
   * Represents a game.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] game_short_name_ Short name of the game.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   */
  inputInlineQueryResultGame(string const &id_, string const &game_short_name_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 966074327;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a point on the map.
 */
class inputInlineQueryResultLocation final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Location result.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Amount of time relative to the message sent time until the location can be updated, in seconds.
  int32 live_period_;
  static jfieldID live_period_fieldID;
  /// Title of the result.
  string title_;
  static jfieldID title_fieldID;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  static jfieldID thumbnail_width_fieldID;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  static jfieldID thumbnail_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a point on the map.
   */
  inputInlineQueryResultLocation();

  /**
   * Represents a point on the map.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] location_ Location result.
   * \param[in] live_period_ Amount of time relative to the message sent time until the location can be updated, in seconds.
   * \param[in] title_ Title of the result.
   * \param[in] thumbnail_url_ URL of the result thumbnail, if it exists.
   * \param[in] thumbnail_width_ Thumbnail width, if known.
   * \param[in] thumbnail_height_ Thumbnail height, if known.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultLocation(string const &id_, object_ptr<location> &&location_, int32 live_period_, string const &title_, string const &thumbnail_url_, int32 thumbnail_width_, int32 thumbnail_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1887650218;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents link to a JPEG image.
 */
class inputInlineQueryResultPhoto final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the result, if known.
  string title_;
  static jfieldID title_fieldID;
  /// A short description of the result, if known.
  string description_;
  static jfieldID description_fieldID;
  /// URL of the photo thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// The URL of the JPEG photo (photo size must not exceed 5MB).
  string photo_url_;
  static jfieldID photo_url_fieldID;
  /// Width of the photo.
  int32 photo_width_;
  static jfieldID photo_width_fieldID;
  /// Height of the photo.
  int32 photo_height_;
  static jfieldID photo_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessagePhoto, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents link to a JPEG image.
   */
  inputInlineQueryResultPhoto();

  /**
   * Represents link to a JPEG image.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] title_ Title of the result, if known.
   * \param[in] description_ A short description of the result, if known.
   * \param[in] thumbnail_url_ URL of the photo thumbnail, if it exists.
   * \param[in] photo_url_ The URL of the JPEG photo (photo size must not exceed 5MB).
   * \param[in] photo_width_ Width of the photo.
   * \param[in] photo_height_ Height of the photo.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessagePhoto, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultPhoto(string const &id_, string const &title_, string const &description_, string const &thumbnail_url_, string const &photo_url_, int32 photo_width_, int32 photo_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1123338721;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to a WEBP, TGS, or WEBM sticker.
 */
class inputInlineQueryResultSticker final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// URL of the sticker thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB).
  string sticker_url_;
  static jfieldID sticker_url_fieldID;
  /// Width of the sticker.
  int32 sticker_width_;
  static jfieldID sticker_width_fieldID;
  /// Height of the sticker.
  int32 sticker_height_;
  static jfieldID sticker_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageSticker, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to a WEBP, TGS, or WEBM sticker.
   */
  inputInlineQueryResultSticker();

  /**
   * Represents a link to a WEBP, TGS, or WEBM sticker.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] thumbnail_url_ URL of the sticker thumbnail, if it exists.
   * \param[in] sticker_url_ The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB).
   * \param[in] sticker_width_ Width of the sticker.
   * \param[in] sticker_height_ Height of the sticker.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageSticker, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultSticker(string const &id_, string const &thumbnail_url_, string const &sticker_url_, int32 sticker_width_, int32 sticker_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 274007129;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents information about a venue.
 */
class inputInlineQueryResultVenue final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Venue result.
  object_ptr<venue> venue_;
  static jfieldID venue_fieldID;
  /// URL of the result thumbnail, if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// Thumbnail width, if known.
  int32 thumbnail_width_;
  static jfieldID thumbnail_width_fieldID;
  /// Thumbnail height, if known.
  int32 thumbnail_height_;
  static jfieldID thumbnail_height_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents information about a venue.
   */
  inputInlineQueryResultVenue();

  /**
   * Represents information about a venue.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] venue_ Venue result.
   * \param[in] thumbnail_url_ URL of the result thumbnail, if it exists.
   * \param[in] thumbnail_width_ Thumbnail width, if known.
   * \param[in] thumbnail_height_ Thumbnail height, if known.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultVenue(string const &id_, object_ptr<venue> &&venue_, string const &thumbnail_url_, int32 thumbnail_width_, int32 thumbnail_height_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 541704509;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to a page containing an embedded video player or a video file.
 */
class inputInlineQueryResultVideo final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the result.
  string title_;
  static jfieldID title_fieldID;
  /// A short description of the result, if known.
  string description_;
  static jfieldID description_fieldID;
  /// The URL of the video thumbnail (JPEG), if it exists.
  string thumbnail_url_;
  static jfieldID thumbnail_url_fieldID;
  /// URL of the embedded video player or video file.
  string video_url_;
  static jfieldID video_url_fieldID;
  /// MIME type of the content of the video URL, only &quot;text/html&quot; or &quot;video/mp4&quot; are currently supported.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// Width of the video.
  int32 video_width_;
  static jfieldID video_width_fieldID;
  /// Height of the video.
  int32 video_height_;
  static jfieldID video_height_fieldID;
  /// Video duration, in seconds.
  int32 video_duration_;
  static jfieldID video_duration_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVideo, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to a page containing an embedded video player or a video file.
   */
  inputInlineQueryResultVideo();

  /**
   * Represents a link to a page containing an embedded video player or a video file.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] title_ Title of the result.
   * \param[in] description_ A short description of the result, if known.
   * \param[in] thumbnail_url_ The URL of the video thumbnail (JPEG), if it exists.
   * \param[in] video_url_ URL of the embedded video player or video file.
   * \param[in] mime_type_ MIME type of the content of the video URL, only &quot;text/html&quot; or &quot;video/mp4&quot; are currently supported.
   * \param[in] video_width_ Width of the video.
   * \param[in] video_height_ Height of the video.
   * \param[in] video_duration_ Video duration, in seconds.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVideo, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultVideo(string const &id_, string const &title_, string const &description_, string const &thumbnail_url_, string const &video_url_, string const &mime_type_, int32 video_width_, int32 video_height_, int32 video_duration_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1724073191;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a link to an opus-encoded audio file within an OGG container, single channel audio.
 */
class inputInlineQueryResultVoiceNote final : public InputInlineQueryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the query result.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the voice note.
  string title_;
  static jfieldID title_fieldID;
  /// The URL of the voice note file.
  string voice_note_url_;
  static jfieldID voice_note_url_fieldID;
  /// Duration of the voice note, in seconds.
  int32 voice_note_duration_;
  static jfieldID voice_note_duration_fieldID;
  /// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVoiceNote, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Represents a link to an opus-encoded audio file within an OGG container, single channel audio.
   */
  inputInlineQueryResultVoiceNote();

  /**
   * Represents a link to an opus-encoded audio file within an OGG container, single channel audio.
   *
   * \param[in] id_ Unique identifier of the query result.
   * \param[in] title_ Title of the voice note.
   * \param[in] voice_note_url_ The URL of the voice note file.
   * \param[in] voice_note_duration_ Duration of the voice note, in seconds.
   * \param[in] reply_markup_ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null.
   * \param[in] input_message_content_ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVoiceNote, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact.
   */
  inputInlineQueryResultVoiceNote(string const &id_, string const &title_, string const &voice_note_url_, int32 voice_note_duration_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1790072503;

  static object_ptr<InputInlineQueryResult> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class TelegramPaymentPurpose;

/**
 * This class is an abstract base class.
 * Describes an invoice to process.
 */
class InputInvoice: public Object {
 public:
  static jclass Class;

  static object_ptr<InputInvoice> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An invoice from a message of the type messageInvoice or paid media purchase from messagePaidMedia.
 */
class inputInvoiceMessage final : public InputInvoice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier. Use messageProperties.can_be_paid to check whether the message can be used in the method.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * An invoice from a message of the type messageInvoice or paid media purchase from messagePaidMedia.
   */
  inputInvoiceMessage();

  /**
   * An invoice from a message of the type messageInvoice or paid media purchase from messagePaidMedia.
   *
   * \param[in] chat_id_ Chat identifier of the message.
   * \param[in] message_id_ Message identifier. Use messageProperties.can_be_paid to check whether the message can be used in the method.
   */
  inputInvoiceMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1490872848;

  static object_ptr<InputInvoice> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An invoice from a link of the type internalLinkTypeInvoice.
 */
class inputInvoiceName final : public InputInvoice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the invoice.
  string name_;
  static jfieldID name_fieldID;

  /**
   * An invoice from a link of the type internalLinkTypeInvoice.
   */
  inputInvoiceName();

  /**
   * An invoice from a link of the type internalLinkTypeInvoice.
   *
   * \param[in] name_ Name of the invoice.
   */
  explicit inputInvoiceName(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1312155917;

  static object_ptr<InputInvoice> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An invoice for a payment toward Telegram; must not be used in the in-store apps.
 */
class inputInvoiceTelegram final : public InputInvoice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Transaction purpose.
  object_ptr<TelegramPaymentPurpose> purpose_;
  static jfieldID purpose_fieldID;

  /**
   * An invoice for a payment toward Telegram; must not be used in the in-store apps.
   */
  inputInvoiceTelegram();

  /**
   * An invoice for a payment toward Telegram; must not be used in the in-store apps.
   *
   * \param[in] purpose_ Transaction purpose.
   */
  explicit inputInvoiceTelegram(object_ptr<TelegramPaymentPurpose> &&purpose_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1762853139;

  static object_ptr<InputInvoice> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class InputMessageContent;

class InputPollType;

class MessageSelfDestructType;

class contact;

class formattedText;

class inputChecklist;

class inputPaidMedia;

class inputPollOption;

class inputThumbnail;

class invoice;

class linkPreviewOptions;

class location;

class messageCopyOptions;

class venue;

/**
 * This class is an abstract base class.
 * The content of a message to send.
 */
class InputMessageContent: public Object {
 public:
  static jclass Class;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A text message.
 */
class inputMessageText final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Formatted text to be sent; 0-getOption(&quot;message_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl, MentionName, and DateTime entities are allowed to be specified manually.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Options to be used for generation of a link preview; may be null if none; pass null to use default link preview options.
  object_ptr<linkPreviewOptions> link_preview_options_;
  static jfieldID link_preview_options_fieldID;
  /// True, if the chat message draft must be deleted.
  bool clear_draft_;
  static jfieldID clear_draft_fieldID;

  /**
   * A text message.
   */
  inputMessageText();

  /**
   * A text message.
   *
   * \param[in] text_ Formatted text to be sent; 0-getOption(&quot;message_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl, MentionName, and DateTime entities are allowed to be specified manually.
   * \param[in] link_preview_options_ Options to be used for generation of a link preview; may be null if none; pass null to use default link preview options.
   * \param[in] clear_draft_ True, if the chat message draft must be deleted.
   */
  inputMessageText(object_ptr<formattedText> &&text_, object_ptr<linkPreviewOptions> &&link_preview_options_, bool clear_draft_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -212805484;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An animation message (GIF-style).
 */
class inputMessageAnimation final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Animation file to be sent.
  object_ptr<InputFile> animation_;
  static jfieldID animation_fieldID;
  /// Animation thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// File identifiers of the stickers added to the animation, if applicable.
  array<int32> added_sticker_file_ids_;
  static jfieldID added_sticker_file_ids_fieldID;
  /// Duration of the animation, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Width of the animation; may be replaced by the server.
  int32 width_;
  static jfieldID width_fieldID;
  /// Height of the animation; may be replaced by the server.
  int32 height_;
  static jfieldID height_fieldID;
  /// Animation caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the animation; otherwise, the caption must be shown below the animation; not supported in secret chats.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// True, if the animation preview must be covered by a spoiler animation; not supported in secret chats.
  bool has_spoiler_;
  static jfieldID has_spoiler_fieldID;

  /**
   * An animation message (GIF-style).
   */
  inputMessageAnimation();

  /**
   * An animation message (GIF-style).
   *
   * \param[in] animation_ Animation file to be sent.
   * \param[in] thumbnail_ Animation thumbnail; pass null to skip thumbnail uploading.
   * \param[in] added_sticker_file_ids_ File identifiers of the stickers added to the animation, if applicable.
   * \param[in] duration_ Duration of the animation, in seconds.
   * \param[in] width_ Width of the animation; may be replaced by the server.
   * \param[in] height_ Height of the animation; may be replaced by the server.
   * \param[in] caption_ Animation caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the animation; otherwise, the caption must be shown below the animation; not supported in secret chats.
   * \param[in] has_spoiler_ True, if the animation preview must be covered by a spoiler animation; not supported in secret chats.
   */
  inputMessageAnimation(object_ptr<InputFile> &&animation_, object_ptr<inputThumbnail> &&thumbnail_, array<int32> &&added_sticker_file_ids_, int32 duration_, int32 width_, int32 height_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, bool has_spoiler_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -210404059;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An audio message.
 */
class inputMessageAudio final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Audio file to be sent.
  object_ptr<InputFile> audio_;
  static jfieldID audio_fieldID;
  /// Thumbnail of the cover for the album; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> album_cover_thumbnail_;
  static jfieldID album_cover_thumbnail_fieldID;
  /// Duration of the audio, in seconds; may be replaced by the server.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Title of the audio; 0-64 characters; may be replaced by the server.
  string title_;
  static jfieldID title_fieldID;
  /// Performer of the audio; 0-64 characters, may be replaced by the server.
  string performer_;
  static jfieldID performer_fieldID;
  /// Audio caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;

  /**
   * An audio message.
   */
  inputMessageAudio();

  /**
   * An audio message.
   *
   * \param[in] audio_ Audio file to be sent.
   * \param[in] album_cover_thumbnail_ Thumbnail of the cover for the album; pass null to skip thumbnail uploading.
   * \param[in] duration_ Duration of the audio, in seconds; may be replaced by the server.
   * \param[in] title_ Title of the audio; 0-64 characters; may be replaced by the server.
   * \param[in] performer_ Performer of the audio; 0-64 characters, may be replaced by the server.
   * \param[in] caption_ Audio caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   */
  inputMessageAudio(object_ptr<InputFile> &&audio_, object_ptr<inputThumbnail> &&album_cover_thumbnail_, int32 duration_, string const &title_, string const &performer_, object_ptr<formattedText> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -626786126;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A document message (general file).
 */
class inputMessageDocument final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Document to be sent.
  object_ptr<InputFile> document_;
  static jfieldID document_fieldID;
  /// Document thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Pass true to disable automatic file type detection and send the document as a file. Always true for files sent to secret chats.
  bool disable_content_type_detection_;
  static jfieldID disable_content_type_detection_fieldID;
  /// Document caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;

  /**
   * A document message (general file).
   */
  inputMessageDocument();

  /**
   * A document message (general file).
   *
   * \param[in] document_ Document to be sent.
   * \param[in] thumbnail_ Document thumbnail; pass null to skip thumbnail uploading.
   * \param[in] disable_content_type_detection_ Pass true to disable automatic file type detection and send the document as a file. Always true for files sent to secret chats.
   * \param[in] caption_ Document caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   */
  inputMessageDocument(object_ptr<InputFile> &&document_, object_ptr<inputThumbnail> &&thumbnail_, bool disable_content_type_detection_, object_ptr<formattedText> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1633383097;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with paid media; can be used only in channel chats with supergroupFullInfo.has_paid_media_allowed.
 */
class inputMessagePaidMedia final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of Telegram Stars that must be paid to see the media; 1-getOption(&quot;paid_media_message_star_count_max&quot;).
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// The content of the paid media.
  array<object_ptr<inputPaidMedia>> paid_media_;
  static jfieldID paid_media_fieldID;
  /// Message caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the media; otherwise, the caption must be shown below the media; not supported in secret chats.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// Bot-provided data for the paid media; bots only.
  string payload_;
  static jfieldID payload_fieldID;

  /**
   * A message with paid media; can be used only in channel chats with supergroupFullInfo.has_paid_media_allowed.
   */
  inputMessagePaidMedia();

  /**
   * A message with paid media; can be used only in channel chats with supergroupFullInfo.has_paid_media_allowed.
   *
   * \param[in] star_count_ The number of Telegram Stars that must be paid to see the media; 1-getOption(&quot;paid_media_message_star_count_max&quot;).
   * \param[in] paid_media_ The content of the paid media.
   * \param[in] caption_ Message caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the media; otherwise, the caption must be shown below the media; not supported in secret chats.
   * \param[in] payload_ Bot-provided data for the paid media; bots only.
   */
  inputMessagePaidMedia(int53 star_count_, array<object_ptr<inputPaidMedia>> &&paid_media_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, string const &payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1274819374;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo message.
 */
class inputMessagePhoto final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo to send. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
  object_ptr<InputFile> photo_;
  static jfieldID photo_fieldID;
  /// Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Video of the live photo; not supported in secret chats; pass null if the photo isn't a live photo.
  object_ptr<InputFile> video_;
  static jfieldID video_fieldID;
  /// File identifiers of the stickers added to the photo, if applicable.
  array<int32> added_sticker_file_ids_;
  static jfieldID added_sticker_file_ids_fieldID;
  /// Photo width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Photo height.
  int32 height_;
  static jfieldID height_fieldID;
  /// Photo caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the photo; otherwise, the caption must be shown below the photo; not supported in secret chats.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// Photo self-destruct type; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  static jfieldID self_destruct_type_fieldID;
  /// True, if the photo preview must be covered by a spoiler animation; not supported in secret chats.
  bool has_spoiler_;
  static jfieldID has_spoiler_fieldID;

  /**
   * A photo message.
   */
  inputMessagePhoto();

  /**
   * A photo message.
   *
   * \param[in] photo_ Photo to send. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
   * \param[in] thumbnail_ Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats.
   * \param[in] video_ Video of the live photo; not supported in secret chats; pass null if the photo isn't a live photo.
   * \param[in] added_sticker_file_ids_ File identifiers of the stickers added to the photo, if applicable.
   * \param[in] width_ Photo width.
   * \param[in] height_ Photo height.
   * \param[in] caption_ Photo caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the photo; otherwise, the caption must be shown below the photo; not supported in secret chats.
   * \param[in] self_destruct_type_ Photo self-destruct type; pass null if none; private chats only.
   * \param[in] has_spoiler_ True, if the photo preview must be covered by a spoiler animation; not supported in secret chats.
   */
  inputMessagePhoto(object_ptr<InputFile> &&photo_, object_ptr<inputThumbnail> &&thumbnail_, object_ptr<InputFile> &&video_, array<int32> &&added_sticker_file_ids_, int32 width_, int32 height_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, object_ptr<MessageSelfDestructType> &&self_destruct_type_, bool has_spoiler_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 163591772;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A sticker message.
 */
class inputMessageSticker final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker to be sent.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;
  /// Sticker thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Sticker width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Sticker height.
  int32 height_;
  static jfieldID height_fieldID;
  /// Emoji used to choose the sticker.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * A sticker message.
   */
  inputMessageSticker();

  /**
   * A sticker message.
   *
   * \param[in] sticker_ Sticker to be sent.
   * \param[in] thumbnail_ Sticker thumbnail; pass null to skip thumbnail uploading.
   * \param[in] width_ Sticker width.
   * \param[in] height_ Sticker height.
   * \param[in] emoji_ Emoji used to choose the sticker.
   */
  inputMessageSticker(object_ptr<InputFile> &&sticker_, object_ptr<inputThumbnail> &&thumbnail_, int32 width_, int32 height_, string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1072805625;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video message.
 */
class inputMessageVideo final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Video to be sent. The video is expected to be re-encoded to MPEG4 format with H.264 codec by the sender.
  object_ptr<InputFile> video_;
  static jfieldID video_fieldID;
  /// Video thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Cover of the video; pass null to skip cover uploading; not supported in secret chats and for self-destructing messages.
  object_ptr<InputFile> cover_;
  static jfieldID cover_fieldID;
  /// Timestamp from which the video playing must start, in seconds.
  int32 start_timestamp_;
  static jfieldID start_timestamp_fieldID;
  /// File identifiers of the stickers added to the video, if applicable.
  array<int32> added_sticker_file_ids_;
  static jfieldID added_sticker_file_ids_fieldID;
  /// Duration of the video, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Video width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Video height.
  int32 height_;
  static jfieldID height_fieldID;
  /// True, if the video is expected to be streamed.
  bool supports_streaming_;
  static jfieldID supports_streaming_fieldID;
  /// Video caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the video; otherwise, the caption must be shown below the video; not supported in secret chats.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// Video self-destruct type; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  static jfieldID self_destruct_type_fieldID;
  /// True, if the video preview must be covered by a spoiler animation; not supported in secret chats.
  bool has_spoiler_;
  static jfieldID has_spoiler_fieldID;

  /**
   * A video message.
   */
  inputMessageVideo();

  /**
   * A video message.
   *
   * \param[in] video_ Video to be sent. The video is expected to be re-encoded to MPEG4 format with H.264 codec by the sender.
   * \param[in] thumbnail_ Video thumbnail; pass null to skip thumbnail uploading.
   * \param[in] cover_ Cover of the video; pass null to skip cover uploading; not supported in secret chats and for self-destructing messages.
   * \param[in] start_timestamp_ Timestamp from which the video playing must start, in seconds.
   * \param[in] added_sticker_file_ids_ File identifiers of the stickers added to the video, if applicable.
   * \param[in] duration_ Duration of the video, in seconds.
   * \param[in] width_ Video width.
   * \param[in] height_ Video height.
   * \param[in] supports_streaming_ True, if the video is expected to be streamed.
   * \param[in] caption_ Video caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the video; otherwise, the caption must be shown below the video; not supported in secret chats.
   * \param[in] self_destruct_type_ Video self-destruct type; pass null if none; private chats only.
   * \param[in] has_spoiler_ True, if the video preview must be covered by a spoiler animation; not supported in secret chats.
   */
  inputMessageVideo(object_ptr<InputFile> &&video_, object_ptr<inputThumbnail> &&thumbnail_, object_ptr<InputFile> &&cover_, int32 start_timestamp_, array<int32> &&added_sticker_file_ids_, int32 duration_, int32 width_, int32 height_, bool supports_streaming_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, object_ptr<MessageSelfDestructType> &&self_destruct_type_, bool has_spoiler_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -605958271;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video note message.
 */
class inputMessageVideoNote final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Video note to be sent. The video is expected to be encoded to MPEG4 format with H.264 codec and have no data outside of the visible circle.
  object_ptr<InputFile> video_note_;
  static jfieldID video_note_fieldID;
  /// Video thumbnail; may be null if empty; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Duration of the video, in seconds; 0-60.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Video width and height; must be positive and not greater than 640.
  int32 length_;
  static jfieldID length_fieldID;
  /// Video note self-destruct type; may be null if none; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  static jfieldID self_destruct_type_fieldID;

  /**
   * A video note message.
   */
  inputMessageVideoNote();

  /**
   * A video note message.
   *
   * \param[in] video_note_ Video note to be sent. The video is expected to be encoded to MPEG4 format with H.264 codec and have no data outside of the visible circle.
   * \param[in] thumbnail_ Video thumbnail; may be null if empty; pass null to skip thumbnail uploading.
   * \param[in] duration_ Duration of the video, in seconds; 0-60.
   * \param[in] length_ Video width and height; must be positive and not greater than 640.
   * \param[in] self_destruct_type_ Video note self-destruct type; may be null if none; pass null if none; private chats only.
   */
  inputMessageVideoNote(object_ptr<InputFile> &&video_note_, object_ptr<inputThumbnail> &&thumbnail_, int32 duration_, int32 length_, object_ptr<MessageSelfDestructType> &&self_destruct_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -714598691;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A voice note message.
 */
class inputMessageVoiceNote final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Voice note to be sent. The voice note must be encoded with the Opus codec and stored inside an OGG container with a single audio channel, or be in MP3 or M4A format as regular audio.
  object_ptr<InputFile> voice_note_;
  static jfieldID voice_note_fieldID;
  /// Duration of the voice note, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Waveform representation of the voice note in 5-bit format.
  bytes waveform_;
  static jfieldID waveform_fieldID;
  /// Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// Voice note self-destruct type; may be null if none; pass null if none; private chats only.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  static jfieldID self_destruct_type_fieldID;

  /**
   * A voice note message.
   */
  inputMessageVoiceNote();

  /**
   * A voice note message.
   *
   * \param[in] voice_note_ Voice note to be sent. The voice note must be encoded with the Opus codec and stored inside an OGG container with a single audio channel, or be in MP3 or M4A format as regular audio.
   * \param[in] duration_ Duration of the voice note, in seconds.
   * \param[in] waveform_ Waveform representation of the voice note in 5-bit format.
   * \param[in] caption_ Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] self_destruct_type_ Voice note self-destruct type; may be null if none; pass null if none; private chats only.
   */
  inputMessageVoiceNote(object_ptr<InputFile> &&voice_note_, int32 duration_, bytes const &waveform_, object_ptr<formattedText> &&caption_, object_ptr<MessageSelfDestructType> &&self_destruct_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1461977004;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a location.
 */
class inputMessageLocation final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Location to be sent.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Period for which the location can be updated, in seconds; must be between 60 and 86400 for a temporary live location, 0x7FFFFFFF for permanent live location, and 0 otherwise.
  int32 live_period_;
  static jfieldID live_period_fieldID;
  /// For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  static jfieldID heading_fieldID;
  /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages.
  int32 proximity_alert_radius_;
  static jfieldID proximity_alert_radius_fieldID;

  /**
   * A message with a location.
   */
  inputMessageLocation();

  /**
   * A message with a location.
   *
   * \param[in] location_ Location to be sent.
   * \param[in] live_period_ Period for which the location can be updated, in seconds; must be between 60 and 86400 for a temporary live location, 0x7FFFFFFF for permanent live location, and 0 otherwise.
   * \param[in] heading_ For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
   * \param[in] proximity_alert_radius_ For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages.
   */
  inputMessageLocation(object_ptr<location> &&location_, int32 live_period_, int32 heading_, int32 proximity_alert_radius_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 648735088;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about a venue.
 */
class inputMessageVenue final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Venue to send.
  object_ptr<venue> venue_;
  static jfieldID venue_fieldID;

  /**
   * A message with information about a venue.
   */
  inputMessageVenue();

  /**
   * A message with information about a venue.
   *
   * \param[in] venue_ Venue to send.
   */
  explicit inputMessageVenue(object_ptr<venue> &&venue_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1447926269;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message containing a user contact.
 */
class inputMessageContact final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Contact to send.
  object_ptr<contact> contact_;
  static jfieldID contact_fieldID;

  /**
   * A message containing a user contact.
   */
  inputMessageContact();

  /**
   * A message containing a user contact.
   *
   * \param[in] contact_ Contact to send.
   */
  explicit inputMessageContact(object_ptr<contact> &&contact_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -982446849;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A dice message.
 */
class inputMessageDice final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Emoji on which the dice throw animation is based.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// True, if the chat message draft must be deleted.
  bool clear_draft_;
  static jfieldID clear_draft_fieldID;

  /**
   * A dice message.
   */
  inputMessageDice();

  /**
   * A dice message.
   *
   * \param[in] emoji_ Emoji on which the dice throw animation is based.
   * \param[in] clear_draft_ True, if the chat message draft must be deleted.
   */
  inputMessageDice(string const &emoji_, bool clear_draft_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 841574313;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a game; not supported for channels or secret chats.
 */
class inputMessageGame final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot that owns the game.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Short name of the game.
  string game_short_name_;
  static jfieldID game_short_name_fieldID;

  /**
   * A message with a game; not supported for channels or secret chats.
   */
  inputMessageGame();

  /**
   * A message with a game; not supported for channels or secret chats.
   *
   * \param[in] bot_user_id_ User identifier of the bot that owns the game.
   * \param[in] game_short_name_ Short name of the game.
   */
  inputMessageGame(int53 bot_user_id_, string const &game_short_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1252944610;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with an invoice; can be used only by bots.
 */
class inputMessageInvoice final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invoice.
  object_ptr<invoice> invoice_;
  static jfieldID invoice_fieldID;
  /// Product title; 1-32 characters.
  string title_;
  static jfieldID title_fieldID;
  /// Product description; 0-255 characters.
  string description_;
  static jfieldID description_fieldID;
  /// Product photo URL; optional.
  string photo_url_;
  static jfieldID photo_url_fieldID;
  /// Product photo size.
  int32 photo_size_;
  static jfieldID photo_size_fieldID;
  /// Product photo width.
  int32 photo_width_;
  static jfieldID photo_width_fieldID;
  /// Product photo height.
  int32 photo_height_;
  static jfieldID photo_height_fieldID;
  /// The invoice payload.
  bytes payload_;
  static jfieldID payload_fieldID;
  /// Payment provider token; may be empty for payments in Telegram Stars.
  string provider_token_;
  static jfieldID provider_token_fieldID;
  /// JSON-encoded data about the invoice, which will be shared with the payment provider.
  string provider_data_;
  static jfieldID provider_data_fieldID;
  /// Unique invoice bot deep link parameter for the generation of this invoice. If empty, it would be possible to pay directly from forwards of the invoice message.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// The content of paid media attached to the invoice; pass null if none.
  object_ptr<inputPaidMedia> paid_media_;
  static jfieldID paid_media_fieldID;
  /// Paid media caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> paid_media_caption_;
  static jfieldID paid_media_caption_fieldID;

  /**
   * A message with an invoice; can be used only by bots.
   */
  inputMessageInvoice();

  /**
   * A message with an invoice; can be used only by bots.
   *
   * \param[in] invoice_ Invoice.
   * \param[in] title_ Product title; 1-32 characters.
   * \param[in] description_ Product description; 0-255 characters.
   * \param[in] photo_url_ Product photo URL; optional.
   * \param[in] photo_size_ Product photo size.
   * \param[in] photo_width_ Product photo width.
   * \param[in] photo_height_ Product photo height.
   * \param[in] payload_ The invoice payload.
   * \param[in] provider_token_ Payment provider token; may be empty for payments in Telegram Stars.
   * \param[in] provider_data_ JSON-encoded data about the invoice, which will be shared with the payment provider.
   * \param[in] start_parameter_ Unique invoice bot deep link parameter for the generation of this invoice. If empty, it would be possible to pay directly from forwards of the invoice message.
   * \param[in] paid_media_ The content of paid media attached to the invoice; pass null if none.
   * \param[in] paid_media_caption_ Paid media caption; pass null to use an empty caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   */
  inputMessageInvoice(object_ptr<invoice> &&invoice_, string const &title_, string const &description_, string const &photo_url_, int32 photo_size_, int32 photo_width_, int32 photo_height_, bytes const &payload_, string const &provider_token_, string const &provider_data_, string const &start_parameter_, object_ptr<inputPaidMedia> &&paid_media_, object_ptr<formattedText> &&paid_media_caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1162047631;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a poll. Polls can't be sent to secret chats and channel direct messages chats. Polls can be sent to a private chat only if the chat is a chat with a bot or the Saved Messages chat.
 */
class inputMessagePoll final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users.
  object_ptr<formattedText> question_;
  static jfieldID question_fieldID;
  /// List of poll answer options; 1-getOption(&quot;poll_answer_count_max&quot;) options.
  array<object_ptr<inputPollOption>> options_;
  static jfieldID options_fieldID;
  /// Poll description; pass null to use an empty description; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> description_;
  static jfieldID description_fieldID;
  /// Media attached to the poll; pass null if none. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, non-live inputMessageLocation, inputMessagePhoto, inputMessageVenue, or inputMessageVideo without caption.
  object_ptr<InputMessageContent> media_;
  static jfieldID media_fieldID;
  /// True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
  bool is_anonymous_;
  static jfieldID is_anonymous_fieldID;
  /// True, if multiple answer options can be chosen simultaneously.
  bool allows_multiple_answers_;
  static jfieldID allows_multiple_answers_fieldID;
  /// True, if the poll can be answered multiple times.
  bool allows_revoting_;
  static jfieldID allows_revoting_fieldID;
  /// True, if only the users that are members of the chat for more than a day will be able to vote; for channel chats only.
  bool members_only_;
  static jfieldID members_only_fieldID;
  /// The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote; for channel chats only. If empty, then all users can participate in the poll. There can be up to getOption(&quot;poll_country_count_max&quot;) chosen countries.
  array<string> country_codes_;
  static jfieldID country_codes_fieldID;
  /// True, if poll options must be shown in a fixed random order.
  bool shuffle_options_;
  static jfieldID shuffle_options_fieldID;
  /// True, if the poll results will appear only after the poll closes.
  bool hide_results_until_closes_;
  static jfieldID hide_results_until_closes_fieldID;
  /// Type of the poll.
  object_ptr<InputPollType> type_;
  static jfieldID type_fieldID;
  /// Amount of time the poll will be active after creation, in seconds; 0-getOption(&quot;poll_open_period_max&quot;); pass 0 if not specified.
  int32 open_period_;
  static jfieldID open_period_fieldID;
  /// Point in time (Unix timestamp) when the poll will automatically be closed; must be 0-getOption(&quot;poll_open_period_max&quot;) seconds in the future; pass 0 if not specified.
  int32 close_date_;
  static jfieldID close_date_fieldID;
  /// True, if the poll needs to be sent already closed; for bots only.
  bool is_closed_;
  static jfieldID is_closed_fieldID;

  /**
   * A message with a poll. Polls can't be sent to secret chats and channel direct messages chats. Polls can be sent to a private chat only if the chat is a chat with a bot or the Saved Messages chat.
   */
  inputMessagePoll();

  /**
   * A message with a poll. Polls can't be sent to secret chats and channel direct messages chats. Polls can be sent to a private chat only if the chat is a chat with a bot or the Saved Messages chat.
   *
   * \param[in] question_ Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users.
   * \param[in] options_ List of poll answer options; 1-getOption(&quot;poll_answer_count_max&quot;) options.
   * \param[in] description_ Poll description; pass null to use an empty description; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] media_ Media attached to the poll; pass null if none. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, non-live inputMessageLocation, inputMessagePhoto, inputMessageVenue, or inputMessageVideo without caption.
   * \param[in] is_anonymous_ True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.
   * \param[in] allows_multiple_answers_ True, if multiple answer options can be chosen simultaneously.
   * \param[in] allows_revoting_ True, if the poll can be answered multiple times.
   * \param[in] members_only_ True, if only the users that are members of the chat for more than a day will be able to vote; for channel chats only.
   * \param[in] country_codes_ The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote; for channel chats only. If empty, then all users can participate in the poll. There can be up to getOption(&quot;poll_country_count_max&quot;) chosen countries.
   * \param[in] shuffle_options_ True, if poll options must be shown in a fixed random order.
   * \param[in] hide_results_until_closes_ True, if the poll results will appear only after the poll closes.
   * \param[in] type_ Type of the poll.
   * \param[in] open_period_ Amount of time the poll will be active after creation, in seconds; 0-getOption(&quot;poll_open_period_max&quot;); pass 0 if not specified.
   * \param[in] close_date_ Point in time (Unix timestamp) when the poll will automatically be closed; must be 0-getOption(&quot;poll_open_period_max&quot;) seconds in the future; pass 0 if not specified.
   * \param[in] is_closed_ True, if the poll needs to be sent already closed; for bots only.
   */
  inputMessagePoll(object_ptr<formattedText> &&question_, array<object_ptr<inputPollOption>> &&options_, object_ptr<formattedText> &&description_, object_ptr<InputMessageContent> &&media_, bool is_anonymous_, bool allows_multiple_answers_, bool allows_revoting_, bool members_only_, array<string> &&country_codes_, bool shuffle_options_, bool hide_results_until_closes_, object_ptr<InputPollType> &&type_, int32 open_period_, int32 close_date_, bool is_closed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -808965345;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A stake dice message.
 */
class inputMessageStakeDice final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hash of the stake dice state. The state hash can be used only if it was received recently enough. Otherwise, a new state must be requested using getStakeDiceState.
  string state_hash_;
  static jfieldID state_hash_fieldID;
  /// The Toncoin amount that will be staked; in the smallest units of the currency. Must be in the range getOption(&quot;stake_dice_stake_amount_min&quot;)-getOption(&quot;stake_dice_stake_amount_max&quot;).
  int53 stake_toncoin_amount_;
  static jfieldID stake_toncoin_amount_fieldID;
  /// True, if the chat message draft must be deleted.
  bool clear_draft_;
  static jfieldID clear_draft_fieldID;

  /**
   * A stake dice message.
   */
  inputMessageStakeDice();

  /**
   * A stake dice message.
   *
   * \param[in] state_hash_ Hash of the stake dice state. The state hash can be used only if it was received recently enough. Otherwise, a new state must be requested using getStakeDiceState.
   * \param[in] stake_toncoin_amount_ The Toncoin amount that will be staked; in the smallest units of the currency. Must be in the range getOption(&quot;stake_dice_stake_amount_min&quot;)-getOption(&quot;stake_dice_stake_amount_max&quot;).
   * \param[in] clear_draft_ True, if the chat message draft must be deleted.
   */
  inputMessageStakeDice(string const &state_hash_, int53 stake_toncoin_amount_, bool clear_draft_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1946603673;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a forwarded story. Stories can't be forwarded to secret chats. A story can be forwarded only if story.can_be_forwarded.
 */
class inputMessageStory final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * A message with a forwarded story. Stories can't be forwarded to secret chats. A story can be forwarded only if story.can_be_forwarded.
   */
  inputMessageStory();

  /**
   * A message with a forwarded story. Stories can't be forwarded to secret chats. A story can be forwarded only if story.can_be_forwarded.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  inputMessageStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -370732053;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a checklist. Checklists can't be sent to secret chats, channel chats and channel direct messages chats; for Telegram Premium users only.
 */
class inputMessageChecklist final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The checklist to send.
  object_ptr<inputChecklist> checklist_;
  static jfieldID checklist_fieldID;

  /**
   * A message with a checklist. Checklists can't be sent to secret chats, channel chats and channel direct messages chats; for Telegram Premium users only.
   */
  inputMessageChecklist();

  /**
   * A message with a checklist. Checklists can't be sent to secret chats, channel chats and channel direct messages chats; for Telegram Premium users only.
   *
   * \param[in] checklist_ The checklist to send.
   */
  explicit inputMessageChecklist(object_ptr<inputChecklist> &&checklist_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1722965261;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forwarded message.
 */
class inputMessageForwarded final : public InputMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier for the chat this forwarded message came from.
  int53 from_chat_id_;
  static jfieldID from_chat_id_fieldID;
  /// Identifier of the message to forward. A message can be forwarded only if messageProperties.can_be_forwarded.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true if a game message is being shared from a launched game; applies only to game messages.
  bool in_game_share_;
  static jfieldID in_game_share_fieldID;
  /// Pass true to replace video start timestamp in the forwarded message.
  bool replace_video_start_timestamp_;
  static jfieldID replace_video_start_timestamp_fieldID;
  /// The new video start timestamp; ignored if replace_video_start_timestamp == false.
  int32 new_video_start_timestamp_;
  static jfieldID new_video_start_timestamp_fieldID;
  /// Options to be used to copy content of the message without reference to the original sender; pass null to forward the message as usual.
  object_ptr<messageCopyOptions> copy_options_;
  static jfieldID copy_options_fieldID;

  /**
   * A forwarded message.
   */
  inputMessageForwarded();

  /**
   * A forwarded message.
   *
   * \param[in] from_chat_id_ Identifier for the chat this forwarded message came from.
   * \param[in] message_id_ Identifier of the message to forward. A message can be forwarded only if messageProperties.can_be_forwarded.
   * \param[in] in_game_share_ Pass true if a game message is being shared from a launched game; applies only to game messages.
   * \param[in] replace_video_start_timestamp_ Pass true to replace video start timestamp in the forwarded message.
   * \param[in] new_video_start_timestamp_ The new video start timestamp; ignored if replace_video_start_timestamp == false.
   * \param[in] copy_options_ Options to be used to copy content of the message without reference to the original sender; pass null to forward the message as usual.
   */
  inputMessageForwarded(int53 from_chat_id_, int53 message_id_, bool in_game_share_, bool replace_video_start_timestamp_, int32 new_video_start_timestamp_, object_ptr<messageCopyOptions> &&copy_options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1076506316;

  static object_ptr<InputMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class inputTextQuote;

/**
 * This class is an abstract base class.
 * Contains information about the message or the story to be replied.
 */
class InputMessageReplyTo: public Object {
 public:
  static jclass Class;

  static object_ptr<InputMessageReplyTo> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a message to be replied in the same chat and forum topic.
 */
class inputMessageReplyToMessage final : public InputMessageReplyTo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the message to be replied in the same chat and forum topic. A message can be replied in the same chat and forum topic only if messageProperties.can_be_replied.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Quote from the message to be replied; pass null if none. Must always be null for replies in secret chats.
  object_ptr<inputTextQuote> quote_;
  static jfieldID quote_fieldID;
  /// Identifier of the checklist task in the message to be replied; pass 0 to reply to the whole message.
  int32 checklist_task_id_;
  static jfieldID checklist_task_id_fieldID;
  /// Identifier of the poll option in the message to be replied; pass an empty string if none.
  string poll_option_id_;
  static jfieldID poll_option_id_fieldID;

  /**
   * Describes a message to be replied in the same chat and forum topic.
   */
  inputMessageReplyToMessage();

  /**
   * Describes a message to be replied in the same chat and forum topic.
   *
   * \param[in] message_id_ The identifier of the message to be replied in the same chat and forum topic. A message can be replied in the same chat and forum topic only if messageProperties.can_be_replied.
   * \param[in] quote_ Quote from the message to be replied; pass null if none. Must always be null for replies in secret chats.
   * \param[in] checklist_task_id_ Identifier of the checklist task in the message to be replied; pass 0 to reply to the whole message.
   * \param[in] poll_option_id_ Identifier of the poll option in the message to be replied; pass an empty string if none.
   */
  inputMessageReplyToMessage(int53 message_id_, object_ptr<inputTextQuote> &&quote_, int32 checklist_task_id_, string const &poll_option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1117785378;

  static object_ptr<InputMessageReplyTo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a message to be replied that is from a different chat or a forum topic; not supported in secret chats.
 */
class inputMessageReplyToExternalMessage final : public InputMessageReplyTo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the chat to which the message to be replied belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The identifier of the message to be replied in the specified chat. A message can be replied in another chat or forum topic only if messageProperties.can_be_replied_in_another_chat.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Quote from the message to be replied; pass null if none.
  object_ptr<inputTextQuote> quote_;
  static jfieldID quote_fieldID;
  /// Identifier of the checklist task in the message to be replied; pass 0 to reply to the whole message.
  int32 checklist_task_id_;
  static jfieldID checklist_task_id_fieldID;
  /// Identifier of the poll option in the message to be replied; pass an empty string if none.
  string poll_option_id_;
  static jfieldID poll_option_id_fieldID;

  /**
   * Describes a message to be replied that is from a different chat or a forum topic; not supported in secret chats.
   */
  inputMessageReplyToExternalMessage();

  /**
   * Describes a message to be replied that is from a different chat or a forum topic; not supported in secret chats.
   *
   * \param[in] chat_id_ The identifier of the chat to which the message to be replied belongs.
   * \param[in] message_id_ The identifier of the message to be replied in the specified chat. A message can be replied in another chat or forum topic only if messageProperties.can_be_replied_in_another_chat.
   * \param[in] quote_ Quote from the message to be replied; pass null if none.
   * \param[in] checklist_task_id_ Identifier of the checklist task in the message to be replied; pass 0 to reply to the whole message.
   * \param[in] poll_option_id_ Identifier of the poll option in the message to be replied; pass an empty string if none.
   */
  inputMessageReplyToExternalMessage(int53 chat_id_, int53 message_id_, object_ptr<inputTextQuote> &&quote_, int32 checklist_task_id_, string const &poll_option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1956732638;

  static object_ptr<InputMessageReplyTo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a story to be replied.
 */
class inputMessageReplyToStory final : public InputMessageReplyTo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story. Currently, stories can be replied only in the chat that posted the story; channel stories can't be replied.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Describes a story to be replied.
   */
  inputMessageReplyToStory();

  /**
   * Describes a story to be replied.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story. Currently, stories can be replied only in the chat that posted the story; channel stories can't be replied.
   * \param[in] story_id_ The identifier of the story.
   */
  inputMessageReplyToStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1723842320;

  static object_ptr<InputMessageReplyTo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class InputPaidMediaType;

class inputThumbnail;

/**
 * Describes a paid media to be sent.
 */
class inputPaidMedia final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the media.
  object_ptr<InputPaidMediaType> type_;
  static jfieldID type_fieldID;
  /// Photo or video to be sent.
  object_ptr<InputFile> media_;
  static jfieldID media_fieldID;
  /// Media thumbnail; pass null to skip thumbnail uploading.
  object_ptr<inputThumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// File identifiers of the stickers added to the media, if applicable.
  array<int32> added_sticker_file_ids_;
  static jfieldID added_sticker_file_ids_fieldID;
  /// Media width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Media height.
  int32 height_;
  static jfieldID height_fieldID;

  /**
   * Describes a paid media to be sent.
   */
  inputPaidMedia();

  /**
   * Describes a paid media to be sent.
   *
   * \param[in] type_ Type of the media.
   * \param[in] media_ Photo or video to be sent.
   * \param[in] thumbnail_ Media thumbnail; pass null to skip thumbnail uploading.
   * \param[in] added_sticker_file_ids_ File identifiers of the stickers added to the media, if applicable.
   * \param[in] width_ Media width.
   * \param[in] height_ Media height.
   */
  inputPaidMedia(object_ptr<InputPaidMediaType> &&type_, object_ptr<InputFile> &&media_, object_ptr<inputThumbnail> &&thumbnail_, array<int32> &&added_sticker_file_ids_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 475844035;

  static object_ptr<inputPaidMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

/**
 * This class is an abstract base class.
 * Describes type of paid media to sent.
 */
class InputPaidMediaType: public Object {
 public:
  static jclass Class;

  static object_ptr<InputPaidMediaType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is a photo. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
 */
class inputPaidMediaTypePhoto final : public InputPaidMediaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Video of the live photo; pass null if the photo isn't a live photo.
  object_ptr<InputFile> video_;
  static jfieldID video_fieldID;

  /**
   * The media is a photo. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
   */
  inputPaidMediaTypePhoto();

  /**
   * The media is a photo. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
   *
   * \param[in] video_ Video of the live photo; pass null if the photo isn't a live photo.
   */
  explicit inputPaidMediaTypePhoto(object_ptr<InputFile> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 819520113;

  static object_ptr<InputPaidMediaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is a video.
 */
class inputPaidMediaTypeVideo final : public InputPaidMediaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Cover of the video; pass null to skip cover uploading.
  object_ptr<InputFile> cover_;
  static jfieldID cover_fieldID;
  /// Timestamp from which the video playing must start, in seconds.
  int32 start_timestamp_;
  static jfieldID start_timestamp_fieldID;
  /// Duration of the video, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// True, if the video is expected to be streamed.
  bool supports_streaming_;
  static jfieldID supports_streaming_fieldID;

  /**
   * The media is a video.
   */
  inputPaidMediaTypeVideo();

  /**
   * The media is a video.
   *
   * \param[in] cover_ Cover of the video; pass null to skip cover uploading.
   * \param[in] start_timestamp_ Timestamp from which the video playing must start, in seconds.
   * \param[in] duration_ Duration of the video, in seconds.
   * \param[in] supports_streaming_ True, if the video is expected to be streamed.
   */
  inputPaidMediaTypeVideo(object_ptr<InputFile> &&cover_, int32 start_timestamp_, int32 duration_, bool supports_streaming_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1793741625;

  static object_ptr<InputPaidMediaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class address;

class inputIdentityDocument;

class inputPersonalDocument;

class personalDetails;

/**
 * This class is an abstract base class.
 * Contains information about a Telegram Passport element to be saved.
 */
class InputPassportElement: public Object {
 public:
  static jclass Class;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's personal details.
 */
class inputPassportElementPersonalDetails final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Personal details of the user.
  object_ptr<personalDetails> personal_details_;
  static jfieldID personal_details_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's personal details.
   */
  inputPassportElementPersonalDetails();

  /**
   * A Telegram Passport element to be saved containing the user's personal details.
   *
   * \param[in] personal_details_ Personal details of the user.
   */
  explicit inputPassportElementPersonalDetails(object_ptr<personalDetails> &&personal_details_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 164791359;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's passport.
 */
class inputPassportElementPassport final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The passport to be saved.
  object_ptr<inputIdentityDocument> passport_;
  static jfieldID passport_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's passport.
   */
  inputPassportElementPassport();

  /**
   * A Telegram Passport element to be saved containing the user's passport.
   *
   * \param[in] passport_ The passport to be saved.
   */
  explicit inputPassportElementPassport(object_ptr<inputIdentityDocument> &&passport_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -497011356;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's driver license.
 */
class inputPassportElementDriverLicense final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The driver license to be saved.
  object_ptr<inputIdentityDocument> driver_license_;
  static jfieldID driver_license_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's driver license.
   */
  inputPassportElementDriverLicense();

  /**
   * A Telegram Passport element to be saved containing the user's driver license.
   *
   * \param[in] driver_license_ The driver license to be saved.
   */
  explicit inputPassportElementDriverLicense(object_ptr<inputIdentityDocument> &&driver_license_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 304813264;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's identity card.
 */
class inputPassportElementIdentityCard final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identity card to be saved.
  object_ptr<inputIdentityDocument> identity_card_;
  static jfieldID identity_card_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's identity card.
   */
  inputPassportElementIdentityCard();

  /**
   * A Telegram Passport element to be saved containing the user's identity card.
   *
   * \param[in] identity_card_ The identity card to be saved.
   */
  explicit inputPassportElementIdentityCard(object_ptr<inputIdentityDocument> &&identity_card_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -9963390;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's internal passport.
 */
class inputPassportElementInternalPassport final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The internal passport to be saved.
  object_ptr<inputIdentityDocument> internal_passport_;
  static jfieldID internal_passport_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's internal passport.
   */
  inputPassportElementInternalPassport();

  /**
   * A Telegram Passport element to be saved containing the user's internal passport.
   *
   * \param[in] internal_passport_ The internal passport to be saved.
   */
  explicit inputPassportElementInternalPassport(object_ptr<inputIdentityDocument> &&internal_passport_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 715360043;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's address.
 */
class inputPassportElementAddress final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The address to be saved.
  object_ptr<address> address_;
  static jfieldID address_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's address.
   */
  inputPassportElementAddress();

  /**
   * A Telegram Passport element to be saved containing the user's address.
   *
   * \param[in] address_ The address to be saved.
   */
  explicit inputPassportElementAddress(object_ptr<address> &&address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 461630480;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's utility bill.
 */
class inputPassportElementUtilityBill final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The utility bill to be saved.
  object_ptr<inputPersonalDocument> utility_bill_;
  static jfieldID utility_bill_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's utility bill.
   */
  inputPassportElementUtilityBill();

  /**
   * A Telegram Passport element to be saved containing the user's utility bill.
   *
   * \param[in] utility_bill_ The utility bill to be saved.
   */
  explicit inputPassportElementUtilityBill(object_ptr<inputPersonalDocument> &&utility_bill_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1389203841;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's bank statement.
 */
class inputPassportElementBankStatement final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The bank statement to be saved.
  object_ptr<inputPersonalDocument> bank_statement_;
  static jfieldID bank_statement_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's bank statement.
   */
  inputPassportElementBankStatement();

  /**
   * A Telegram Passport element to be saved containing the user's bank statement.
   *
   * \param[in] bank_statement_ The bank statement to be saved.
   */
  explicit inputPassportElementBankStatement(object_ptr<inputPersonalDocument> &&bank_statement_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -26585208;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's rental agreement.
 */
class inputPassportElementRentalAgreement final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The rental agreement to be saved.
  object_ptr<inputPersonalDocument> rental_agreement_;
  static jfieldID rental_agreement_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's rental agreement.
   */
  inputPassportElementRentalAgreement();

  /**
   * A Telegram Passport element to be saved containing the user's rental agreement.
   *
   * \param[in] rental_agreement_ The rental agreement to be saved.
   */
  explicit inputPassportElementRentalAgreement(object_ptr<inputPersonalDocument> &&rental_agreement_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1736154155;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's passport registration.
 */
class inputPassportElementPassportRegistration final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The passport registration page to be saved.
  object_ptr<inputPersonalDocument> passport_registration_;
  static jfieldID passport_registration_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's passport registration.
   */
  inputPassportElementPassportRegistration();

  /**
   * A Telegram Passport element to be saved containing the user's passport registration.
   *
   * \param[in] passport_registration_ The passport registration page to be saved.
   */
  explicit inputPassportElementPassportRegistration(object_ptr<inputPersonalDocument> &&passport_registration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1314562128;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's temporary registration.
 */
class inputPassportElementTemporaryRegistration final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The temporary registration document to be saved.
  object_ptr<inputPersonalDocument> temporary_registration_;
  static jfieldID temporary_registration_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's temporary registration.
   */
  inputPassportElementTemporaryRegistration();

  /**
   * A Telegram Passport element to be saved containing the user's temporary registration.
   *
   * \param[in] temporary_registration_ The temporary registration document to be saved.
   */
  explicit inputPassportElementTemporaryRegistration(object_ptr<inputPersonalDocument> &&temporary_registration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1913238047;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's phone number.
 */
class inputPassportElementPhoneNumber final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The phone number to be saved.
  string phone_number_;
  static jfieldID phone_number_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's phone number.
   */
  inputPassportElementPhoneNumber();

  /**
   * A Telegram Passport element to be saved containing the user's phone number.
   *
   * \param[in] phone_number_ The phone number to be saved.
   */
  explicit inputPassportElementPhoneNumber(string const &phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1319357497;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element to be saved containing the user's email address.
 */
class inputPassportElementEmailAddress final : public InputPassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The email address to be saved.
  string email_address_;
  static jfieldID email_address_fieldID;

  /**
   * A Telegram Passport element to be saved containing the user's email address.
   */
  inputPassportElementEmailAddress();

  /**
   * A Telegram Passport element to be saved containing the user's email address.
   *
   * \param[in] email_address_ The email address to be saved.
   */
  explicit inputPassportElementEmailAddress(string const &email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -248605659;

  static object_ptr<InputPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputPassportElementErrorSource;

class PassportElementType;

/**
 * Contains the description of an error in a Telegram Passport element; for bots only.
 */
class inputPassportElementError final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of Telegram Passport element that has the error.
  object_ptr<PassportElementType> type_;
  static jfieldID type_fieldID;
  /// Error message.
  string message_;
  static jfieldID message_fieldID;
  /// Error source.
  object_ptr<InputPassportElementErrorSource> source_;
  static jfieldID source_fieldID;

  /**
   * Contains the description of an error in a Telegram Passport element; for bots only.
   */
  inputPassportElementError();

  /**
   * Contains the description of an error in a Telegram Passport element; for bots only.
   *
   * \param[in] type_ Type of Telegram Passport element that has the error.
   * \param[in] message_ Error message.
   * \param[in] source_ Error source.
   */
  inputPassportElementError(object_ptr<PassportElementType> &&type_, string const &message_, object_ptr<InputPassportElementErrorSource> &&source_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 285756898;

  static object_ptr<inputPassportElementError> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains the description of an error in a Telegram Passport element; for bots only.
 */
class InputPassportElementErrorSource: public Object {
 public:
  static jclass Class;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The element contains an error in an unspecified place. The error will be considered resolved when new data is added.
 */
class inputPassportElementErrorSourceUnspecified final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hash of the entire element.
  bytes element_hash_;
  static jfieldID element_hash_fieldID;

  /**
   * The element contains an error in an unspecified place. The error will be considered resolved when new data is added.
   */
  inputPassportElementErrorSourceUnspecified();

  /**
   * The element contains an error in an unspecified place. The error will be considered resolved when new data is added.
   *
   * \param[in] element_hash_ Current hash of the entire element.
   */
  explicit inputPassportElementErrorSourceUnspecified(bytes const &element_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 267230319;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A data field contains an error. The error is considered resolved when the field's value changes.
 */
class inputPassportElementErrorSourceDataField final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Field name.
  string field_name_;
  static jfieldID field_name_fieldID;
  /// Current data hash.
  bytes data_hash_;
  static jfieldID data_hash_fieldID;

  /**
   * A data field contains an error. The error is considered resolved when the field's value changes.
   */
  inputPassportElementErrorSourceDataField();

  /**
   * A data field contains an error. The error is considered resolved when the field's value changes.
   *
   * \param[in] field_name_ Field name.
   * \param[in] data_hash_ Current data hash.
   */
  inputPassportElementErrorSourceDataField(string const &field_name_, bytes const &data_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -426795002;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes.
 */
class inputPassportElementErrorSourceFrontSide final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hash of the file containing the front side.
  bytes file_hash_;
  static jfieldID file_hash_fieldID;

  /**
   * The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes.
   */
  inputPassportElementErrorSourceFrontSide();

  /**
   * The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes.
   *
   * \param[in] file_hash_ Current hash of the file containing the front side.
   */
  explicit inputPassportElementErrorSourceFrontSide(bytes const &file_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 588023741;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes.
 */
class inputPassportElementErrorSourceReverseSide final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hash of the file containing the reverse side.
  bytes file_hash_;
  static jfieldID file_hash_fieldID;

  /**
   * The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes.
   */
  inputPassportElementErrorSourceReverseSide();

  /**
   * The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes.
   *
   * \param[in] file_hash_ Current hash of the file containing the reverse side.
   */
  explicit inputPassportElementErrorSourceReverseSide(bytes const &file_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 413072891;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The selfie contains an error. The error is considered resolved when the file with the selfie changes.
 */
class inputPassportElementErrorSourceSelfie final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hash of the file containing the selfie.
  bytes file_hash_;
  static jfieldID file_hash_fieldID;

  /**
   * The selfie contains an error. The error is considered resolved when the file with the selfie changes.
   */
  inputPassportElementErrorSourceSelfie();

  /**
   * The selfie contains an error. The error is considered resolved when the file with the selfie changes.
   *
   * \param[in] file_hash_ Current hash of the file containing the selfie.
   */
  explicit inputPassportElementErrorSourceSelfie(bytes const &file_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -773575528;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes.
 */
class inputPassportElementErrorSourceTranslationFile final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hash of the file containing the translation.
  bytes file_hash_;
  static jfieldID file_hash_fieldID;

  /**
   * One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes.
   */
  inputPassportElementErrorSourceTranslationFile();

  /**
   * One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes.
   *
   * \param[in] file_hash_ Current hash of the file containing the translation.
   */
  explicit inputPassportElementErrorSourceTranslationFile(bytes const &file_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 505842299;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The translation of the document contains an error. The error is considered resolved when the list of files changes.
 */
class inputPassportElementErrorSourceTranslationFiles final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hashes of all files with the translation.
  array<bytes> file_hashes_;
  static jfieldID file_hashes_fieldID;

  /**
   * The translation of the document contains an error. The error is considered resolved when the list of files changes.
   */
  inputPassportElementErrorSourceTranslationFiles();

  /**
   * The translation of the document contains an error. The error is considered resolved when the list of files changes.
   *
   * \param[in] file_hashes_ Current hashes of all files with the translation.
   */
  explicit inputPassportElementErrorSourceTranslationFiles(array<bytes> &&file_hashes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -527254048;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file contains an error. The error is considered resolved when the file changes.
 */
class inputPassportElementErrorSourceFile final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hash of the file which has the error.
  bytes file_hash_;
  static jfieldID file_hash_fieldID;

  /**
   * The file contains an error. The error is considered resolved when the file changes.
   */
  inputPassportElementErrorSourceFile();

  /**
   * The file contains an error. The error is considered resolved when the file changes.
   *
   * \param[in] file_hash_ Current hash of the file which has the error.
   */
  explicit inputPassportElementErrorSourceFile(bytes const &file_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -298492469;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of attached files contains an error. The error is considered resolved when the file list changes.
 */
class inputPassportElementErrorSourceFiles final : public InputPassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current hashes of all attached files.
  array<bytes> file_hashes_;
  static jfieldID file_hashes_fieldID;

  /**
   * The list of attached files contains an error. The error is considered resolved when the file list changes.
   */
  inputPassportElementErrorSourceFiles();

  /**
   * The list of attached files contains an error. The error is considered resolved when the file list changes.
   *
   * \param[in] file_hashes_ Current hashes of all attached files.
   */
  explicit inputPassportElementErrorSourceFiles(array<bytes> &&file_hashes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2008541640;

  static object_ptr<InputPassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

/**
 * A personal document to be saved to Telegram Passport.
 */
class inputPersonalDocument final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of files containing the pages of the document.
  array<object_ptr<InputFile>> files_;
  static jfieldID files_fieldID;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<InputFile>> translation_;
  static jfieldID translation_fieldID;

  /**
   * A personal document to be saved to Telegram Passport.
   */
  inputPersonalDocument();

  /**
   * A personal document to be saved to Telegram Passport.
   *
   * \param[in] files_ List of files containing the pages of the document.
   * \param[in] translation_ List of files containing a certified English translation of the document.
   */
  inputPersonalDocument(array<object_ptr<InputFile>> &&files_, array<object_ptr<InputFile>> &&translation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1676966826;

  static object_ptr<inputPersonalDocument> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class formattedText;

/**
 * Describes one answer option of a poll to be created.
 */
class inputPollOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Option text; 1-100 characters. Only custom emoji entities are allowed to be added and only by Premium users.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Option media; pass null if none; ignored in addPollOption. Must be one of the following types: inputMessageAnimation, non-live inputMessageLocation, inputMessagePhoto, inputMessageSticker, inputMessageVenue, or inputMessageVideo without caption.
  object_ptr<InputMessageContent> media_;
  static jfieldID media_fieldID;

  /**
   * Describes one answer option of a poll to be created.
   */
  inputPollOption();

  /**
   * Describes one answer option of a poll to be created.
   *
   * \param[in] text_ Option text; 1-100 characters. Only custom emoji entities are allowed to be added and only by Premium users.
   * \param[in] media_ Option media; pass null if none; ignored in addPollOption. Must be one of the following types: inputMessageAnimation, non-live inputMessageLocation, inputMessagePhoto, inputMessageSticker, inputMessageVenue, or inputMessageVideo without caption.
   */
  inputPollOption(object_ptr<formattedText> &&text_, object_ptr<InputMessageContent> &&media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -559227307;

  static object_ptr<inputPollOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class formattedText;

/**
 * This class is an abstract base class.
 * Describes the type of poll to send.
 */
class InputPollType: public Object {
 public:
  static jclass Class;

  static object_ptr<InputPollType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A regular poll.
 */
class inputPollTypeRegular final : public InputPollType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if answer options can be added to the poll after creation; not supported in channel chats and for anonymous polls.
  bool allow_adding_options_;
  static jfieldID allow_adding_options_fieldID;

  /**
   * A regular poll.
   */
  inputPollTypeRegular();

  /**
   * A regular poll.
   *
   * \param[in] allow_adding_options_ True, if answer options can be added to the poll after creation; not supported in channel chats and for anonymous polls.
   */
  explicit inputPollTypeRegular(bool allow_adding_options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -236313041;

  static object_ptr<InputPollType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A poll in quiz mode, which has predefined correct answers.
 */
class inputPollTypeQuiz final : public InputPollType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Increasing list of 0-based identifiers of the correct answer options; must be non-empty.
  array<int32> correct_option_ids_;
  static jfieldID correct_option_ids_fieldID;
  /// Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds.
  object_ptr<formattedText> explanation_;
  static jfieldID explanation_fieldID;
  /// Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; pass null if none. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, non-live inputMessageLocation, inputMessagePhoto, inputMessageVenue, or inputMessageVideo without caption.
  object_ptr<InputMessageContent> explanation_media_;
  static jfieldID explanation_media_fieldID;

  /**
   * A poll in quiz mode, which has predefined correct answers.
   */
  inputPollTypeQuiz();

  /**
   * A poll in quiz mode, which has predefined correct answers.
   *
   * \param[in] correct_option_ids_ Increasing list of 0-based identifiers of the correct answer options; must be non-empty.
   * \param[in] explanation_ Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds.
   * \param[in] explanation_media_ Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; pass null if none. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, non-live inputMessageLocation, inputMessagePhoto, inputMessageVenue, or inputMessageVideo without caption.
   */
  inputPollTypeQuiz(array<int32> &&correct_option_ids_, object_ptr<formattedText> &&explanation_, object_ptr<InputMessageContent> &&explanation_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 880659994;

  static object_ptr<InputPollType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class StickerFormat;

class maskPosition;

/**
 * A sticker to be added to a sticker set.
 */
class inputSticker final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File with the sticker; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. See https://core.telegram.org/animated_stickers\#technical-requirements for technical requirements.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;
  /// Format of the sticker.
  object_ptr<StickerFormat> format_;
  static jfieldID format_fieldID;
  /// String with 1-20 emoji corresponding to the sticker.
  string emojis_;
  static jfieldID emojis_fieldID;
  /// Position where the mask is placed; pass null if not specified.
  object_ptr<maskPosition> mask_position_;
  static jfieldID mask_position_fieldID;
  /// List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker.
  array<string> keywords_;
  static jfieldID keywords_fieldID;

  /**
   * A sticker to be added to a sticker set.
   */
  inputSticker();

  /**
   * A sticker to be added to a sticker set.
   *
   * \param[in] sticker_ File with the sticker; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. See https://core.telegram.org/animated_stickers\#technical-requirements for technical requirements.
   * \param[in] format_ Format of the sticker.
   * \param[in] emojis_ String with 1-20 emoji corresponding to the sticker.
   * \param[in] mask_position_ Position where the mask is placed; pass null if not specified.
   * \param[in] keywords_ List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker.
   */
  inputSticker(object_ptr<InputFile> &&sticker_, object_ptr<StickerFormat> &&format_, string const &emojis_, object_ptr<maskPosition> &&mask_position_, array<string> &&keywords_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1589392402;

  static object_ptr<inputSticker> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputStoryAreaType;

class storyAreaPosition;

/**
 * Describes a clickable rectangle area on a story media to be added.
 */
class inputStoryArea final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Position of the area.
  object_ptr<storyAreaPosition> position_;
  static jfieldID position_fieldID;
  /// Type of the area.
  object_ptr<InputStoryAreaType> type_;
  static jfieldID type_fieldID;

  /**
   * Describes a clickable rectangle area on a story media to be added.
   */
  inputStoryArea();

  /**
   * Describes a clickable rectangle area on a story media to be added.
   *
   * \param[in] position_ Position of the area.
   * \param[in] type_ Type of the area.
   */
  inputStoryArea(object_ptr<storyAreaPosition> &&position_, object_ptr<InputStoryAreaType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 122859135;

  static object_ptr<inputStoryArea> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class location;

class locationAddress;

/**
 * This class is an abstract base class.
 * Describes type of clickable area on a story media to be added.
 */
class InputStoryAreaType: public Object {
 public:
  static jclass Class;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a location.
 */
class inputStoryAreaTypeLocation final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Address of the location; pass null if unknown.
  object_ptr<locationAddress> address_;
  static jfieldID address_fieldID;

  /**
   * An area pointing to a location.
   */
  inputStoryAreaTypeLocation();

  /**
   * An area pointing to a location.
   *
   * \param[in] location_ The location.
   * \param[in] address_ Address of the location; pass null if unknown.
   */
  inputStoryAreaTypeLocation(object_ptr<location> &&location_, object_ptr<locationAddress> &&address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1433714887;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a venue found by the bot getOption(&quot;venue_search_bot_username&quot;).
 */
class inputStoryAreaTypeFoundVenue final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the inline query, used to found the venue.
  int64 query_id_;
  static jfieldID query_id_fieldID;
  /// Identifier of the inline query result.
  string result_id_;
  static jfieldID result_id_fieldID;

  /**
   * An area pointing to a venue found by the bot getOption(&quot;venue_search_bot_username&quot;).
   */
  inputStoryAreaTypeFoundVenue();

  /**
   * An area pointing to a venue found by the bot getOption(&quot;venue_search_bot_username&quot;).
   *
   * \param[in] query_id_ Identifier of the inline query, used to found the venue.
   * \param[in] result_id_ Identifier of the inline query result.
   */
  inputStoryAreaTypeFoundVenue(int64 query_id_, string const &result_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1395809130;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a venue already added to the story.
 */
class inputStoryAreaTypePreviousVenue final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Provider of the venue.
  string venue_provider_;
  static jfieldID venue_provider_fieldID;
  /// Identifier of the venue in the provider database.
  string venue_id_;
  static jfieldID venue_id_fieldID;

  /**
   * An area pointing to a venue already added to the story.
   */
  inputStoryAreaTypePreviousVenue();

  /**
   * An area pointing to a venue already added to the story.
   *
   * \param[in] venue_provider_ Provider of the venue.
   * \param[in] venue_id_ Identifier of the venue in the provider database.
   */
  inputStoryAreaTypePreviousVenue(string const &venue_provider_, string const &venue_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1846693388;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a suggested reaction.
 */
class inputStoryAreaTypeSuggestedReaction final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;
  /// True, if reaction has a dark background.
  bool is_dark_;
  static jfieldID is_dark_fieldID;
  /// True, if reaction corner is flipped.
  bool is_flipped_;
  static jfieldID is_flipped_fieldID;

  /**
   * An area pointing to a suggested reaction.
   */
  inputStoryAreaTypeSuggestedReaction();

  /**
   * An area pointing to a suggested reaction.
   *
   * \param[in] reaction_type_ Type of the reaction.
   * \param[in] is_dark_ True, if reaction has a dark background.
   * \param[in] is_flipped_ True, if reaction corner is flipped.
   */
  inputStoryAreaTypeSuggestedReaction(object_ptr<ReactionType> &&reaction_type_, bool is_dark_, bool is_flipped_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2101826003;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a message.
 */
class inputStoryAreaTypeMessage final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message. Currently, the chat must be a supergroup or a channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_be_shared_in_story to check whether the message is suitable.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * An area pointing to a message.
   */
  inputStoryAreaTypeMessage();

  /**
   * An area pointing to a message.
   *
   * \param[in] chat_id_ Identifier of the chat with the message. Currently, the chat must be a supergroup or a channel chat.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_be_shared_in_story to check whether the message is suitable.
   */
  inputStoryAreaTypeMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -266607529;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a HTTP or tg:// link.
 */
class inputStoryAreaTypeLink final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// HTTP or tg:// URL to be opened when the area is clicked.
  string url_;
  static jfieldID url_fieldID;

  /**
   * An area pointing to a HTTP or tg:// link.
   */
  inputStoryAreaTypeLink();

  /**
   * An area pointing to a HTTP or tg:// link.
   *
   * \param[in] url_ HTTP or tg:// URL to be opened when the area is clicked.
   */
  explicit inputStoryAreaTypeLink(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1408441160;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area with information about weather.
 */
class inputStoryAreaTypeWeather final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Temperature, in degree Celsius.
  double temperature_;
  static jfieldID temperature_fieldID;
  /// Emoji representing the weather.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// A color of the area background in the ARGB format.
  int32 background_color_;
  static jfieldID background_color_fieldID;

  /**
   * An area with information about weather.
   */
  inputStoryAreaTypeWeather();

  /**
   * An area with information about weather.
   *
   * \param[in] temperature_ Temperature, in degree Celsius.
   * \param[in] emoji_ Emoji representing the weather.
   * \param[in] background_color_ A color of the area background in the ARGB format.
   */
  inputStoryAreaTypeWeather(double temperature_, string const &emoji_, int32 background_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1212686691;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area with an upgraded gift.
 */
class inputStoryAreaTypeUpgradedGift final : public InputStoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique name of the upgraded gift.
  string gift_name_;
  static jfieldID gift_name_fieldID;

  /**
   * An area with an upgraded gift.
   */
  inputStoryAreaTypeUpgradedGift();

  /**
   * An area with an upgraded gift.
   *
   * \param[in] gift_name_ Unique name of the upgraded gift.
   */
  explicit inputStoryAreaTypeUpgradedGift(string const &gift_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 793059694;

  static object_ptr<InputStoryAreaType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class inputStoryArea;

/**
 * Contains a list of story areas to be added.
 */
class inputStoryAreas final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of input story areas. Currently, a story can have up to 10 inputStoryAreaTypeLocation, inputStoryAreaTypeFoundVenue, and inputStoryAreaTypePreviousVenue areas, up to getOption(&quot;story_suggested_reaction_area_count_max&quot;) inputStoryAreaTypeSuggestedReaction areas, up to 1 inputStoryAreaTypeMessage area, up to getOption(&quot;story_link_area_count_max&quot;) inputStoryAreaTypeLink areas if the current user is a Telegram Premium user, up to 3 inputStoryAreaTypeWeather areas, and up to 1 inputStoryAreaTypeUpgradedGift area.
  array<object_ptr<inputStoryArea>> areas_;
  static jfieldID areas_fieldID;

  /**
   * Contains a list of story areas to be added.
   */
  inputStoryAreas();

  /**
   * Contains a list of story areas to be added.
   *
   * \param[in] areas_ List of input story areas. Currently, a story can have up to 10 inputStoryAreaTypeLocation, inputStoryAreaTypeFoundVenue, and inputStoryAreaTypePreviousVenue areas, up to getOption(&quot;story_suggested_reaction_area_count_max&quot;) inputStoryAreaTypeSuggestedReaction areas, up to 1 inputStoryAreaTypeMessage area, up to getOption(&quot;story_link_area_count_max&quot;) inputStoryAreaTypeLink areas if the current user is a Telegram Premium user, up to 3 inputStoryAreaTypeWeather areas, and up to 1 inputStoryAreaTypeUpgradedGift area.
   */
  explicit inputStoryAreas(array<object_ptr<inputStoryArea>> &&areas_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -883247088;

  static object_ptr<inputStoryAreas> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

/**
 * This class is an abstract base class.
 * The content of a story to post.
 */
class InputStoryContent: public Object {
 public:
  static jclass Class;

  static object_ptr<InputStoryContent> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo story.
 */
class inputStoryContentPhoto final : public InputStoryContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo to send. The photo must be at most 10 MB in size. The photo size must be 1080x1920.
  object_ptr<InputFile> photo_;
  static jfieldID photo_fieldID;
  /// File identifiers of the stickers added to the photo, if applicable.
  array<int32> added_sticker_file_ids_;
  static jfieldID added_sticker_file_ids_fieldID;

  /**
   * A photo story.
   */
  inputStoryContentPhoto();

  /**
   * A photo story.
   *
   * \param[in] photo_ Photo to send. The photo must be at most 10 MB in size. The photo size must be 1080x1920.
   * \param[in] added_sticker_file_ids_ File identifiers of the stickers added to the photo, if applicable.
   */
  inputStoryContentPhoto(object_ptr<InputFile> &&photo_, array<int32> &&added_sticker_file_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -309196727;

  static object_ptr<InputStoryContent> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video story.
 */
class inputStoryContentVideo final : public InputStoryContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Video to be sent. The video size must be 720x1280. The video must be streamable and stored in MPEG4 format, after encoding with H.265 codec and key frames added each second.
  object_ptr<InputFile> video_;
  static jfieldID video_fieldID;
  /// File identifiers of the stickers added to the video, if applicable.
  array<int32> added_sticker_file_ids_;
  static jfieldID added_sticker_file_ids_fieldID;
  /// Precise duration of the video, in seconds; 0-60.
  double duration_;
  static jfieldID duration_fieldID;
  /// Timestamp of the frame, which will be used as video thumbnail.
  double cover_frame_timestamp_;
  static jfieldID cover_frame_timestamp_fieldID;
  /// True, if the video has no sound.
  bool is_animation_;
  static jfieldID is_animation_fieldID;

  /**
   * A video story.
   */
  inputStoryContentVideo();

  /**
   * A video story.
   *
   * \param[in] video_ Video to be sent. The video size must be 720x1280. The video must be streamable and stored in MPEG4 format, after encoding with H.265 codec and key frames added each second.
   * \param[in] added_sticker_file_ids_ File identifiers of the stickers added to the video, if applicable.
   * \param[in] duration_ Precise duration of the video, in seconds; 0-60.
   * \param[in] cover_frame_timestamp_ Timestamp of the frame, which will be used as video thumbnail.
   * \param[in] is_animation_ True, if the video has no sound.
   */
  inputStoryContentVideo(object_ptr<InputFile> &&video_, array<int32> &&added_sticker_file_ids_, double duration_, double cover_frame_timestamp_, bool is_animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 3809243;

  static object_ptr<InputStoryContent> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SuggestedPostPrice;

/**
 * Contains information about a post to suggest.
 */
class inputSuggestedPostInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Price of the suggested post; pass null to suggest a post without payment. If the current user isn't an administrator of the channel direct messages chat and has no enough funds to pay for the post, then the error &quot;BALANCE_TOO_LOW&quot; will be returned immediately.
  object_ptr<SuggestedPostPrice> price_;
  static jfieldID price_fieldID;
  /// Point in time (Unix timestamp) when the post is expected to be published; pass 0 if the date isn't restricted. If specified, then the date must be getOption(&quot;suggested_post_send_delay_min&quot;)-getOption(&quot;suggested_post_send_delay_max&quot;) seconds in the future.
  int32 send_date_;
  static jfieldID send_date_fieldID;

  /**
   * Contains information about a post to suggest.
   */
  inputSuggestedPostInfo();

  /**
   * Contains information about a post to suggest.
   *
   * \param[in] price_ Price of the suggested post; pass null to suggest a post without payment. If the current user isn't an administrator of the channel direct messages chat and has no enough funds to pay for the post, then the error &quot;BALANCE_TOO_LOW&quot; will be returned immediately.
   * \param[in] send_date_ Point in time (Unix timestamp) when the post is expected to be published; pass 0 if the date isn't restricted. If specified, then the date must be getOption(&quot;suggested_post_send_delay_min&quot;)-getOption(&quot;suggested_post_send_delay_max&quot;) seconds in the future.
   */
  inputSuggestedPostInfo(object_ptr<SuggestedPostPrice> &&price_, int32 send_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1246794382;

  static object_ptr<inputSuggestedPostInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes manually chosen quote from another message.
 */
class inputTextQuote final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the quote; 0-getOption(&quot;message_reply_quote_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed to be kept and must be kept in the quote.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Quote position in the original message in UTF-16 code units.
  int32 position_;
  static jfieldID position_fieldID;

  /**
   * Describes manually chosen quote from another message.
   */
  inputTextQuote();

  /**
   * Describes manually chosen quote from another message.
   *
   * \param[in] text_ Text of the quote; 0-getOption(&quot;message_reply_quote_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed to be kept and must be kept in the quote.
   * \param[in] position_ Quote position in the original message in UTF-16 code units.
   */
  inputTextQuote(object_ptr<formattedText> &&text_, int32 position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1219859172;

  static object_ptr<inputTextQuote> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

/**
 * A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size.
 */
class inputThumbnail final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Thumbnail file to send. Sending thumbnails by file_id is currently not supported.
  object_ptr<InputFile> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown.
  int32 width_;
  static jfieldID width_fieldID;
  /// Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown.
  int32 height_;
  static jfieldID height_fieldID;

  /**
   * A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size.
   */
  inputThumbnail();

  /**
   * A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size.
   *
   * \param[in] thumbnail_ Thumbnail file to send. Sending thumbnails by file_id is currently not supported.
   * \param[in] width_ Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown.
   * \param[in] height_ Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown.
   */
  inputThumbnail(object_ptr<InputFile> &&thumbnail_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1582387236;

  static object_ptr<inputThumbnail> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SettingsSection;

class StoryContentType;

class TargetChat;

class WebAppOpenMode;

class chatAdministratorRights;

class formattedText;

class proxy;

/**
 * This class is an abstract base class.
 * Describes an internal https://t.me or tg: link, which must be processed by the application in a special way.
 */
class InternalLinkType: public Object {
 public:
  static jclass Class;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.
 */
class internalLinkTypeAttachmentMenuBot final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Target chat to be opened.
  object_ptr<TargetChat> target_chat_;
  static jfieldID target_chat_fieldID;
  /// Username of the bot.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// URL to be passed to openWebApp.
  string url_;
  static jfieldID url_fieldID;

  /**
   * The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.
   */
  internalLinkTypeAttachmentMenuBot();

  /**
   * The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL.
   *
   * \param[in] target_chat_ Target chat to be opened.
   * \param[in] bot_username_ Username of the bot.
   * \param[in] url_ URL to be passed to openWebApp.
   */
  internalLinkTypeAttachmentMenuBot(object_ptr<TargetChat> &&target_chat_, string const &bot_username_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1682719269;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode.
 */
class internalLinkTypeAuthenticationCode final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The authentication code.
  string code_;
  static jfieldID code_fieldID;

  /**
   * The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode.
   */
  internalLinkTypeAuthenticationCode();

  /**
   * The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode.
   *
   * \param[in] code_ The authentication code.
   */
  explicit internalLinkTypeAuthenticationCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -209235982;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a background. Call searchBackground with the given background name to process the link. If background is found and the user wants to apply it, then call setDefaultBackground.
 */
class internalLinkTypeBackground final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the background.
  string background_name_;
  static jfieldID background_name_fieldID;

  /**
   * The link is a link to a background. Call searchBackground with the given background name to process the link. If background is found and the user wants to apply it, then call setDefaultBackground.
   */
  internalLinkTypeBackground();

  /**
   * The link is a link to a background. Call searchBackground with the given background name to process the link. If background is found and the user wants to apply it, then call setDefaultBackground.
   *
   * \param[in] background_name_ Name of the background.
   */
  explicit internalLinkTypeBackground(string const &background_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 185411848;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights.
 */
class internalLinkTypeBotAddToChannel final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// Expected administrator rights for the bot.
  object_ptr<chatAdministratorRights> administrator_rights_;
  static jfieldID administrator_rights_fieldID;

  /**
   * The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights.
   */
  internalLinkTypeBotAddToChannel();

  /**
   * The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights.
   *
   * \param[in] bot_username_ Username of the bot.
   * \param[in] administrator_rights_ Expected administrator rights for the bot.
   */
  internalLinkTypeBotAddToChannel(string const &bot_username_, object_ptr<chatAdministratorRights> &&administrator_rights_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1401602752;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, and then call sendBotStartMessage with the given start parameter after the button is pressed.
 */
class internalLinkTypeBotStart final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// The parameter to be passed to sendBotStartMessage.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// True, if sendBotStartMessage must be called automatically without showing the START button.
  bool autostart_;
  static jfieldID autostart_fieldID;

  /**
   * The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, and then call sendBotStartMessage with the given start parameter after the button is pressed.
   */
  internalLinkTypeBotStart();

  /**
   * The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, and then call sendBotStartMessage with the given start parameter after the button is pressed.
   *
   * \param[in] bot_username_ Username of the bot.
   * \param[in] start_parameter_ The parameter to be passed to sendBotStartMessage.
   * \param[in] autostart_ True, if sendBotStartMessage must be called automatically without showing the START button.
   */
  internalLinkTypeBotStart(string const &bot_username_, string const &start_parameter_, bool autostart_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1066950637;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a Telegram bot, which is expected to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.
 */
class internalLinkTypeBotStartInGroup final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// The parameter to be passed to sendBotStartMessage.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// Expected administrator rights for the bot; may be null.
  object_ptr<chatAdministratorRights> administrator_rights_;
  static jfieldID administrator_rights_fieldID;

  /**
   * The link is a link to a Telegram bot, which is expected to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.
   */
  internalLinkTypeBotStartInGroup();

  /**
   * The link is a link to a Telegram bot, which is expected to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.
   *
   * \param[in] bot_username_ Username of the bot.
   * \param[in] start_parameter_ The parameter to be passed to sendBotStartMessage.
   * \param[in] administrator_rights_ Expected administrator rights for the bot; may be null.
   */
  internalLinkTypeBotStartInGroup(string const &bot_username_, string const &start_parameter_, object_ptr<chatAdministratorRights> &&administrator_rights_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -905081650;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a business chat. Use getBusinessChatLinkInfo with the provided link name to get information about the link, then open received private chat and replace chat draft with the provided text.
 */
class internalLinkTypeBusinessChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the link.
  string link_name_;
  static jfieldID link_name_fieldID;

  /**
   * The link is a link to a business chat. Use getBusinessChatLinkInfo with the provided link name to get information about the link, then open received private chat and replace chat draft with the provided text.
   */
  internalLinkTypeBusinessChat();

  /**
   * The link is a link to a business chat. Use getBusinessChatLinkInfo with the provided link name to get information about the link, then open received private chat and replace chat draft with the provided text.
   *
   * \param[in] link_name_ Name of the link.
   */
  explicit internalLinkTypeBusinessChat(string const &link_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1606751785;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the Call tab or page.
 */
class internalLinkTypeCallsPage final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Section of the page; may be one of &quot;&quot;, &quot;all&quot;, &quot;missed&quot;, &quot;edit&quot;, &quot;show-tab&quot;, &quot;start-call&quot;.
  string section_;
  static jfieldID section_fieldID;

  /**
   * The link is a link to the Call tab or page.
   */
  internalLinkTypeCallsPage();

  /**
   * The link is a link to the Call tab or page.
   *
   * \param[in] section_ Section of the page; may be one of &quot;&quot;, &quot;all&quot;, &quot;missed&quot;, &quot;edit&quot;, &quot;show-tab&quot;, &quot;start-call&quot;.
   */
  explicit internalLinkTypeCallsPage(string const &section_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -718405184;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an affiliate program link. Call searchChatAffiliateProgram with the given username and referrer to process the link.
 */
class internalLinkTypeChatAffiliateProgram final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username to be passed to searchChatAffiliateProgram.
  string username_;
  static jfieldID username_fieldID;
  /// Referrer to be passed to searchChatAffiliateProgram.
  string referrer_;
  static jfieldID referrer_fieldID;

  /**
   * The link is an affiliate program link. Call searchChatAffiliateProgram with the given username and referrer to process the link.
   */
  internalLinkTypeChatAffiliateProgram();

  /**
   * The link is an affiliate program link. Call searchChatAffiliateProgram with the given username and referrer to process the link.
   *
   * \param[in] username_ Username to be passed to searchChatAffiliateProgram.
   * \param[in] referrer_ Referrer to be passed to searchChatAffiliateProgram.
   */
  internalLinkTypeChatAffiliateProgram(string const &username_, string const &referrer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 632049700;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to boost a Telegram chat. Call getChatBoostLinkInfo with the given URL to process the link. If the chat is found, then call getChatBoostStatus and getAvailableChatBoostSlots to get the current boost status and check whether the chat can be boosted. If the user wants to boost the chat and the chat can be boosted, then call boostChat.
 */
class internalLinkTypeChatBoost final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL to be passed to getChatBoostLinkInfo.
  string url_;
  static jfieldID url_fieldID;

  /**
   * The link is a link to boost a Telegram chat. Call getChatBoostLinkInfo with the given URL to process the link. If the chat is found, then call getChatBoostStatus and getAvailableChatBoostSlots to get the current boost status and check whether the chat can be boosted. If the user wants to boost the chat and the chat can be boosted, then call boostChat.
   */
  internalLinkTypeChatBoost();

  /**
   * The link is a link to boost a Telegram chat. Call getChatBoostLinkInfo with the given URL to process the link. If the chat is found, then call getChatBoostStatus and getAvailableChatBoostSlots to get the current boost status and check whether the chat can be boosted. If the user wants to boost the chat and the chat can be boosted, then call boostChat.
   *
   * \param[in] url_ URL to be passed to getChatBoostLinkInfo.
   */
  explicit internalLinkTypeChatBoost(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -716571328;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat folder, then call addChatFolderByInviteLink.
 */
class internalLinkTypeChatFolderInvite final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Internal representation of the invite link.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat folder, then call addChatFolderByInviteLink.
   */
  internalLinkTypeChatFolderInvite();

  /**
   * The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat folder, then call addChatFolderByInviteLink.
   *
   * \param[in] invite_link_ Internal representation of the invite link.
   */
  explicit internalLinkTypeChatFolderInvite(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1984804546;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat, then call joinChatByInviteLink.
 */
class internalLinkTypeChatInvite final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Internal representation of the invite link.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat, then call joinChatByInviteLink.
   */
  internalLinkTypeChatInvite();

  /**
   * The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat, then call joinChatByInviteLink.
   *
   * \param[in] invite_link_ Internal representation of the invite link.
   */
  explicit internalLinkTypeChatInvite(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 428621017;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link that allows to select some chats.
 */
class internalLinkTypeChatSelection final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link that allows to select some chats.
   */
  internalLinkTypeChatSelection();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 621470813;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the Contacts tab or page.
 */
class internalLinkTypeContactsPage final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Section of the page; may be one of &quot;&quot;, &quot;search&quot;, &quot;sort&quot;, &quot;new&quot;, &quot;invite&quot;, &quot;manage&quot;.
  string section_;
  static jfieldID section_fieldID;

  /**
   * The link is a link to the Contacts tab or page.
   */
  internalLinkTypeContactsPage();

  /**
   * The link is a link to the Contacts tab or page.
   *
   * \param[in] section_ Section of the page; may be one of &quot;&quot;, &quot;search&quot;, &quot;sort&quot;, &quot;new&quot;, &quot;invite&quot;, &quot;manage&quot;.
   */
  explicit internalLinkTypeContactsPage(string const &section_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 412195917;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a channel direct messages chat by username of the channel. Call searchPublicChat with the given chat username to process the link. If the chat is found and is channel, open the direct messages chat of the channel.
 */
class internalLinkTypeDirectMessagesChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the channel.
  string channel_username_;
  static jfieldID channel_username_fieldID;

  /**
   * The link is a link to a channel direct messages chat by username of the channel. Call searchPublicChat with the given chat username to process the link. If the chat is found and is channel, open the direct messages chat of the channel.
   */
  internalLinkTypeDirectMessagesChat();

  /**
   * The link is a link to a channel direct messages chat by username of the channel. Call searchPublicChat with the given chat username to process the link. If the chat is found and is channel, open the direct messages chat of the channel.
   *
   * \param[in] channel_username_ Username of the channel.
   */
  explicit internalLinkTypeDirectMessagesChat(string const &channel_username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1795016752;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame.
 */
class internalLinkTypeGame final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot that owns the game.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// Short name of the game.
  string game_short_name_;
  static jfieldID game_short_name_fieldID;

  /**
   * The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame.
   */
  internalLinkTypeGame();

  /**
   * The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame.
   *
   * \param[in] bot_username_ Username of the bot that owns the game.
   * \param[in] game_short_name_ Short name of the game.
   */
  internalLinkTypeGame(string const &bot_username_, string const &game_short_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -260788787;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a gift auction. Call getGiftAuctionState with the given auction identifier to process the link.
 */
class internalLinkTypeGiftAuction final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the auction.
  string auction_id_;
  static jfieldID auction_id_fieldID;

  /**
   * The link is a link to a gift auction. Call getGiftAuctionState with the given auction identifier to process the link.
   */
  internalLinkTypeGiftAuction();

  /**
   * The link is a link to a gift auction. Call getGiftAuctionState with the given auction identifier to process the link.
   *
   * \param[in] auction_id_ Unique identifier of the auction.
   */
  explicit internalLinkTypeGiftAuction(string const &auction_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1724902818;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a gift collection. Call searchPublicChat with the given username, then call getReceivedGifts with the received gift owner identifier and the given collection identifier, then show the collection if received.
 */
class internalLinkTypeGiftCollection final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the owner of the gift collection.
  string gift_owner_username_;
  static jfieldID gift_owner_username_fieldID;
  /// Gift collection identifier.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;

  /**
   * The link is a link to a gift collection. Call searchPublicChat with the given username, then call getReceivedGifts with the received gift owner identifier and the given collection identifier, then show the collection if received.
   */
  internalLinkTypeGiftCollection();

  /**
   * The link is a link to a gift collection. Call searchPublicChat with the given username, then call getReceivedGifts with the received gift owner identifier and the given collection identifier, then show the collection if received.
   *
   * \param[in] gift_owner_username_ Username of the owner of the gift collection.
   * \param[in] collection_id_ Gift collection identifier.
   */
  internalLinkTypeGiftCollection(string const &gift_owner_username_, int32 collection_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -812480347;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a group call that isn't bound to a chat. Use getGroupCallParticipants to get the list of group call participants and show them on the join group call screen. Call joinGroupCall with the given invite_link to join the call.
 */
class internalLinkTypeGroupCall final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Internal representation of the invite link.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * The link is a link to a group call that isn't bound to a chat. Use getGroupCallParticipants to get the list of group call participants and show them on the join group call screen. Call joinGroupCall with the given invite_link to join the call.
   */
  internalLinkTypeGroupCall();

  /**
   * The link is a link to a group call that isn't bound to a chat. Use getGroupCallParticipants to get the list of group call participants and show them on the join group call screen. Call joinGroupCall with the given invite_link to join the call.
   *
   * \param[in] invite_link_ Internal representation of the invite link.
   */
  explicit internalLinkTypeGroupCall(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1953084438;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link. If Instant View is found, then show it, otherwise, open the fallback URL in an external browser.
 */
class internalLinkTypeInstantView final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL to be passed to getWebPageInstantView.
  string url_;
  static jfieldID url_fieldID;
  /// An URL to open if getWebPageInstantView fails.
  string fallback_url_;
  static jfieldID fallback_url_fieldID;

  /**
   * The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link. If Instant View is found, then show it, otherwise, open the fallback URL in an external browser.
   */
  internalLinkTypeInstantView();

  /**
   * The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link. If Instant View is found, then show it, otherwise, open the fallback URL in an external browser.
   *
   * \param[in] url_ URL to be passed to getWebPageInstantView.
   * \param[in] fallback_url_ An URL to open if getWebPageInstantView fails.
   */
  internalLinkTypeInstantView(string const &url_, string const &fallback_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1776607039;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link.
 */
class internalLinkTypeInvoice final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the invoice.
  string invoice_name_;
  static jfieldID invoice_name_fieldID;

  /**
   * The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link.
   */
  internalLinkTypeInvoice();

  /**
   * The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link.
   *
   * \param[in] invoice_name_ Name of the invoice.
   */
  explicit internalLinkTypeInvoice(string const &invoice_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -213094996;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link. If the language pack is found and the user wants to apply it, then call setOption for the option &quot;language_pack_id&quot;.
 */
class internalLinkTypeLanguagePack final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Language pack identifier.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;

  /**
   * The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link. If the language pack is found and the user wants to apply it, then call setOption for the option &quot;language_pack_id&quot;.
   */
  internalLinkTypeLanguagePack();

  /**
   * The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link. If the language pack is found and the user wants to apply it, then call setOption for the option &quot;language_pack_id&quot;.
   *
   * \param[in] language_pack_id_ Language pack identifier.
   */
  explicit internalLinkTypeLanguagePack(string const &language_pack_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1450766996;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a live story. Call searchPublicChat with the given chat username, then getChatActiveStories to get active stories in the chat, then find a live story among active stories of the chat, and then joinLiveStory to join the live story.
 */
class internalLinkTypeLiveStory final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the poster of the story.
  string story_poster_username_;
  static jfieldID story_poster_username_fieldID;

  /**
   * The link is a link to a live story. Call searchPublicChat with the given chat username, then getChatActiveStories to get active stories in the chat, then find a live story among active stories of the chat, and then joinLiveStory to join the live story.
   */
  internalLinkTypeLiveStory();

  /**
   * The link is a link to a live story. Call searchPublicChat with the given chat username, then getChatActiveStories to get active stories in the chat, then find a live story among active stories of the chat, and then joinLiveStory to join the live story.
   *
   * \param[in] story_poster_username_ Username of the poster of the story.
   */
  explicit internalLinkTypeLiveStory(string const &story_poster_username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 665614717;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App.
 */
class internalLinkTypeMainWebApp final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// Start parameter to be passed to getMainWebApp.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// The mode to be passed to getMainWebApp.
  object_ptr<WebAppOpenMode> mode_;
  static jfieldID mode_fieldID;

  /**
   * The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App.
   */
  internalLinkTypeMainWebApp();

  /**
   * The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App.
   *
   * \param[in] bot_username_ Username of the bot.
   * \param[in] start_parameter_ Start parameter to be passed to getMainWebApp.
   * \param[in] mode_ The mode to be passed to getMainWebApp.
   */
  internalLinkTypeMainWebApp(string const &bot_username_, string const &start_parameter_, object_ptr<WebAppOpenMode> &&mode_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1574925033;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a Telegram message or a forum topic. Call getMessageLinkInfo with the given URL to process the link, and then open received forum topic or chat and show the message there.
 */
class internalLinkTypeMessage final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL to be passed to getMessageLinkInfo.
  string url_;
  static jfieldID url_fieldID;

  /**
   * The link is a link to a Telegram message or a forum topic. Call getMessageLinkInfo with the given URL to process the link, and then open received forum topic or chat and show the message there.
   */
  internalLinkTypeMessage();

  /**
   * The link is a link to a Telegram message or a forum topic. Call getMessageLinkInfo with the given URL to process the link, and then open received forum topic or chat and show the message there.
   *
   * \param[in] url_ URL to be passed to getMessageLinkInfo.
   */
  explicit internalLinkTypeMessage(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 978541650;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field.
 */
class internalLinkTypeMessageDraft final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message draft text.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected.
  bool contains_link_;
  static jfieldID contains_link_fieldID;

  /**
   * The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field.
   */
  internalLinkTypeMessageDraft();

  /**
   * The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field.
   *
   * \param[in] text_ Message draft text.
   * \param[in] contains_link_ True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected.
   */
  internalLinkTypeMessageDraft(object_ptr<formattedText> &&text_, bool contains_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 661633749;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the My Profile application page.
 */
class internalLinkTypeMyProfilePage final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Section of the page; may be one of &quot;&quot;, &quot;posts&quot;, &quot;posts/all-stories&quot;, &quot;posts/add-album&quot;, &quot;gifts&quot;, &quot;archived-posts&quot;.
  string section_;
  static jfieldID section_fieldID;

  /**
   * The link is a link to the My Profile application page.
   */
  internalLinkTypeMyProfilePage();

  /**
   * The link is a link to the My Profile application page.
   *
   * \param[in] section_ Section of the page; may be one of &quot;&quot;, &quot;posts&quot;, &quot;posts/all-stories&quot;, &quot;posts/add-album&quot;, &quot;gifts&quot;, &quot;archived-posts&quot;.
   */
  explicit internalLinkTypeMyProfilePage(string const &section_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1204697133;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the screen for creating a new channel chat.
 */
class internalLinkTypeNewChannelChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to the screen for creating a new channel chat.
   */
  internalLinkTypeNewChannelChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -660273891;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the screen for creating a new group chat.
 */
class internalLinkTypeNewGroupChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to the screen for creating a new group chat.
   */
  internalLinkTypeNewGroupChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -353196057;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the screen for creating a new private chat with a contact.
 */
class internalLinkTypeNewPrivateChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to the screen for creating a new private chat with a contact.
   */
  internalLinkTypeNewPrivateChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1326134340;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to open the story posting interface.
 */
class internalLinkTypeNewStory final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The type of the content of the story to post; may be null if unspecified.
  object_ptr<StoryContentType> content_type_;
  static jfieldID content_type_fieldID;

  /**
   * The link is a link to open the story posting interface.
   */
  internalLinkTypeNewStory();

  /**
   * The link is a link to open the story posting interface.
   *
   * \param[in] content_type_ The type of the content of the story to post; may be null if unspecified.
   */
  explicit internalLinkTypeNewStory(object_ptr<StoryContentType> &&content_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1637792663;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an OAuth link. Call getOauthLinkInfo with the given URL to process the link if the link was received from outside of the application; otherwise, ignore it. After getOauthLinkInfo, show the user confirmation dialog and process it with checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest.
 */
class internalLinkTypeOauth final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL to be passed to getOauthLinkInfo.
  string url_;
  static jfieldID url_fieldID;

  /**
   * The link is an OAuth link. Call getOauthLinkInfo with the given URL to process the link if the link was received from outside of the application; otherwise, ignore it. After getOauthLinkInfo, show the user confirmation dialog and process it with checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest.
   */
  internalLinkTypeOauth();

  /**
   * The link is an OAuth link. Call getOauthLinkInfo with the given URL to process the link if the link was received from outside of the application; otherwise, ignore it. After getOauthLinkInfo, show the user confirmation dialog and process it with checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest.
   *
   * \param[in] url_ URL to be passed to getOauthLinkInfo.
   */
  explicit internalLinkTypeOauth(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 263255628;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it.
 */
class internalLinkTypePassportDataRequest final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the service's bot; the corresponding user may be unknown yet.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Telegram Passport element types requested by the service.
  string scope_;
  static jfieldID scope_fieldID;
  /// Service's public key.
  string public_key_;
  static jfieldID public_key_fieldID;
  /// Unique request identifier provided by the service.
  string nonce_;
  static jfieldID nonce_fieldID;
  /// An HTTP URL to open once the request is finished, canceled, or failed with the parameters tg_passport=success, tg_passport=cancel, or tg_passport=error&amp;error=... respectively. If empty, then onActivityResult method must be used to return response on Android, or the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel must be opened otherwise.
  string callback_url_;
  static jfieldID callback_url_fieldID;

  /**
   * The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it.
   */
  internalLinkTypePassportDataRequest();

  /**
   * The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it.
   *
   * \param[in] bot_user_id_ User identifier of the service's bot; the corresponding user may be unknown yet.
   * \param[in] scope_ Telegram Passport element types requested by the service.
   * \param[in] public_key_ Service's public key.
   * \param[in] nonce_ Unique request identifier provided by the service.
   * \param[in] callback_url_ An HTTP URL to open once the request is finished, canceled, or failed with the parameters tg_passport=success, tg_passport=cancel, or tg_passport=error&amp;error=... respectively. If empty, then onActivityResult method must be used to return response on Android, or the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel must be opened otherwise.
   */
  internalLinkTypePassportDataRequest(int53 bot_user_id_, string const &scope_, string const &public_key_, string const &nonce_, string const &callback_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -988819839;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberCode with the given phone number and with phoneNumberCodeTypeConfirmOwnership with the given hash to process the link. If succeeded, call checkPhoneNumberCode to check entered by the user code, or resendPhoneNumberCode to resend it.
 */
class internalLinkTypePhoneNumberConfirmation final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hash value from the link.
  string hash_;
  static jfieldID hash_fieldID;
  /// Phone number value from the link.
  string phone_number_;
  static jfieldID phone_number_fieldID;

  /**
   * The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberCode with the given phone number and with phoneNumberCodeTypeConfirmOwnership with the given hash to process the link. If succeeded, call checkPhoneNumberCode to check entered by the user code, or resendPhoneNumberCode to resend it.
   */
  internalLinkTypePhoneNumberConfirmation();

  /**
   * The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberCode with the given phone number and with phoneNumberCodeTypeConfirmOwnership with the given hash to process the link. If succeeded, call checkPhoneNumberCode to check entered by the user code, or resendPhoneNumberCode to resend it.
   *
   * \param[in] hash_ Hash value from the link.
   * \param[in] phone_number_ Phone number value from the link.
   */
  internalLinkTypePhoneNumberConfirmation(string const &hash_, string const &phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1757375254;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link.
 */
class internalLinkTypePremiumFeaturesPage final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Referrer specified in the link.
  string referrer_;
  static jfieldID referrer_fieldID;

  /**
   * The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link.
   */
  internalLinkTypePremiumFeaturesPage();

  /**
   * The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link.
   *
   * \param[in] referrer_ Referrer specified in the link.
   */
  explicit internalLinkTypePremiumFeaturesPage(string const &referrer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -626346401;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode.
 */
class internalLinkTypePremiumGiftCode final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The Telegram Premium gift code.
  string code_;
  static jfieldID code_fieldID;

  /**
   * The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode.
   */
  internalLinkTypePremiumGiftCode();

  /**
   * The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode.
   *
   * \param[in] code_ The Telegram Premium gift code.
   */
  explicit internalLinkTypePremiumGiftCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -564356974;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGift payments or in-store purchases.
 */
class internalLinkTypePremiumGiftPurchase final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Referrer specified in the link.
  string referrer_;
  static jfieldID referrer_fieldID;

  /**
   * The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGift payments or in-store purchases.
   */
  internalLinkTypePremiumGiftPurchase();

  /**
   * The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGift payments or in-store purchases.
   *
   * \param[in] referrer_ Referrer specified in the link.
   */
  explicit internalLinkTypePremiumGiftPurchase(string const &referrer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -947456567;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy.
 */
class internalLinkTypeProxy final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The proxy; may be null if the proxy is unsupported, in which case an alert can be shown to the user.
  object_ptr<proxy> proxy_;
  static jfieldID proxy_fieldID;

  /**
   * The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy.
   */
  internalLinkTypeProxy();

  /**
   * The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy.
   *
   * \param[in] proxy_ The proxy; may be null if the proxy is unsupported, in which case an alert can be shown to the user.
   */
  explicit internalLinkTypeProxy(object_ptr<proxy> &&proxy_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1592321116;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link. If the chat is found, open its profile information screen or the chat itself. If draft text isn't empty and the chat is a private chat with a regular user, then put the draft text in the input field.
 */
class internalLinkTypePublicChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the chat.
  string chat_username_;
  static jfieldID chat_username_fieldID;
  /// Draft text for message to send in the chat.
  string draft_text_;
  static jfieldID draft_text_fieldID;
  /// True, if chat profile information screen must be opened; otherwise, the chat itself must be opened.
  bool open_profile_;
  static jfieldID open_profile_fieldID;

  /**
   * The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link. If the chat is found, open its profile information screen or the chat itself. If draft text isn't empty and the chat is a private chat with a regular user, then put the draft text in the input field.
   */
  internalLinkTypePublicChat();

  /**
   * The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link. If the chat is found, open its profile information screen or the chat itself. If draft text isn't empty and the chat is a private chat with a regular user, then put the draft text in the input field.
   *
   * \param[in] chat_username_ Username of the chat.
   * \param[in] draft_text_ Draft text for message to send in the chat.
   * \param[in] open_profile_ True, if chat profile information screen must be opened; otherwise, the chat itself must be opened.
   */
  internalLinkTypePublicChat(string const &chat_username_, string const &draft_text_, bool open_profile_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1769614592;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link can be used to login the current user on another device, but it must be scanned from QR-code using in-app camera. An alert similar to &quot;This code can be used to allow someone to log in to your Telegram account. To confirm Telegram login, please go to Settings &gt; Devices &gt; Scan QR and scan the code&quot; needs to be shown.
 */
class internalLinkTypeQrCodeAuthentication final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link can be used to login the current user on another device, but it must be scanned from QR-code using in-app camera. An alert similar to &quot;This code can be used to allow someone to log in to your Telegram account. To confirm Telegram login, please go to Settings &gt; Devices &gt; Scan QR and scan the code&quot; needs to be shown.
   */
  internalLinkTypeQrCodeAuthentication();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1089332956;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a dialog for creating of a managed bot. Call searchPublicChat with the given manager bot username. If the chat is found, the chat is a chat with a bot and the bot has can_manage_bots == true, then show bot creation confirmation dialog with the given suggested_bot_username and suggested_bot_name. If user agrees, call createBot with via_link == true to create the bot.
 */
class internalLinkTypeRequestManagedBot final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot which will manage the new bot.
  string manager_bot_username_;
  static jfieldID manager_bot_username_fieldID;
  /// Suggested username for the bot; always ends with &quot;bot&quot; case-insensitive.
  string suggested_bot_username_;
  static jfieldID suggested_bot_username_fieldID;
  /// Suggested name for the bot; may be empty if not specified.
  string suggested_bot_name_;
  static jfieldID suggested_bot_name_fieldID;

  /**
   * The link is a link to a dialog for creating of a managed bot. Call searchPublicChat with the given manager bot username. If the chat is found, the chat is a chat with a bot and the bot has can_manage_bots == true, then show bot creation confirmation dialog with the given suggested_bot_username and suggested_bot_name. If user agrees, call createBot with via_link == true to create the bot.
   */
  internalLinkTypeRequestManagedBot();

  /**
   * The link is a link to a dialog for creating of a managed bot. Call searchPublicChat with the given manager bot username. If the chat is found, the chat is a chat with a bot and the bot has can_manage_bots == true, then show bot creation confirmation dialog with the given suggested_bot_username and suggested_bot_name. If user agrees, call createBot with via_link == true to create the bot.
   *
   * \param[in] manager_bot_username_ Username of the bot which will manage the new bot.
   * \param[in] suggested_bot_username_ Suggested username for the bot; always ends with &quot;bot&quot; case-insensitive.
   * \param[in] suggested_bot_name_ Suggested name for the bot; may be empty if not specified.
   */
  internalLinkTypeRequestManagedBot(string const &manager_bot_username_, string const &suggested_bot_username_, string const &suggested_bot_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1416354488;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link forces restore of App Store purchases when opened. For official iOS application only.
 */
class internalLinkTypeRestorePurchases final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link forces restore of App Store purchases when opened. For official iOS application only.
   */
  internalLinkTypeRestorePurchases();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 606090371;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the Saved Messages chat. Call createPrivateChat with getOption(&quot;my_id&quot;) and open the chat.
 */
class internalLinkTypeSavedMessages final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to the Saved Messages chat. Call createPrivateChat with getOption(&quot;my_id&quot;) and open the chat.
   */
  internalLinkTypeSavedMessages();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 248860451;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the global chat and messages search field.
 */
class internalLinkTypeSearch final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to the global chat and messages search field.
   */
  internalLinkTypeSearch();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -591437024;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to application settings.
 */
class internalLinkTypeSettings final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Section of the application settings to open; may be null if none.
  object_ptr<SettingsSection> section_;
  static jfieldID section_fieldID;

  /**
   * The link is a link to application settings.
   */
  internalLinkTypeSettings();

  /**
   * The link is a link to application settings.
   *
   * \param[in] section_ Section of the application settings to open; may be null if none.
   */
  explicit internalLinkTypeSettings(object_ptr<SettingsSection> &&section_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 574986998;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to the Telegram Star purchase section of the application.
 */
class internalLinkTypeStarPurchase final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of Telegram Stars that must be owned by the user.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Purpose of Telegram Star purchase. Arbitrary string specified by the server, for example, &quot;subs&quot; if the Telegram Stars are required to extend channel subscriptions.
  string purpose_;
  static jfieldID purpose_fieldID;

  /**
   * The link is a link to the Telegram Star purchase section of the application.
   */
  internalLinkTypeStarPurchase();

  /**
   * The link is a link to the Telegram Star purchase section of the application.
   *
   * \param[in] star_count_ The number of Telegram Stars that must be owned by the user.
   * \param[in] purpose_ Purpose of Telegram Star purchase. Arbitrary string specified by the server, for example, &quot;subs&quot; if the Telegram Stars are required to extend channel subscriptions.
   */
  internalLinkTypeStarPurchase(int53 star_count_, string const &purpose_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -459567298;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set. If the sticker set is found and the user wants to add it, then call changeStickerSet.
 */
class internalLinkTypeStickerSet final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the sticker set.
  string sticker_set_name_;
  static jfieldID sticker_set_name_fieldID;
  /// True, if the sticker set is expected to contain custom emoji.
  bool expect_custom_emoji_;
  static jfieldID expect_custom_emoji_fieldID;

  /**
   * The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set. If the sticker set is found and the user wants to add it, then call changeStickerSet.
   */
  internalLinkTypeStickerSet();

  /**
   * The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set. If the sticker set is found and the user wants to add it, then call changeStickerSet.
   *
   * \param[in] sticker_set_name_ Name of the sticker set.
   * \param[in] expect_custom_emoji_ True, if the sticker set is expected to contain custom emoji.
   */
  internalLinkTypeStickerSet(string const &sticker_set_name_, bool expect_custom_emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1589227614;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a story. Call searchPublicChat with the given poster username, then call getStory with the received chat identifier and the given story identifier, then show the story if received.
 */
class internalLinkTypeStory final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the poster of the story.
  string story_poster_username_;
  static jfieldID story_poster_username_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * The link is a link to a story. Call searchPublicChat with the given poster username, then call getStory with the received chat identifier and the given story identifier, then show the story if received.
   */
  internalLinkTypeStory();

  /**
   * The link is a link to a story. Call searchPublicChat with the given poster username, then call getStory with the received chat identifier and the given story identifier, then show the story if received.
   *
   * \param[in] story_poster_username_ Username of the poster of the story.
   * \param[in] story_id_ Story identifier.
   */
  internalLinkTypeStory(string const &story_poster_username_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1852042869;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an album of stories. Call searchPublicChat with the given username, then call getStoryAlbumStories with the received chat identifier and the given story album identifier, then show the story album if received.
 */
class internalLinkTypeStoryAlbum final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the owner of the story album.
  string story_album_owner_username_;
  static jfieldID story_album_owner_username_fieldID;
  /// Story album identifier.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;

  /**
   * The link is a link to an album of stories. Call searchPublicChat with the given username, then call getStoryAlbumStories with the received chat identifier and the given story album identifier, then show the story album if received.
   */
  internalLinkTypeStoryAlbum();

  /**
   * The link is a link to an album of stories. Call searchPublicChat with the given username, then call getStoryAlbumStories with the received chat identifier and the given story album identifier, then show the story album if received.
   *
   * \param[in] story_album_owner_username_ Username of the owner of the story album.
   * \param[in] story_album_id_ Story album identifier.
   */
  internalLinkTypeStoryAlbum(string const &story_album_owner_username_, int32 story_album_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -332692184;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a text composition style. Call searchTextCompositionStyle with the given style name to get information about the style. If the style is found and the user wants to add it, then call addTextCompositionStyle.
 */
class internalLinkTypeTextCompositionStyle final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string style_name_;
  static jfieldID style_name_fieldID;

  /**
   * The link is a link to a text composition style. Call searchTextCompositionStyle with the given style name to get information about the style. If the style is found and the user wants to add it, then call addTextCompositionStyle.
   */
  internalLinkTypeTextCompositionStyle();

  /**
   * The link is a link to a text composition style. Call searchTextCompositionStyle with the given style name to get information about the style. If the style is found and the user wants to add it, then call addTextCompositionStyle.
   *
   * \param[in] style_name_ Name of the style.
   */
  explicit internalLinkTypeTextCompositionStyle(string const &style_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2055372583;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a cloud theme. TDLib has no theme support yet.
 */
class internalLinkTypeTheme final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the theme.
  string theme_name_;
  static jfieldID theme_name_fieldID;

  /**
   * The link is a link to a cloud theme. TDLib has no theme support yet.
   */
  internalLinkTypeTheme();

  /**
   * The link is a link to a cloud theme. TDLib has no theme support yet.
   *
   * \param[in] theme_name_ Name of the theme.
   */
  explicit internalLinkTypeTheme(string const &theme_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -200935417;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an unknown tg: link. Call getDeepLinkInfo to process the link.
 */
class internalLinkTypeUnknownDeepLink final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Link to be passed to getDeepLinkInfo.
  string link_;
  static jfieldID link_fieldID;

  /**
   * The link is an unknown tg: link. Call getDeepLinkInfo to process the link.
   */
  internalLinkTypeUnknownDeepLink();

  /**
   * The link is an unknown tg: link. Call getDeepLinkInfo to process the link.
   *
   * \param[in] link_ Link to be passed to getDeepLinkInfo.
   */
  explicit internalLinkTypeUnknownDeepLink(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 625596379;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an upgraded gift. Call getUpgradedGift with the given name to process the link.
 */
class internalLinkTypeUpgradedGift final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the unique gift.
  string name_;
  static jfieldID name_fieldID;

  /**
   * The link is a link to an upgraded gift. Call getUpgradedGift with the given name to process the link.
   */
  internalLinkTypeUpgradedGift();

  /**
   * The link is a link to an upgraded gift. Call getUpgradedGift with the given name to process the link.
   *
   * \param[in] name_ Name of the unique gift.
   */
  explicit internalLinkTypeUpgradedGift(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -708405605;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link. If the user is found, then call createPrivateChat and open user's profile information screen or the chat itself. If draft text isn't empty, then put the draft text in the input field.
 */
class internalLinkTypeUserPhoneNumber final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Phone number of the user.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// Draft text for message to send in the chat.
  string draft_text_;
  static jfieldID draft_text_fieldID;
  /// True, if user's profile information screen must be opened; otherwise, the chat itself must be opened.
  bool open_profile_;
  static jfieldID open_profile_fieldID;

  /**
   * The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link. If the user is found, then call createPrivateChat and open user's profile information screen or the chat itself. If draft text isn't empty, then put the draft text in the input field.
   */
  internalLinkTypeUserPhoneNumber();

  /**
   * The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link. If the user is found, then call createPrivateChat and open user's profile information screen or the chat itself. If draft text isn't empty, then put the draft text in the input field.
   *
   * \param[in] phone_number_ Phone number of the user.
   * \param[in] draft_text_ Draft text for message to send in the chat.
   * \param[in] open_profile_ True, if user's profile information screen must be opened; otherwise, the chat itself must be opened.
   */
  internalLinkTypeUserPhoneNumber(string const &phone_number_, string const &draft_text_, bool open_profile_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 273398536;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a user by a temporary token. Call searchUserByToken with the given token to process the link. If the user is found, then call createPrivateChat and open the chat.
 */
class internalLinkTypeUserToken final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The token.
  string token_;
  static jfieldID token_fieldID;

  /**
   * The link is a link to a user by a temporary token. Call searchUserByToken with the given token to process the link. If the user is found, then call createPrivateChat and open the chat.
   */
  internalLinkTypeUserToken();

  /**
   * The link is a link to a user by a temporary token. Call searchUserByToken with the given token to process the link. If the user is found, then call createPrivateChat and open the chat.
   *
   * \param[in] token_ The token.
   */
  explicit internalLinkTypeUserToken(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1462248615;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinVideoChat with the given invite hash to process the link.
 */
class internalLinkTypeVideoChat final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the chat with the video chat.
  string chat_username_;
  static jfieldID chat_username_fieldID;
  /// If non-empty, invite hash to be used to join the video chat without being muted by administrators.
  string invite_hash_;
  static jfieldID invite_hash_fieldID;
  /// True, if the video chat is expected to be a live stream in a channel or a broadcast group.
  bool is_live_stream_;
  static jfieldID is_live_stream_fieldID;

  /**
   * The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinVideoChat with the given invite hash to process the link.
   */
  internalLinkTypeVideoChat();

  /**
   * The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinVideoChat with the given invite hash to process the link.
   *
   * \param[in] chat_username_ Username of the chat with the video chat.
   * \param[in] invite_hash_ If non-empty, invite hash to be used to join the video chat without being muted by administrators.
   * \param[in] is_live_stream_ True, if the video chat is expected to be a live stream in a channel or a broadcast group.
   */
  internalLinkTypeVideoChat(string const &chat_username_, string const &invite_hash_, bool is_live_stream_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2020149068;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot. If the bot is restricted for the current user, then show an error message. Otherwise, call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App.
 */
class internalLinkTypeWebApp final : public InternalLinkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the bot that owns the Web App.
  string bot_username_;
  static jfieldID bot_username_fieldID;
  /// Short name of the Web App.
  string web_app_short_name_;
  static jfieldID web_app_short_name_fieldID;
  /// Start parameter to be passed to getWebAppLinkUrl.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// The mode in which the Web App must be opened.
  object_ptr<WebAppOpenMode> mode_;
  static jfieldID mode_fieldID;

  /**
   * The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot. If the bot is restricted for the current user, then show an error message. Otherwise, call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App.
   */
  internalLinkTypeWebApp();

  /**
   * The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot. If the bot is restricted for the current user, then show an error message. Otherwise, call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App.
   *
   * \param[in] bot_username_ Username of the bot that owns the Web App.
   * \param[in] web_app_short_name_ Short name of the Web App.
   * \param[in] start_parameter_ Start parameter to be passed to getWebAppLinkUrl.
   * \param[in] mode_ The mode in which the Web App must be opened.
   */
  internalLinkTypeWebApp(string const &bot_username_, string const &web_app_short_name_, string const &start_parameter_, object_ptr<WebAppOpenMode> &&mode_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2062112045;

  static object_ptr<InternalLinkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes result of group call participant invitation.
 */
class InviteGroupCallParticipantResult: public Object {
 public:
  static jclass Class;

  static object_ptr<InviteGroupCallParticipantResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't be invited due to their privacy settings.
 */
class inviteGroupCallParticipantResultUserPrivacyRestricted final : public InviteGroupCallParticipantResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can't be invited due to their privacy settings.
   */
  inviteGroupCallParticipantResultUserPrivacyRestricted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 53003769;

  static object_ptr<InviteGroupCallParticipantResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't be invited because they are already a participant of the call.
 */
class inviteGroupCallParticipantResultUserAlreadyParticipant final : public InviteGroupCallParticipantResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can't be invited because they are already a participant of the call.
   */
  inviteGroupCallParticipantResultUserAlreadyParticipant();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 661526151;

  static object_ptr<InviteGroupCallParticipantResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user can't be invited because they were banned by the owner of the call and can be invited back only by the owner of the group call.
 */
class inviteGroupCallParticipantResultUserWasBanned final : public InviteGroupCallParticipantResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user can't be invited because they were banned by the owner of the call and can be invited back only by the owner of the group call.
   */
  inviteGroupCallParticipantResultUserWasBanned();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -204345357;

  static object_ptr<InviteGroupCallParticipantResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user was invited and a service message of the type messageGroupCall was sent which can be used in declineGroupCallInvitation to cancel the invitation.
 */
class inviteGroupCallParticipantResultSuccess final : public InviteGroupCallParticipantResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the invitation message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * The user was invited and a service message of the type messageGroupCall was sent which can be used in declineGroupCallInvitation to cancel the invitation.
   */
  inviteGroupCallParticipantResultSuccess();

  /**
   * The user was invited and a service message of the type messageGroupCall was sent which can be used in declineGroupCallInvitation to cancel the invitation.
   *
   * \param[in] chat_id_ Identifier of the chat with the invitation message.
   * \param[in] message_id_ Identifier of the message.
   */
  inviteGroupCallParticipantResultSuccess(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1914309427;

  static object_ptr<InviteGroupCallParticipantResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the type of chat to which points an invite link.
 */
class InviteLinkChatType: public Object {
 public:
  static jclass Class;

  static object_ptr<InviteLinkChatType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an invite link for a basic group.
 */
class inviteLinkChatTypeBasicGroup final : public InviteLinkChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is an invite link for a basic group.
   */
  inviteLinkChatTypeBasicGroup();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1296287214;

  static object_ptr<InviteLinkChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an invite link for a supergroup.
 */
class inviteLinkChatTypeSupergroup final : public InviteLinkChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is an invite link for a supergroup.
   */
  inviteLinkChatTypeSupergroup();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1038640984;

  static object_ptr<InviteLinkChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is an invite link for a channel.
 */
class inviteLinkChatTypeChannel final : public InviteLinkChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is an invite link for a channel.
   */
  inviteLinkChatTypeChannel();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 806547211;

  static object_ptr<InviteLinkChatType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class labeledPricePart;

/**
 * Product invoice.
 */
class invoice final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code.
  string currency_;
  static jfieldID currency_fieldID;
  /// A list of objects used to calculate the total price of the product.
  array<object_ptr<labeledPricePart>> price_parts_;
  static jfieldID price_parts_fieldID;
  /// The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.
  int32 subscription_period_;
  static jfieldID subscription_period_fieldID;
  /// The maximum allowed amount of tip in the smallest units of the currency.
  int53 max_tip_amount_;
  static jfieldID max_tip_amount_fieldID;
  /// Suggested amounts of tip in the smallest units of the currency.
  array<int53> suggested_tip_amounts_;
  static jfieldID suggested_tip_amounts_fieldID;
  /// An HTTP URL with terms of service for recurring payments. If non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay.
  string recurring_payment_terms_of_service_url_;
  static jfieldID recurring_payment_terms_of_service_url_fieldID;
  /// An HTTP URL with terms of service for non-recurring payments. If non-empty, then the user must accept the terms of service before allowed to pay.
  string terms_of_service_url_;
  static jfieldID terms_of_service_url_fieldID;
  /// True, if the payment is a test payment.
  bool is_test_;
  static jfieldID is_test_fieldID;
  /// True, if the user's name is needed for payment.
  bool need_name_;
  static jfieldID need_name_fieldID;
  /// True, if the user's phone number is needed for payment.
  bool need_phone_number_;
  static jfieldID need_phone_number_fieldID;
  /// True, if the user's email address is needed for payment.
  bool need_email_address_;
  static jfieldID need_email_address_fieldID;
  /// True, if the user's shipping address is needed for payment.
  bool need_shipping_address_;
  static jfieldID need_shipping_address_fieldID;
  /// True, if the user's phone number will be sent to the provider.
  bool send_phone_number_to_provider_;
  static jfieldID send_phone_number_to_provider_fieldID;
  /// True, if the user's email address will be sent to the provider.
  bool send_email_address_to_provider_;
  static jfieldID send_email_address_to_provider_fieldID;
  /// True, if the total price depends on the shipping method.
  bool is_flexible_;
  static jfieldID is_flexible_fieldID;

  /**
   * Product invoice.
   */
  invoice();

  /**
   * Product invoice.
   *
   * \param[in] currency_ ISO 4217 currency code.
   * \param[in] price_parts_ A list of objects used to calculate the total price of the product.
   * \param[in] subscription_period_ The number of seconds between consecutive Telegram Star debiting for subscription invoices; 0 if the invoice doesn't create subscription.
   * \param[in] max_tip_amount_ The maximum allowed amount of tip in the smallest units of the currency.
   * \param[in] suggested_tip_amounts_ Suggested amounts of tip in the smallest units of the currency.
   * \param[in] recurring_payment_terms_of_service_url_ An HTTP URL with terms of service for recurring payments. If non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay.
   * \param[in] terms_of_service_url_ An HTTP URL with terms of service for non-recurring payments. If non-empty, then the user must accept the terms of service before allowed to pay.
   * \param[in] is_test_ True, if the payment is a test payment.
   * \param[in] need_name_ True, if the user's name is needed for payment.
   * \param[in] need_phone_number_ True, if the user's phone number is needed for payment.
   * \param[in] need_email_address_ True, if the user's email address is needed for payment.
   * \param[in] need_shipping_address_ True, if the user's shipping address is needed for payment.
   * \param[in] send_phone_number_to_provider_ True, if the user's phone number will be sent to the provider.
   * \param[in] send_email_address_to_provider_ True, if the user's email address will be sent to the provider.
   * \param[in] is_flexible_ True, if the total price depends on the shipping method.
   */
  invoice(string const &currency_, array<object_ptr<labeledPricePart>> &&price_parts_, int32 subscription_period_, int53 max_tip_amount_, array<int53> &&suggested_tip_amounts_, string const &recurring_payment_terms_of_service_url_, string const &terms_of_service_url_, bool is_test_, bool need_name_, bool need_phone_number_, bool need_email_address_, bool need_shipping_address_, bool send_phone_number_to_provider_, bool send_email_address_to_provider_, bool is_flexible_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 113204876;

  static object_ptr<invoice> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class JsonValue;

/**
 * Represents one member of a JSON object.
 */
class jsonObjectMember final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Member's key.
  string key_;
  static jfieldID key_fieldID;
  /// Member's value.
  object_ptr<JsonValue> value_;
  static jfieldID value_fieldID;

  /**
   * Represents one member of a JSON object.
   */
  jsonObjectMember();

  /**
   * Represents one member of a JSON object.
   *
   * \param[in] key_ Member's key.
   * \param[in] value_ Member's value.
   */
  jsonObjectMember(string const &key_, object_ptr<JsonValue> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1803309418;

  static object_ptr<jsonObjectMember> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class JsonValue;

class jsonObjectMember;

/**
 * This class is an abstract base class.
 * Represents a JSON value.
 */
class JsonValue: public Object {
 public:
  static jclass Class;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a null JSON value.
 */
class jsonValueNull final : public JsonValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Represents a null JSON value.
   */
  jsonValueNull();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -92872499;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a boolean JSON value.
 */
class jsonValueBoolean final : public JsonValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The value.
  bool value_;
  static jfieldID value_fieldID;

  /**
   * Represents a boolean JSON value.
   */
  jsonValueBoolean();

  /**
   * Represents a boolean JSON value.
   *
   * \param[in] value_ The value.
   */
  explicit jsonValueBoolean(bool value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2142186576;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a numeric JSON value.
 */
class jsonValueNumber final : public JsonValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The value.
  double value_;
  static jfieldID value_fieldID;

  /**
   * Represents a numeric JSON value.
   */
  jsonValueNumber();

  /**
   * Represents a numeric JSON value.
   *
   * \param[in] value_ The value.
   */
  explicit jsonValueNumber(double value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1010822033;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a string JSON value.
 */
class jsonValueString final : public JsonValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The value.
  string value_;
  static jfieldID value_fieldID;

  /**
   * Represents a string JSON value.
   */
  jsonValueString();

  /**
   * Represents a string JSON value.
   *
   * \param[in] value_ The value.
   */
  explicit jsonValueString(string const &value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1597947313;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a JSON array.
 */
class jsonValueArray final : public JsonValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of array elements.
  array<object_ptr<JsonValue>> values_;
  static jfieldID values_fieldID;

  /**
   * Represents a JSON array.
   */
  jsonValueArray();

  /**
   * Represents a JSON array.
   *
   * \param[in] values_ The list of array elements.
   */
  explicit jsonValueArray(array<object_ptr<JsonValue>> &&values_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -183913546;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a JSON object.
 */
class jsonValueObject final : public JsonValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of object members.
  array<object_ptr<jsonObjectMember>> members_;
  static jfieldID members_fieldID;

  /**
   * Represents a JSON object.
   */
  jsonValueObject();

  /**
   * Represents a JSON object.
   *
   * \param[in] members_ The list of object members.
   */
  explicit jsonValueObject(array<object_ptr<jsonObjectMember>> &&members_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 520252026;

  static object_ptr<JsonValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ButtonStyle;

class KeyboardButtonType;

/**
 * Represents a single button in a bot keyboard.
 */
class keyboardButton final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the button.
  string text_;
  static jfieldID text_fieldID;
  /// Identifier of the custom emoji that must be shown on the button; 0 if none.
  int64 icon_custom_emoji_id_;
  static jfieldID icon_custom_emoji_id_fieldID;
  /// Style of the button.
  object_ptr<ButtonStyle> style_;
  static jfieldID style_fieldID;
  /// Type of the button.
  object_ptr<KeyboardButtonType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a single button in a bot keyboard.
   */
  keyboardButton();

  /**
   * Represents a single button in a bot keyboard.
   *
   * \param[in] text_ Text of the button.
   * \param[in] icon_custom_emoji_id_ Identifier of the custom emoji that must be shown on the button; 0 if none.
   * \param[in] style_ Style of the button.
   * \param[in] type_ Type of the button.
   */
  keyboardButton(string const &text_, int64 icon_custom_emoji_id_, object_ptr<ButtonStyle> &&style_, object_ptr<KeyboardButtonType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -405853143;

  static object_ptr<keyboardButton> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes source of a keyboard button.
 */
class KeyboardButtonSource: public Object {
 public:
  static jclass Class;

  static object_ptr<KeyboardButtonSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The button is from a bot's message.
 */
class keyboardButtonSourceMessage final : public KeyboardButtonSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with the button.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * The button is from a bot's message.
   */
  keyboardButtonSourceMessage();

  /**
   * The button is from a bot's message.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message with the button.
   */
  keyboardButtonSourceMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 326023575;

  static object_ptr<KeyboardButtonSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The button is a prepared keyboard button from a Mini App received via getPreparedKeyboardButton.
 */
class keyboardButtonSourceWebApp final : public KeyboardButtonSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot that created the button.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the prepared button.
  string prepared_button_id_;
  static jfieldID prepared_button_id_fieldID;

  /**
   * The button is a prepared keyboard button from a Mini App received via getPreparedKeyboardButton.
   */
  keyboardButtonSourceWebApp();

  /**
   * The button is a prepared keyboard button from a Mini App received via getPreparedKeyboardButton.
   *
   * \param[in] bot_user_id_ Identifier of the bot that created the button.
   * \param[in] prepared_button_id_ Identifier of the prepared button.
   */
  keyboardButtonSourceWebApp(int53 bot_user_id_, string const &prepared_button_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -450665232;

  static object_ptr<KeyboardButtonSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatAdministratorRights;

/**
 * This class is an abstract base class.
 * Describes a keyboard button type.
 */
class KeyboardButtonType: public Object {
 public:
  static jclass Class;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A simple button, with text that must be sent when the button is pressed.
 */
class keyboardButtonTypeText final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A simple button, with text that must be sent when the button is pressed.
   */
  keyboardButtonTypeText();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1773037256;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that sends the user's phone number when pressed; available only in private chats.
 */
class keyboardButtonTypeRequestPhoneNumber final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A button that sends the user's phone number when pressed; available only in private chats.
   */
  keyboardButtonTypeRequestPhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1529235527;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that sends the user's location when pressed; available only in private chats.
 */
class keyboardButtonTypeRequestLocation final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A button that sends the user's location when pressed; available only in private chats.
   */
  keyboardButtonTypeRequestLocation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -125661955;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that allows the user to create and send a poll when pressed; available only in private chats.
 */
class keyboardButtonTypeRequestPoll final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If true, only regular polls must be allowed to create.
  bool force_regular_;
  static jfieldID force_regular_fieldID;
  /// If true, only polls in quiz mode must be allowed to create.
  bool force_quiz_;
  static jfieldID force_quiz_fieldID;

  /**
   * A button that allows the user to create and send a poll when pressed; available only in private chats.
   */
  keyboardButtonTypeRequestPoll();

  /**
   * A button that allows the user to create and send a poll when pressed; available only in private chats.
   *
   * \param[in] force_regular_ If true, only regular polls must be allowed to create.
   * \param[in] force_quiz_ If true, only polls in quiz mode must be allowed to create.
   */
  keyboardButtonTypeRequestPoll(bool force_regular_, bool force_quiz_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1902435512;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that requests users to be shared by the current user; available only in private chats. Use the method shareUsersWithBot to complete the request.
 */
class keyboardButtonTypeRequestUsers final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique button identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// True, if the shared users must or must not be bots.
  bool restrict_user_is_bot_;
  static jfieldID restrict_user_is_bot_fieldID;
  /// True, if the shared users must be bots; otherwise, the shared users must not be bots. Ignored if restrict_user_is_bot is false.
  bool user_is_bot_;
  static jfieldID user_is_bot_fieldID;
  /// True, if the shared users must or must not be Telegram Premium users.
  bool restrict_user_is_premium_;
  static jfieldID restrict_user_is_premium_fieldID;
  /// True, if the shared users must be Telegram Premium users; otherwise, the shared users must not be Telegram Premium users. Ignored if restrict_user_is_premium is false.
  bool user_is_premium_;
  static jfieldID user_is_premium_fieldID;
  /// The maximum number of users to share.
  int32 max_quantity_;
  static jfieldID max_quantity_fieldID;
  /// Pass true to request name of the users; bots only.
  bool request_name_;
  static jfieldID request_name_fieldID;
  /// Pass true to request username of the users; bots only.
  bool request_username_;
  static jfieldID request_username_fieldID;
  /// Pass true to request photo of the users; bots only.
  bool request_photo_;
  static jfieldID request_photo_fieldID;

  /**
   * A button that requests users to be shared by the current user; available only in private chats. Use the method shareUsersWithBot to complete the request.
   */
  keyboardButtonTypeRequestUsers();

  /**
   * A button that requests users to be shared by the current user; available only in private chats. Use the method shareUsersWithBot to complete the request.
   *
   * \param[in] id_ Unique button identifier.
   * \param[in] restrict_user_is_bot_ True, if the shared users must or must not be bots.
   * \param[in] user_is_bot_ True, if the shared users must be bots; otherwise, the shared users must not be bots. Ignored if restrict_user_is_bot is false.
   * \param[in] restrict_user_is_premium_ True, if the shared users must or must not be Telegram Premium users.
   * \param[in] user_is_premium_ True, if the shared users must be Telegram Premium users; otherwise, the shared users must not be Telegram Premium users. Ignored if restrict_user_is_premium is false.
   * \param[in] max_quantity_ The maximum number of users to share.
   * \param[in] request_name_ Pass true to request name of the users; bots only.
   * \param[in] request_username_ Pass true to request username of the users; bots only.
   * \param[in] request_photo_ Pass true to request photo of the users; bots only.
   */
  keyboardButtonTypeRequestUsers(int32 id_, bool restrict_user_is_bot_, bool user_is_bot_, bool restrict_user_is_premium_, bool user_is_premium_, int32 max_quantity_, bool request_name_, bool request_username_, bool request_photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1738765315;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * 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.
 */
class keyboardButtonTypeRequestChat final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique button identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared.
  bool chat_is_channel_;
  static jfieldID chat_is_channel_fieldID;
  /// True, if the chat must or must not be a forum supergroup.
  bool restrict_chat_is_forum_;
  static jfieldID restrict_chat_is_forum_fieldID;
  /// True, if the chat must be a forum supergroup; otherwise, the chat must not be a forum supergroup. Ignored if restrict_chat_is_forum is false.
  bool chat_is_forum_;
  static jfieldID chat_is_forum_fieldID;
  /// True, if the chat must or must not have a username.
  bool restrict_chat_has_username_;
  static jfieldID restrict_chat_has_username_fieldID;
  /// True, if the chat must have a username; otherwise, the chat must not have a username. Ignored if restrict_chat_has_username is false.
  bool chat_has_username_;
  static jfieldID chat_has_username_fieldID;
  /// True, if the chat must be created by the current user.
  bool chat_is_created_;
  static jfieldID chat_is_created_fieldID;
  /// Expected user administrator rights in the chat; may be null if they aren't restricted.
  object_ptr<chatAdministratorRights> user_administrator_rights_;
  static jfieldID user_administrator_rights_fieldID;
  /// Expected bot administrator rights in the chat; may be null if they aren't restricted.
  object_ptr<chatAdministratorRights> bot_administrator_rights_;
  static jfieldID bot_administrator_rights_fieldID;
  /// True, if the bot must be a member of the chat; for basic group and supergroup chats only.
  bool bot_is_member_;
  static jfieldID bot_is_member_fieldID;
  /// Pass true to request title of the chat; bots only.
  bool request_title_;
  static jfieldID request_title_fieldID;
  /// Pass true to request username of the chat; bots only.
  bool request_username_;
  static jfieldID request_username_fieldID;
  /// Pass true to request photo of the chat; bots only.
  bool request_photo_;
  static jfieldID request_photo_fieldID;

  /**
   * 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();

  /**
   * 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.
   *
   * \param[in] id_ Unique button identifier.
   * \param[in] chat_is_channel_ True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared.
   * \param[in] restrict_chat_is_forum_ True, if the chat must or must not be a forum supergroup.
   * \param[in] chat_is_forum_ True, if the chat must be a forum supergroup; otherwise, the chat must not be a forum supergroup. Ignored if restrict_chat_is_forum is false.
   * \param[in] restrict_chat_has_username_ True, if the chat must or must not have a username.
   * \param[in] chat_has_username_ True, if the chat must have a username; otherwise, the chat must not have a username. Ignored if restrict_chat_has_username is false.
   * \param[in] chat_is_created_ True, if the chat must be created by the current user.
   * \param[in] user_administrator_rights_ Expected user administrator rights in the chat; may be null if they aren't restricted.
   * \param[in] bot_administrator_rights_ Expected bot administrator rights in the chat; may be null if they aren't restricted.
   * \param[in] bot_is_member_ True, if the bot must be a member of the chat; for basic group and supergroup chats only.
   * \param[in] request_title_ Pass true to request title of the chat; bots only.
   * \param[in] request_username_ Pass true to request username of the chat; bots only.
   * \param[in] request_photo_ Pass true to request photo of the chat; bots only.
   */
  keyboardButtonTypeRequestChat(int32 id_, bool chat_is_channel_, bool restrict_chat_is_forum_, bool chat_is_forum_, bool restrict_chat_has_username_, bool chat_has_username_, bool chat_is_created_, object_ptr<chatAdministratorRights> &&user_administrator_rights_, object_ptr<chatAdministratorRights> &&bot_administrator_rights_, bool bot_is_member_, bool request_title_, bool request_username_, bool request_photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1511138485;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that requests creation of a managed bot by the current user; available only in private chats. Use the method createBot to complete the request.
 */
class keyboardButtonTypeRequestManagedBot final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique button identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// Suggested name for the bot; may be empty if not specified.
  string suggested_name_;
  static jfieldID suggested_name_fieldID;
  /// Suggested username for the bot; may be empty if not specified.
  string suggested_username_;
  static jfieldID suggested_username_fieldID;

  /**
   * A button that requests creation of a managed bot by the current user; available only in private chats. Use the method createBot to complete the request.
   */
  keyboardButtonTypeRequestManagedBot();

  /**
   * A button that requests creation of a managed bot by the current user; available only in private chats. Use the method createBot to complete the request.
   *
   * \param[in] id_ Unique button identifier.
   * \param[in] suggested_name_ Suggested name for the bot; may be empty if not specified.
   * \param[in] suggested_username_ Suggested username for the bot; may be empty if not specified.
   */
  keyboardButtonTypeRequestManagedBot(int32 id_, string const &suggested_name_, string const &suggested_username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 311203127;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A button that opens a Web App by calling getWebAppUrl.
 */
class keyboardButtonTypeWebApp final : public KeyboardButtonType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An HTTP URL to pass to getWebAppUrl.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A button that opens a Web App by calling getWebAppUrl.
   */
  keyboardButtonTypeWebApp();

  /**
   * A button that opens a Web App by calling getWebAppUrl.
   *
   * \param[in] url_ An HTTP URL to pass to getWebAppUrl.
   */
  explicit keyboardButtonTypeWebApp(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1892220770;

  static object_ptr<KeyboardButtonType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Portion of the price of a product (e.g., &quot;delivery cost&quot;, &quot;tax amount&quot;).
 */
class labeledPricePart final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Label for this portion of the product price.
  string label_;
  static jfieldID label_fieldID;
  /// Currency amount in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;

  /**
   * Portion of the price of a product (e.g., &quot;delivery cost&quot;, &quot;tax amount&quot;).
   */
  labeledPricePart();

  /**
   * Portion of the price of a product (e.g., &quot;delivery cost&quot;, &quot;tax amount&quot;).
   *
   * \param[in] label_ Label for this portion of the product price.
   * \param[in] amount_ Currency amount in the smallest units of the currency.
   */
  labeledPricePart(string const &label_, int53 amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 552789798;

  static object_ptr<labeledPricePart> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a language pack.
 */
class languagePackInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique language pack identifier.
  string id_;
  static jfieldID id_fieldID;
  /// Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it must be fetched from base language pack. Unsupported in custom language packs.
  string base_language_pack_id_;
  static jfieldID base_language_pack_id_fieldID;
  /// Language name.
  string name_;
  static jfieldID name_fieldID;
  /// Name of the language in that language.
  string native_name_;
  static jfieldID native_name_fieldID;
  /// A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information.
  string plural_code_;
  static jfieldID plural_code_fieldID;
  /// True, if the language pack is official.
  bool is_official_;
  static jfieldID is_official_fieldID;
  /// True, if the language pack strings are RTL.
  bool is_rtl_;
  static jfieldID is_rtl_fieldID;
  /// True, if the language pack is a beta language pack.
  bool is_beta_;
  static jfieldID is_beta_fieldID;
  /// True, if the language pack is installed by the current user.
  bool is_installed_;
  static jfieldID is_installed_fieldID;
  /// Total number of non-deleted strings from the language pack.
  int32 total_string_count_;
  static jfieldID total_string_count_fieldID;
  /// Total number of translated strings from the language pack.
  int32 translated_string_count_;
  static jfieldID translated_string_count_fieldID;
  /// Total number of non-deleted strings from the language pack available locally.
  int32 local_string_count_;
  static jfieldID local_string_count_fieldID;
  /// Link to language translation interface; empty for custom local language packs.
  string translation_url_;
  static jfieldID translation_url_fieldID;

  /**
   * Contains information about a language pack.
   */
  languagePackInfo();

  /**
   * Contains information about a language pack.
   *
   * \param[in] id_ Unique language pack identifier.
   * \param[in] base_language_pack_id_ Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it must be fetched from base language pack. Unsupported in custom language packs.
   * \param[in] name_ Language name.
   * \param[in] native_name_ Name of the language in that language.
   * \param[in] plural_code_ A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information.
   * \param[in] is_official_ True, if the language pack is official.
   * \param[in] is_rtl_ True, if the language pack strings are RTL.
   * \param[in] is_beta_ True, if the language pack is a beta language pack.
   * \param[in] is_installed_ True, if the language pack is installed by the current user.
   * \param[in] total_string_count_ Total number of non-deleted strings from the language pack.
   * \param[in] translated_string_count_ Total number of translated strings from the language pack.
   * \param[in] local_string_count_ Total number of non-deleted strings from the language pack available locally.
   * \param[in] translation_url_ Link to language translation interface; empty for custom local language packs.
   */
  languagePackInfo(string const &id_, string const &base_language_pack_id_, string const &name_, string const &native_name_, string const &plural_code_, bool is_official_, bool is_rtl_, bool is_beta_, bool is_installed_, int32 total_string_count_, int32 translated_string_count_, int32 local_string_count_, string const &translation_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 542199642;

  static object_ptr<languagePackInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class LanguagePackStringValue;

/**
 * Represents one language pack string.
 */
class languagePackString final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// String key.
  string key_;
  static jfieldID key_fieldID;
  /// String value; pass null if the string needs to be taken from the built-in English language pack.
  object_ptr<LanguagePackStringValue> value_;
  static jfieldID value_fieldID;

  /**
   * Represents one language pack string.
   */
  languagePackString();

  /**
   * Represents one language pack string.
   *
   * \param[in] key_ String key.
   * \param[in] value_ String value; pass null if the string needs to be taken from the built-in English language pack.
   */
  languagePackString(string const &key_, object_ptr<LanguagePackStringValue> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1307632736;

  static object_ptr<languagePackString> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the value of a string in a language pack.
 */
class LanguagePackStringValue: public Object {
 public:
  static jclass Class;

  static object_ptr<LanguagePackStringValue> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An ordinary language pack string.
 */
class languagePackStringValueOrdinary final : public LanguagePackStringValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// String value.
  string value_;
  static jfieldID value_fieldID;

  /**
   * An ordinary language pack string.
   */
  languagePackStringValueOrdinary();

  /**
   * An ordinary language pack string.
   *
   * \param[in] value_ String value.
   */
  explicit languagePackStringValueOrdinary(string const &value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -249256352;

  static object_ptr<LanguagePackStringValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information.
 */
class languagePackStringValuePluralized final : public LanguagePackStringValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Value for zero objects.
  string zero_value_;
  static jfieldID zero_value_fieldID;
  /// Value for one object.
  string one_value_;
  static jfieldID one_value_fieldID;
  /// Value for two objects.
  string two_value_;
  static jfieldID two_value_fieldID;
  /// Value for few objects.
  string few_value_;
  static jfieldID few_value_fieldID;
  /// Value for many objects.
  string many_value_;
  static jfieldID many_value_fieldID;
  /// Default value.
  string other_value_;
  static jfieldID other_value_fieldID;

  /**
   * A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information.
   */
  languagePackStringValuePluralized();

  /**
   * A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information.
   *
   * \param[in] zero_value_ Value for zero objects.
   * \param[in] one_value_ Value for one object.
   * \param[in] two_value_ Value for two objects.
   * \param[in] few_value_ Value for few objects.
   * \param[in] many_value_ Value for many objects.
   * \param[in] other_value_ Default value.
   */
  languagePackStringValuePluralized(string const &zero_value_, string const &one_value_, string const &two_value_, string const &few_value_, string const &many_value_, string const &other_value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1906840261;

  static object_ptr<LanguagePackStringValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A deleted language pack string, the value must be taken from the built-in English language pack.
 */
class languagePackStringValueDeleted final : public LanguagePackStringValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A deleted language pack string, the value must be taken from the built-in English language pack.
   */
  languagePackStringValueDeleted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1834792698;

  static object_ptr<LanguagePackStringValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class languagePackString;

/**
 * Contains a list of language pack strings.
 */
class languagePackStrings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of language pack strings.
  array<object_ptr<languagePackString>> strings_;
  static jfieldID strings_fieldID;

  /**
   * Contains a list of language pack strings.
   */
  languagePackStrings();

  /**
   * Contains a list of language pack strings.
   *
   * \param[in] strings_ A list of language pack strings.
   */
  explicit languagePackStrings(array<object_ptr<languagePackString>> &&strings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1172082922;

  static object_ptr<languagePackStrings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class LinkPreviewType;

class formattedText;

/**
 * Describes a link preview.
 */
class linkPreview final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Original URL of the link.
  string url_;
  static jfieldID url_fieldID;
  /// URL to display.
  string display_url_;
  static jfieldID display_url_fieldID;
  /// Short name of the site (e.g., Google Docs, App Store).
  string site_name_;
  static jfieldID site_name_fieldID;
  /// Title of the content.
  string title_;
  static jfieldID title_fieldID;
  /// Description of the content.
  object_ptr<formattedText> description_;
  static jfieldID description_fieldID;
  /// Author of the content.
  string author_;
  static jfieldID author_fieldID;
  /// Type of the link preview.
  object_ptr<LinkPreviewType> type_;
  static jfieldID type_fieldID;
  /// True, if size of media in the preview can be changed.
  bool has_large_media_;
  static jfieldID has_large_media_fieldID;
  /// True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.
  bool show_large_media_;
  static jfieldID show_large_media_fieldID;
  /// True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
  bool show_media_above_description_;
  static jfieldID show_media_above_description_fieldID;
  /// True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.
  bool skip_confirmation_;
  static jfieldID skip_confirmation_fieldID;
  /// True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
  bool show_above_text_;
  static jfieldID show_above_text_fieldID;
  /// Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.
  int32 instant_view_version_;
  static jfieldID instant_view_version_fieldID;

  /**
   * Describes a link preview.
   */
  linkPreview();

  /**
   * Describes a link preview.
   *
   * \param[in] url_ Original URL of the link.
   * \param[in] display_url_ URL to display.
   * \param[in] site_name_ Short name of the site (e.g., Google Docs, App Store).
   * \param[in] title_ Title of the content.
   * \param[in] description_ Description of the content.
   * \param[in] author_ Author of the content.
   * \param[in] type_ Type of the link preview.
   * \param[in] has_large_media_ True, if size of media in the preview can be changed.
   * \param[in] show_large_media_ True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.
   * \param[in] show_media_above_description_ True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
   * \param[in] skip_confirmation_ True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.
   * \param[in] show_above_text_ True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
   * \param[in] instant_view_version_ Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.
   */
  linkPreview(string const &url_, string const &display_url_, string const &site_name_, string const &title_, object_ptr<formattedText> &&description_, string const &author_, object_ptr<LinkPreviewType> &&type_, bool has_large_media_, bool show_large_media_, bool show_media_above_description_, bool skip_confirmation_, bool show_above_text_, int32 instant_view_version_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1729417714;

  static object_ptr<linkPreview> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

class video;

/**
 * This class is an abstract base class.
 * Describes a media from a link preview album.
 */
class LinkPreviewAlbumMedia: public Object {
 public:
  static jclass Class;

  static object_ptr<LinkPreviewAlbumMedia> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is a photo.
 */
class linkPreviewAlbumMediaPhoto final : public LinkPreviewAlbumMedia {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo description.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * The media is a photo.
   */
  linkPreviewAlbumMediaPhoto();

  /**
   * The media is a photo.
   *
   * \param[in] photo_ Photo description.
   */
  explicit linkPreviewAlbumMediaPhoto(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -935480434;

  static object_ptr<LinkPreviewAlbumMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is a video.
 */
class linkPreviewAlbumMediaVideo final : public LinkPreviewAlbumMedia {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Video description.
  object_ptr<video> video_;
  static jfieldID video_fieldID;

  /**
   * The media is a video.
   */
  linkPreviewAlbumMediaVideo();

  /**
   * The media is a video.
   *
   * \param[in] video_ Video description.
   */
  explicit linkPreviewAlbumMediaVideo(object_ptr<video> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 390616795;

  static object_ptr<LinkPreviewAlbumMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Options to be used for generation of a link preview.
 */
class linkPreviewOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if link preview must be disabled.
  bool is_disabled_;
  static jfieldID is_disabled_fieldID;
  /// URL to use for link preview. If empty, then the first URL found in the message text will be used.
  string url_;
  static jfieldID url_fieldID;
  /// True, if shown media preview must be small; ignored in secret chats or if the URL isn't explicitly specified.
  bool force_small_media_;
  static jfieldID force_small_media_fieldID;
  /// True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified.
  bool force_large_media_;
  static jfieldID force_large_media_fieldID;
  /// True, if link preview must be shown above message text; otherwise, the link preview will be shown below the message text; ignored in secret chats.
  bool show_above_text_;
  static jfieldID show_above_text_fieldID;

  /**
   * Options to be used for generation of a link preview.
   */
  linkPreviewOptions();

  /**
   * Options to be used for generation of a link preview.
   *
   * \param[in] is_disabled_ True, if link preview must be disabled.
   * \param[in] url_ URL to use for link preview. If empty, then the first URL found in the message text will be used.
   * \param[in] force_small_media_ True, if shown media preview must be small; ignored in secret chats or if the URL isn't explicitly specified.
   * \param[in] force_large_media_ True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified.
   * \param[in] show_above_text_ True, if link preview must be shown above message text; otherwise, the link preview will be shown below the message text; ignored in secret chats.
   */
  linkPreviewOptions(bool is_disabled_, string const &url_, bool force_small_media_, bool force_large_media_, bool show_above_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1046590451;

  static object_ptr<linkPreviewOptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundType;

class InviteLinkChatType;

class LinkPreviewAlbumMedia;

class animation;

class audio;

class chatPhoto;

class document;

class gift;

class photo;

class sticker;

class themeSettings;

class upgradedGift;

class video;

class videoNote;

class voiceNote;

/**
 * This class is an abstract base class.
 * Describes type of link preview.
 */
class LinkPreviewType: public Object {
 public:
  static jclass Class;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a media album consisting of photos and videos.
 */
class linkPreviewTypeAlbum final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of album media.
  array<object_ptr<LinkPreviewAlbumMedia>> media_;
  static jfieldID media_fieldID;
  /// Album caption.
  string caption_;
  static jfieldID caption_fieldID;

  /**
   * The link is a link to a media album consisting of photos and videos.
   */
  linkPreviewTypeAlbum();

  /**
   * The link is a link to a media album consisting of photos and videos.
   *
   * \param[in] media_ The list of album media.
   * \param[in] caption_ Album caption.
   */
  linkPreviewTypeAlbum(array<object_ptr<LinkPreviewAlbumMedia>> &&media_, string const &caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -919156671;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an animation.
 */
class linkPreviewTypeAnimation final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animation.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;

  /**
   * The link is a link to an animation.
   */
  linkPreviewTypeAnimation();

  /**
   * The link is a link to an animation.
   *
   * \param[in] animation_ The animation.
   */
  explicit linkPreviewTypeAnimation(object_ptr<animation> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1386429132;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an app at App Store or Google Play.
 */
class linkPreviewTypeApp final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo for the app.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to an app at App Store or Google Play.
   */
  linkPreviewTypeApp();

  /**
   * The link is a link to an app at App Store or Google Play.
   *
   * \param[in] photo_ Photo for the app.
   */
  explicit linkPreviewTypeApp(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -475623953;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a web site.
 */
class linkPreviewTypeArticle final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Article's main photo; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to a web site.
   */
  linkPreviewTypeArticle();

  /**
   * The link is a link to a web site.
   *
   * \param[in] photo_ Article's main photo; may be null.
   */
  explicit linkPreviewTypeArticle(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2093915097;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an audio.
 */
class linkPreviewTypeAudio final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The audio description.
  object_ptr<audio> audio_;
  static jfieldID audio_fieldID;

  /**
   * The link is a link to an audio.
   */
  linkPreviewTypeAudio();

  /**
   * The link is a link to an audio.
   *
   * \param[in] audio_ The audio description.
   */
  explicit linkPreviewTypeAudio(object_ptr<audio> &&audio_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1977878482;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a background. Link preview title and description are available only for filled backgrounds.
 */
class linkPreviewTypeBackground final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Document with the background; may be null for filled backgrounds.
  object_ptr<document> document_;
  static jfieldID document_fieldID;
  /// Type of the background; may be null if unknown.
  object_ptr<BackgroundType> background_type_;
  static jfieldID background_type_fieldID;

  /**
   * The link is a link to a background. Link preview title and description are available only for filled backgrounds.
   */
  linkPreviewTypeBackground();

  /**
   * The link is a link to a background. Link preview title and description are available only for filled backgrounds.
   *
   * \param[in] document_ Document with the background; may be null for filled backgrounds.
   * \param[in] background_type_ Type of the background; may be null if unknown.
   */
  linkPreviewTypeBackground(object_ptr<document> &&document_, object_ptr<BackgroundType> &&background_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 977838560;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to boost a channel chat.
 */
class linkPreviewTypeChannelBoost final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo of the chat; may be null.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to boost a channel chat.
   */
  linkPreviewTypeChannelBoost();

  /**
   * The link is a link to boost a channel chat.
   *
   * \param[in] photo_ Photo of the chat; may be null.
   */
  explicit linkPreviewTypeChannelBoost(object_ptr<chatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -957086634;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a chat.
 */
class linkPreviewTypeChat final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the chat.
  object_ptr<InviteLinkChatType> type_;
  static jfieldID type_fieldID;
  /// Photo of the chat; may be null.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// True, if the link only creates join request.
  bool creates_join_request_;
  static jfieldID creates_join_request_fieldID;

  /**
   * The link is a link to a chat.
   */
  linkPreviewTypeChat();

  /**
   * The link is a link to a chat.
   *
   * \param[in] type_ Type of the chat.
   * \param[in] photo_ Photo of the chat; may be null.
   * \param[in] creates_join_request_ True, if the link only creates join request.
   */
  linkPreviewTypeChat(object_ptr<InviteLinkChatType> &&type_, object_ptr<chatPhoto> &&photo_, bool creates_join_request_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1372610270;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a direct messages chat of a channel.
 */
class linkPreviewTypeDirectMessagesChat final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo of the channel chat; may be null.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to a direct messages chat of a channel.
   */
  linkPreviewTypeDirectMessagesChat();

  /**
   * The link is a link to a direct messages chat of a channel.
   *
   * \param[in] photo_ Photo of the channel chat; may be null.
   */
  explicit linkPreviewTypeDirectMessagesChat(object_ptr<chatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 578255582;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a general file.
 */
class linkPreviewTypeDocument final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The document description.
  object_ptr<document> document_;
  static jfieldID document_fieldID;

  /**
   * The link is a link to a general file.
   */
  linkPreviewTypeDocument();

  /**
   * The link is a link to a general file.
   *
   * \param[in] document_ The document description.
   */
  explicit linkPreviewTypeDocument(object_ptr<document> &&document_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1090426462;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an animation player.
 */
class linkPreviewTypeEmbeddedAnimationPlayer final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the external animation player.
  string url_;
  static jfieldID url_fieldID;
  /// The cached animation; may be null if unknown.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;
  /// Thumbnail of the animation; may be null if unknown.
  object_ptr<photo> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Duration of the animation, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Expected width of the embedded player.
  int32 width_;
  static jfieldID width_fieldID;
  /// Expected height of the embedded player.
  int32 height_;
  static jfieldID height_fieldID;

  /**
   * The link is a link to an animation player.
   */
  linkPreviewTypeEmbeddedAnimationPlayer();

  /**
   * The link is a link to an animation player.
   *
   * \param[in] url_ URL of the external animation player.
   * \param[in] animation_ The cached animation; may be null if unknown.
   * \param[in] thumbnail_ Thumbnail of the animation; may be null if unknown.
   * \param[in] duration_ Duration of the animation, in seconds.
   * \param[in] width_ Expected width of the embedded player.
   * \param[in] height_ Expected height of the embedded player.
   */
  linkPreviewTypeEmbeddedAnimationPlayer(string const &url_, object_ptr<animation> &&animation_, object_ptr<photo> &&thumbnail_, int32 duration_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 413874679;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an audio player.
 */
class linkPreviewTypeEmbeddedAudioPlayer final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the external audio player.
  string url_;
  static jfieldID url_fieldID;
  /// The cached audio; may be null if unknown.
  object_ptr<audio> audio_;
  static jfieldID audio_fieldID;
  /// Thumbnail of the audio; may be null if unknown.
  object_ptr<photo> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Duration of the audio, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Expected width of the embedded player.
  int32 width_;
  static jfieldID width_fieldID;
  /// Expected height of the embedded player.
  int32 height_;
  static jfieldID height_fieldID;

  /**
   * The link is a link to an audio player.
   */
  linkPreviewTypeEmbeddedAudioPlayer();

  /**
   * The link is a link to an audio player.
   *
   * \param[in] url_ URL of the external audio player.
   * \param[in] audio_ The cached audio; may be null if unknown.
   * \param[in] thumbnail_ Thumbnail of the audio; may be null if unknown.
   * \param[in] duration_ Duration of the audio, in seconds.
   * \param[in] width_ Expected width of the embedded player.
   * \param[in] height_ Expected height of the embedded player.
   */
  linkPreviewTypeEmbeddedAudioPlayer(string const &url_, object_ptr<audio> &&audio_, object_ptr<photo> &&thumbnail_, int32 duration_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2077132997;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a video player.
 */
class linkPreviewTypeEmbeddedVideoPlayer final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the external video player.
  string url_;
  static jfieldID url_fieldID;
  /// The cached video; may be null if unknown.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Thumbnail of the video; may be null if unknown.
  object_ptr<photo> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Duration of the video, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Expected width of the embedded player.
  int32 width_;
  static jfieldID width_fieldID;
  /// Expected height of the embedded player.
  int32 height_;
  static jfieldID height_fieldID;

  /**
   * The link is a link to a video player.
   */
  linkPreviewTypeEmbeddedVideoPlayer();

  /**
   * The link is a link to a video player.
   *
   * \param[in] url_ URL of the external video player.
   * \param[in] video_ The cached video; may be null if unknown.
   * \param[in] thumbnail_ Thumbnail of the video; may be null if unknown.
   * \param[in] duration_ Duration of the video, in seconds.
   * \param[in] width_ Expected width of the embedded player.
   * \param[in] height_ Expected height of the embedded player.
   */
  linkPreviewTypeEmbeddedVideoPlayer(string const &url_, object_ptr<video> &&video_, object_ptr<photo> &&thumbnail_, int32 duration_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -571363951;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an audio file.
 */
class linkPreviewTypeExternalAudio final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the audio file.
  string url_;
  static jfieldID url_fieldID;
  /// MIME type of the audio file.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// Duration of the audio, in seconds; 0 if unknown.
  int32 duration_;
  static jfieldID duration_fieldID;

  /**
   * The link is a link to an audio file.
   */
  linkPreviewTypeExternalAudio();

  /**
   * The link is a link to an audio file.
   *
   * \param[in] url_ URL of the audio file.
   * \param[in] mime_type_ MIME type of the audio file.
   * \param[in] duration_ Duration of the audio, in seconds; 0 if unknown.
   */
  linkPreviewTypeExternalAudio(string const &url_, string const &mime_type_, int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1971126291;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a video file.
 */
class linkPreviewTypeExternalVideo final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the video file.
  string url_;
  static jfieldID url_fieldID;
  /// MIME type of the video file.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// Expected width of the video preview; 0 if unknown.
  int32 width_;
  static jfieldID width_fieldID;
  /// Expected height of the video preview; 0 if unknown.
  int32 height_;
  static jfieldID height_fieldID;
  /// Duration of the video, in seconds; 0 if unknown.
  int32 duration_;
  static jfieldID duration_fieldID;

  /**
   * The link is a link to a video file.
   */
  linkPreviewTypeExternalVideo();

  /**
   * The link is a link to a video file.
   *
   * \param[in] url_ URL of the video file.
   * \param[in] mime_type_ MIME type of the video file.
   * \param[in] width_ Expected width of the video preview; 0 if unknown.
   * \param[in] height_ Expected height of the video preview; 0 if unknown.
   * \param[in] duration_ Duration of the video, in seconds; 0 if unknown.
   */
  linkPreviewTypeExternalVideo(string const &url_, string const &mime_type_, int32 width_, int32 height_, int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1367198616;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a gift auction.
 */
class linkPreviewTypeGiftAuction final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;
  /// Point in time (Unix timestamp) when the auction will be ended.
  int32 auction_end_date_;
  static jfieldID auction_end_date_fieldID;

  /**
   * The link is a link to a gift auction.
   */
  linkPreviewTypeGiftAuction();

  /**
   * The link is a link to a gift auction.
   *
   * \param[in] gift_ The gift.
   * \param[in] auction_end_date_ Point in time (Unix timestamp) when the auction will be ended.
   */
  linkPreviewTypeGiftAuction(object_ptr<gift> &&gift_, int32 auction_end_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1291307457;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a gift collection.
 */
class linkPreviewTypeGiftCollection final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Icons for some gifts from the collection; may be empty.
  array<object_ptr<sticker>> icons_;
  static jfieldID icons_fieldID;

  /**
   * The link is a link to a gift collection.
   */
  linkPreviewTypeGiftCollection();

  /**
   * The link is a link to a gift collection.
   *
   * \param[in] icons_ Icons for some gifts from the collection; may be empty.
   */
  explicit linkPreviewTypeGiftCollection(array<object_ptr<sticker>> &&icons_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 230270537;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a group call that isn't bound to a chat.
 */
class linkPreviewTypeGroupCall final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to a group call that isn't bound to a chat.
   */
  linkPreviewTypeGroupCall();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1242459936;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an invoice.
 */
class linkPreviewTypeInvoice final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to an invoice.
   */
  linkPreviewTypeInvoice();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -729855782;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a live story group call.
 */
class linkPreviewTypeLiveStory final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * The link is a link to a live story group call.
   */
  linkPreviewTypeLiveStory();

  /**
   * The link is a link to a live story group call.
   *
   * \param[in] story_poster_chat_id_ The identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  linkPreviewTypeLiveStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1062126469;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a text or a poll Telegram message.
 */
class linkPreviewTypeMessage final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to a text or a poll Telegram message.
   */
  linkPreviewTypeMessage();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 435470750;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a photo.
 */
class linkPreviewTypePhoto final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to a photo.
   */
  linkPreviewTypePhoto();

  /**
   * The link is a link to a photo.
   *
   * \param[in] photo_ The photo.
   */
  explicit linkPreviewTypePhoto(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1362122068;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a Telegram Premium gift code.
 */
class linkPreviewTypePremiumGiftCode final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to a Telegram Premium gift code.
   */
  linkPreviewTypePremiumGiftCode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1309507761;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a dialog for creating of a managed bot.
 */
class linkPreviewTypeRequestManagedBot final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to a dialog for creating of a managed bot.
   */
  linkPreviewTypeRequestManagedBot();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -361102166;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a shareable chat folder.
 */
class linkPreviewTypeShareableChatFolder final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link is a link to a shareable chat folder.
   */
  linkPreviewTypeShareableChatFolder();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2141539524;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a sticker.
 */
class linkPreviewTypeSticker final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The sticker. It can be an arbitrary WEBP image and can have dimensions bigger than 512.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * The link is a link to a sticker.
   */
  linkPreviewTypeSticker();

  /**
   * The link is a link to a sticker.
   *
   * \param[in] sticker_ The sticker. It can be an arbitrary WEBP image and can have dimensions bigger than 512.
   */
  explicit linkPreviewTypeSticker(object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 610225445;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a sticker set.
 */
class linkPreviewTypeStickerSet final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Up to 4 stickers from the sticker set.
  array<object_ptr<sticker>> stickers_;
  static jfieldID stickers_fieldID;

  /**
   * The link is a link to a sticker set.
   */
  linkPreviewTypeStickerSet();

  /**
   * The link is a link to a sticker set.
   *
   * \param[in] stickers_ Up to 4 stickers from the sticker set.
   */
  explicit linkPreviewTypeStickerSet(array<object_ptr<sticker>> &&stickers_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -145958768;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a story. Link preview description is unavailable.
 */
class linkPreviewTypeStory final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * The link is a link to a story. Link preview description is unavailable.
   */
  linkPreviewTypeStory();

  /**
   * The link is a link to a story. Link preview description is unavailable.
   *
   * \param[in] story_poster_chat_id_ The identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  linkPreviewTypeStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1045709531;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an album of stories.
 */
class linkPreviewTypeStoryAlbum final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Icon of the album; may be null if none.
  object_ptr<photo> photo_icon_;
  static jfieldID photo_icon_fieldID;
  /// Video icon of the album; may be null if none.
  object_ptr<video> video_icon_;
  static jfieldID video_icon_fieldID;

  /**
   * The link is a link to an album of stories.
   */
  linkPreviewTypeStoryAlbum();

  /**
   * The link is a link to an album of stories.
   *
   * \param[in] photo_icon_ Icon of the album; may be null if none.
   * \param[in] video_icon_ Video icon of the album; may be null if none.
   */
  linkPreviewTypeStoryAlbum(object_ptr<photo> &&photo_icon_, object_ptr<video> &&video_icon_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1935150441;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to boost a supergroup chat.
 */
class linkPreviewTypeSupergroupBoost final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo of the chat; may be null.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to boost a supergroup chat.
   */
  linkPreviewTypeSupergroupBoost();

  /**
   * The link is a link to boost a supergroup chat.
   *
   * \param[in] photo_ Photo of the chat; may be null.
   */
  explicit linkPreviewTypeSupergroupBoost(object_ptr<chatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1873345418;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a text composition style.
 */
class linkPreviewTypeTextCompositionStyle final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the custom emoji corresponding to the style; 0 if none.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * The link is a link to a text composition style.
   */
  linkPreviewTypeTextCompositionStyle();

  /**
   * The link is a link to a text composition style.
   *
   * \param[in] custom_emoji_id_ Identifier of the custom emoji corresponding to the style; 0 if none.
   */
  explicit linkPreviewTypeTextCompositionStyle(int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2139832927;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a cloud theme. TDLib has no theme support yet.
 */
class linkPreviewTypeTheme final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of files with theme description.
  array<object_ptr<document>> documents_;
  static jfieldID documents_fieldID;
  /// Settings for the cloud theme; may be null if unknown.
  object_ptr<themeSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * The link is a link to a cloud theme. TDLib has no theme support yet.
   */
  linkPreviewTypeTheme();

  /**
   * The link is a link to a cloud theme. TDLib has no theme support yet.
   *
   * \param[in] documents_ The list of files with theme description.
   * \param[in] settings_ Settings for the cloud theme; may be null if unknown.
   */
  linkPreviewTypeTheme(array<object_ptr<document>> &&documents_, object_ptr<themeSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -226118489;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link preview type is unsupported yet.
 */
class linkPreviewTypeUnsupported final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The link preview type is unsupported yet.
   */
  linkPreviewTypeUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1924738233;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to an upgraded gift.
 */
class linkPreviewTypeUpgradedGift final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The link is a link to an upgraded gift.
   */
  linkPreviewTypeUpgradedGift();

  /**
   * The link is a link to an upgraded gift.
   *
   * \param[in] gift_ The gift.
   */
  explicit linkPreviewTypeUpgradedGift(object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 293249807;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a user.
 */
class linkPreviewTypeUser final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo of the user; may be null if none.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// True, if the user is a bot.
  bool is_bot_;
  static jfieldID is_bot_fieldID;

  /**
   * The link is a link to a user.
   */
  linkPreviewTypeUser();

  /**
   * The link is a link to a user.
   *
   * \param[in] photo_ Photo of the user; may be null if none.
   * \param[in] is_bot_ True, if the user is a bot.
   */
  linkPreviewTypeUser(object_ptr<chatPhoto> &&photo_, bool is_bot_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1465024132;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a video.
 */
class linkPreviewTypeVideo final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The video description.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Cover of the video; may be null if none.
  object_ptr<photo> cover_;
  static jfieldID cover_fieldID;
  /// Timestamp from which the video playing must start, in seconds.
  int32 start_timestamp_;
  static jfieldID start_timestamp_fieldID;

  /**
   * The link is a link to a video.
   */
  linkPreviewTypeVideo();

  /**
   * The link is a link to a video.
   *
   * \param[in] video_ The video description.
   * \param[in] cover_ Cover of the video; may be null if none.
   * \param[in] start_timestamp_ Timestamp from which the video playing must start, in seconds.
   */
  linkPreviewTypeVideo(object_ptr<video> &&video_, object_ptr<photo> &&cover_, int32 start_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1573057926;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a video chat.
 */
class linkPreviewTypeVideoChat final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo of the chat with the video chat; may be null if none.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// True, if the video chat is expected to be a live stream in a channel or a broadcast group.
  bool is_live_stream_;
  static jfieldID is_live_stream_fieldID;
  /// True, if the user can use the link to join the video chat without being muted by administrators.
  bool joins_as_speaker_;
  static jfieldID joins_as_speaker_fieldID;

  /**
   * The link is a link to a video chat.
   */
  linkPreviewTypeVideoChat();

  /**
   * The link is a link to a video chat.
   *
   * \param[in] photo_ Photo of the chat with the video chat; may be null if none.
   * \param[in] is_live_stream_ True, if the video chat is expected to be a live stream in a channel or a broadcast group.
   * \param[in] joins_as_speaker_ True, if the user can use the link to join the video chat without being muted by administrators.
   */
  linkPreviewTypeVideoChat(object_ptr<chatPhoto> &&photo_, bool is_live_stream_, bool joins_as_speaker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -295676354;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a video note message.
 */
class linkPreviewTypeVideoNote final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The video note.
  object_ptr<videoNote> video_note_;
  static jfieldID video_note_fieldID;

  /**
   * The link is a link to a video note message.
   */
  linkPreviewTypeVideoNote();

  /**
   * The link is a link to a video note message.
   *
   * \param[in] video_note_ The video note.
   */
  explicit linkPreviewTypeVideoNote(object_ptr<videoNote> &&video_note_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -814687391;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a voice note message.
 */
class linkPreviewTypeVoiceNote final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The voice note.
  object_ptr<voiceNote> voice_note_;
  static jfieldID voice_note_fieldID;

  /**
   * The link is a link to a voice note message.
   */
  linkPreviewTypeVoiceNote();

  /**
   * The link is a link to a voice note message.
   *
   * \param[in] voice_note_ The voice note.
   */
  explicit linkPreviewTypeVoiceNote(object_ptr<voiceNote> &&voice_note_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -757936341;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The link is a link to a Web App.
 */
class linkPreviewTypeWebApp final : public LinkPreviewType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Web App photo; may be null if none.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * The link is a link to a Web App.
   */
  linkPreviewTypeWebApp();

  /**
   * The link is a link to a Web App.
   *
   * \param[in] photo_ Web App photo; may be null if none.
   */
  explicit linkPreviewTypeWebApp(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1506873462;

  static object_ptr<LinkPreviewType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class paidReactor;

/**
 * Contains a list of users and chats that spend most money on paid messages and reactions in a live story.
 */
class liveStoryDonors final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total amount of spend Telegram Stars.
  int53 total_star_count_;
  static jfieldID total_star_count_fieldID;
  /// List of top donors in the live story.
  array<object_ptr<paidReactor>> top_donors_;
  static jfieldID top_donors_fieldID;

  /**
   * Contains a list of users and chats that spend most money on paid messages and reactions in a live story.
   */
  liveStoryDonors();

  /**
   * Contains a list of users and chats that spend most money on paid messages and reactions in a live story.
   *
   * \param[in] total_star_count_ Total amount of spend Telegram Stars.
   * \param[in] top_donors_ List of top donors in the live story.
   */
  liveStoryDonors(int53 total_star_count_, array<object_ptr<paidReactor>> &&top_donors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1254388193;

  static object_ptr<liveStoryDonors> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a local file.
 */
class localFile final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Local path to the locally available file part; may be empty.
  string path_;
  static jfieldID path_fieldID;
  /// True, if it is possible to download or generate the file.
  bool can_be_downloaded_;
  static jfieldID can_be_downloaded_fieldID;
  /// True, if the file can be deleted.
  bool can_be_deleted_;
  static jfieldID can_be_deleted_fieldID;
  /// True, if the file is currently being downloaded (or a local copy is being generated by some other means).
  bool is_downloading_active_;
  static jfieldID is_downloading_active_fieldID;
  /// True, if the local copy is fully available.
  bool is_downloading_completed_;
  static jfieldID is_downloading_completed_fieldID;
  /// Download will be started from this offset. downloaded_prefix_size is calculated from this offset.
  int53 download_offset_;
  static jfieldID download_offset_fieldID;
  /// If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes.
  int53 downloaded_prefix_size_;
  static jfieldID downloaded_prefix_size_fieldID;
  /// Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage.
  int53 downloaded_size_;
  static jfieldID downloaded_size_fieldID;

  /**
   * Represents a local file.
   */
  localFile();

  /**
   * Represents a local file.
   *
   * \param[in] path_ Local path to the locally available file part; may be empty.
   * \param[in] can_be_downloaded_ True, if it is possible to download or generate the file.
   * \param[in] can_be_deleted_ True, if the file can be deleted.
   * \param[in] is_downloading_active_ True, if the file is currently being downloaded (or a local copy is being generated by some other means).
   * \param[in] is_downloading_completed_ True, if the local copy is fully available.
   * \param[in] download_offset_ Download will be started from this offset. downloaded_prefix_size is calculated from this offset.
   * \param[in] downloaded_prefix_size_ If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes.
   * \param[in] downloaded_size_ Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage.
   */
  localFile(string const &path_, bool can_be_downloaded_, bool can_be_deleted_, bool is_downloading_active_, bool is_downloading_completed_, int53 download_offset_, int53 downloaded_prefix_size_, int53 downloaded_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1562732153;

  static object_ptr<localFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class languagePackInfo;

/**
 * Contains information about the current localization target.
 */
class localizationTargetInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of available language packs for this application.
  array<object_ptr<languagePackInfo>> language_packs_;
  static jfieldID language_packs_fieldID;

  /**
   * Contains information about the current localization target.
   */
  localizationTargetInfo();

  /**
   * Contains information about the current localization target.
   *
   * \param[in] language_packs_ List of available language packs for this application.
   */
  explicit localizationTargetInfo(array<object_ptr<languagePackInfo>> &&language_packs_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2048670809;

  static object_ptr<localizationTargetInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a location on planet Earth.
 */
class location final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Latitude of the location in degrees; as defined by the sender.
  double latitude_;
  static jfieldID latitude_fieldID;
  /// Longitude of the location, in degrees; as defined by the sender.
  double longitude_;
  static jfieldID longitude_fieldID;
  /// The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown.
  double horizontal_accuracy_;
  static jfieldID horizontal_accuracy_fieldID;

  /**
   * Describes a location on planet Earth.
   */
  location();

  /**
   * Describes a location on planet Earth.
   *
   * \param[in] latitude_ Latitude of the location in degrees; as defined by the sender.
   * \param[in] longitude_ Longitude of the location, in degrees; as defined by the sender.
   * \param[in] horizontal_accuracy_ The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown.
   */
  location(double latitude_, double longitude_, double horizontal_accuracy_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -443392141;

  static object_ptr<location> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an address of a location.
 */
class locationAddress final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  static jfieldID country_code_fieldID;
  /// State, if applicable; empty if unknown.
  string state_;
  static jfieldID state_fieldID;
  /// City; empty if unknown.
  string city_;
  static jfieldID city_fieldID;
  /// The address; empty if unknown.
  string street_;
  static jfieldID street_fieldID;

  /**
   * Describes an address of a location.
   */
  locationAddress();

  /**
   * Describes an address of a location.
   *
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code.
   * \param[in] state_ State, if applicable; empty if unknown.
   * \param[in] city_ City; empty if unknown.
   * \param[in] street_ The address; empty if unknown.
   */
  locationAddress(string const &country_code_, string const &state_, string const &city_, string const &street_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1545940190;

  static object_ptr<locationAddress> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a stream to which TDLib internal log is written.
 */
class LogStream: public Object {
 public:
  static jclass Class;

  static object_ptr<LogStream> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The log is written to stderr or an OS specific log.
 */
class logStreamDefault final : public LogStream {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The log is written to stderr or an OS specific log.
   */
  logStreamDefault();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1390581436;

  static object_ptr<LogStream> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The log is written to a file.
 */
class logStreamFile final : public LogStream {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Path to the file to where the internal TDLib log will be written.
  string path_;
  static jfieldID path_fieldID;
  /// The maximum size of the file to where the internal TDLib log is written before the file will automatically be rotated, in bytes.
  int53 max_file_size_;
  static jfieldID max_file_size_fieldID;
  /// Pass true to additionally redirect stderr to the log file. Ignored on Windows.
  bool redirect_stderr_;
  static jfieldID redirect_stderr_fieldID;

  /**
   * The log is written to a file.
   */
  logStreamFile();

  /**
   * The log is written to a file.
   *
   * \param[in] path_ Path to the file to where the internal TDLib log will be written.
   * \param[in] max_file_size_ The maximum size of the file to where the internal TDLib log is written before the file will automatically be rotated, in bytes.
   * \param[in] redirect_stderr_ Pass true to additionally redirect stderr to the log file. Ignored on Windows.
   */
  logStreamFile(string const &path_, int53 max_file_size_, bool redirect_stderr_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1532136933;

  static object_ptr<LogStream> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The log is written nowhere.
 */
class logStreamEmpty final : public LogStream {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The log is written nowhere.
   */
  logStreamEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -499912244;

  static object_ptr<LogStream> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a list of available TDLib internal log tags.
 */
class logTags final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of log tags.
  array<string> tags_;
  static jfieldID tags_fieldID;

  /**
   * Contains a list of available TDLib internal log tags.
   */
  logTags();

  /**
   * Contains a list of available TDLib internal log tags.
   *
   * \param[in] tags_ List of log tags.
   */
  explicit logTags(array<string> &&tags_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1604930601;

  static object_ptr<logTags> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a TDLib internal log verbosity level.
 */
class logVerbosityLevel final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Log verbosity level.
  int32 verbosity_level_;
  static jfieldID verbosity_level_fieldID;

  /**
   * Contains a TDLib internal log verbosity level.
   */
  logVerbosityLevel();

  /**
   * Contains a TDLib internal log verbosity level.
   *
   * \param[in] verbosity_level_ Log verbosity level.
   */
  explicit logVerbosityLevel(int32 verbosity_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1734624234;

  static object_ptr<logVerbosityLevel> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl or an external link.
 */
class LoginUrlInfo: public Object {
 public:
  static jclass Class;

  static object_ptr<LoginUrlInfo> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An HTTP URL needs to be open.
 */
class loginUrlInfoOpen final : public LoginUrlInfo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The URL to open.
  string url_;
  static jfieldID url_fieldID;
  /// True, if there is no need to show an ordinary open URL confirmation.
  bool skip_confirmation_;
  static jfieldID skip_confirmation_fieldID;

  /**
   * An HTTP URL needs to be open.
   */
  loginUrlInfoOpen();

  /**
   * An HTTP URL needs to be open.
   *
   * \param[in] url_ The URL to open.
   * \param[in] skip_confirmation_ True, if there is no need to show an ordinary open URL confirmation.
   */
  loginUrlInfoOpen(string const &url_, bool skip_confirmation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 837282306;

  static object_ptr<LoginUrlInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An authorization confirmation dialog needs to be shown to the user.
 */
class loginUrlInfoRequestConfirmation final : public LoginUrlInfo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An HTTP URL to be opened.
  string url_;
  static jfieldID url_fieldID;
  /// A domain of the URL.
  string domain_;
  static jfieldID domain_fieldID;
  /// User identifier of a bot linked with the website.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// True, if the user must be asked for the permission to the bot to send them messages.
  bool request_write_access_;
  static jfieldID request_write_access_fieldID;

  /**
   * An authorization confirmation dialog needs to be shown to the user.
   */
  loginUrlInfoRequestConfirmation();

  /**
   * An authorization confirmation dialog needs to be shown to the user.
   *
   * \param[in] url_ An HTTP URL to be opened.
   * \param[in] domain_ A domain of the URL.
   * \param[in] bot_user_id_ User identifier of a bot linked with the website.
   * \param[in] request_write_access_ True, if the user must be asked for the permission to the bot to send them messages.
   */
  loginUrlInfoRequestConfirmation(string const &url_, string const &domain_, int53 bot_user_id_, bool request_write_access_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2128290863;

  static object_ptr<LoginUrlInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class WebAppOpenMode;

/**
 * Contains information about the main Web App of a bot.
 */
class mainWebApp final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the Web App to open.
  string url_;
  static jfieldID url_fieldID;
  /// The mode in which the Web App must be opened.
  object_ptr<WebAppOpenMode> mode_;
  static jfieldID mode_fieldID;

  /**
   * Contains information about the main Web App of a bot.
   */
  mainWebApp();

  /**
   * Contains information about the main Web App of a bot.
   *
   * \param[in] url_ URL of the Web App to open.
   * \param[in] mode_ The mode in which the Web App must be opened.
   */
  mainWebApp(string const &url_, object_ptr<WebAppOpenMode> &&mode_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1940368506;

  static object_ptr<mainWebApp> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Part of the face, relative to which a mask is placed.
 */
class MaskPoint: public Object {
 public:
  static jclass Class;

  static object_ptr<MaskPoint> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The mask is placed relatively to the forehead.
 */
class maskPointForehead final : public MaskPoint {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The mask is placed relatively to the forehead.
   */
  maskPointForehead();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1027512005;

  static object_ptr<MaskPoint> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The mask is placed relatively to the eyes.
 */
class maskPointEyes final : public MaskPoint {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The mask is placed relatively to the eyes.
   */
  maskPointEyes();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1748310861;

  static object_ptr<MaskPoint> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The mask is placed relatively to the mouth.
 */
class maskPointMouth final : public MaskPoint {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The mask is placed relatively to the mouth.
   */
  maskPointMouth();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 411773406;

  static object_ptr<MaskPoint> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The mask is placed relatively to the chin.
 */
class maskPointChin final : public MaskPoint {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The mask is placed relatively to the chin.
   */
  maskPointChin();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 534995335;

  static object_ptr<MaskPoint> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MaskPoint;

/**
 * Position on a photo where a mask is placed.
 */
class maskPosition final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Part of the face, relative to which the mask is placed.
  object_ptr<MaskPoint> point_;
  static jfieldID point_fieldID;
  /// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position.)
  double x_shift_;
  static jfieldID x_shift_fieldID;
  /// Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position.)
  double y_shift_;
  static jfieldID y_shift_fieldID;
  /// Mask scaling coefficient. (For example, 2.0 means a doubled size.)
  double scale_;
  static jfieldID scale_fieldID;

  /**
   * Position on a photo where a mask is placed.
   */
  maskPosition();

  /**
   * Position on a photo where a mask is placed.
   *
   * \param[in] point_ Part of the face, relative to which the mask is placed.
   * \param[in] x_shift_ Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position.)
   * \param[in] y_shift_ Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position.)
   * \param[in] scale_ Mask scaling coefficient. (For example, 2.0 means a doubled size.)
   */
  maskPosition(object_ptr<MaskPoint> &&point_, double x_shift_, double y_shift_, double scale_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2097433026;

  static object_ptr<maskPosition> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageContent;

class MessageReplyTo;

class MessageSchedulingState;

class MessageSelfDestructType;

class MessageSender;

class MessageSendingState;

class MessageTopic;

class ReplyMarkup;

class factCheck;

class messageForwardInfo;

class messageImportInfo;

class messageInteractionInfo;

class restrictionInfo;

class suggestedPostInfo;

class unreadReaction;

/**
 * Describes a message.
 */
class message final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message identifier; unique for the chat to which the message belongs.
  int53 id_;
  static jfieldID id_fieldID;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
  object_ptr<MessageSendingState> sending_state_;
  static jfieldID sending_state_fieldID;
  /// The scheduling state of the message; may be null if the message isn't scheduled.
  object_ptr<MessageSchedulingState> scheduling_state_;
  static jfieldID scheduling_state_fieldID;
  /// True, if the message is outgoing.
  bool is_outgoing_;
  static jfieldID is_outgoing_fieldID;
  /// True, if the message is pinned.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;
  /// True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message.
  bool is_from_offline_;
  static jfieldID is_from_offline_fieldID;
  /// True, if content of the message can be saved locally.
  bool can_be_saved_;
  static jfieldID can_be_saved_fieldID;
  /// True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
  bool has_timestamped_media_;
  static jfieldID has_timestamped_media_fieldID;
  /// True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
  bool is_channel_post_;
  static jfieldID is_channel_post_fieldID;
  /// True, if the message is a suggested channel post which was paid in Telegram Stars; a warning must be shown if the message is deleted in less than getOption(&quot;suggested_post_lifetime_min&quot;) seconds after sending.
  bool is_paid_star_suggested_post_;
  static jfieldID is_paid_star_suggested_post_fieldID;
  /// True, if the message is a suggested channel post which was paid in Toncoins; a warning must be shown if the message is deleted in less than getOption(&quot;suggested_post_lifetime_min&quot;) seconds after sending.
  bool is_paid_ton_suggested_post_;
  static jfieldID is_paid_ton_suggested_post_fieldID;
  /// True, if the message contains an unread mention for the current user.
  bool contains_unread_mention_;
  static jfieldID contains_unread_mention_fieldID;
  /// True, if the message is a poll message with unread votes.
  bool contains_unread_poll_votes_;
  static jfieldID contains_unread_poll_votes_fieldID;
  /// Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages.
  int32 date_;
  static jfieldID date_fieldID;
  /// Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages.
  int32 edit_date_;
  static jfieldID edit_date_fieldID;
  /// Information about the initial message sender; may be null if none or unknown.
  object_ptr<messageForwardInfo> forward_info_;
  static jfieldID forward_info_fieldID;
  /// Information about the initial message for messages created with importMessages; may be null if the message isn't imported.
  object_ptr<messageImportInfo> import_info_;
  static jfieldID import_info_fieldID;
  /// Information about interactions with the message; may be null if none.
  object_ptr<messageInteractionInfo> interaction_info_;
  static jfieldID interaction_info_fieldID;
  /// Information about unread reactions added to the message.
  array<object_ptr<unreadReaction>> unread_reactions_;
  static jfieldID unread_reactions_fieldID;
  /// Information about fact-check added to the message; may be null if none.
  object_ptr<factCheck> fact_check_;
  static jfieldID fact_check_fieldID;
  /// Information about the suggested post; may be null if the message isn't a suggested post.
  object_ptr<suggestedPostInfo> suggested_post_info_;
  static jfieldID suggested_post_info_fieldID;
  /// Information about the message or the story this message is replying to; may be null if none.
  object_ptr<MessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Identifier of the topic within the chat to which the message belongs; may be null if none; may change when the chat is converted to a forum or back.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// The message's self-destruct type; may be null if none.
  object_ptr<MessageSelfDestructType> self_destruct_type_;
  static jfieldID self_destruct_type_fieldID;
  /// Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet.
  double self_destruct_in_;
  static jfieldID self_destruct_in_fieldID;
  /// Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never.
  double auto_delete_in_;
  static jfieldID auto_delete_in_fieldID;
  /// If non-zero, the user identifier of the inline bot through which this message was sent.
  int53 via_bot_user_id_;
  static jfieldID via_bot_user_id_fieldID;
  /// The identifier of the user or chat which used a guest bot to send the message; may be null if none.
  object_ptr<MessageSender> guest_bot_caller_id_;
  static jfieldID guest_bot_caller_id_fieldID;
  /// If non-zero, the user identifier of the business bot that sent this message.
  int53 sender_business_bot_user_id_;
  static jfieldID sender_business_bot_user_id_fieldID;
  /// Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead.
  int32 sender_boost_count_;
  static jfieldID sender_boost_count_fieldID;
  /// Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or supergroup administrators, the current custom title or tag must be used instead.
  string sender_tag_;
  static jfieldID sender_tag_fieldID;
  /// The number of Telegram Stars the sender paid to send the message.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;
  /// For channel posts and anonymous group messages, optional author signature.
  string author_signature_;
  static jfieldID author_signature_fieldID;
  /// Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.
  int64 media_album_id_;
  static jfieldID media_album_id_fieldID;
  /// Unique identifier of the effect added to the message; 0 if none.
  int64 effect_id_;
  static jfieldID effect_id_fieldID;
  /// Information about the restrictions that must be applied to the message content; may be null if none.
  object_ptr<restrictionInfo> restriction_info_;
  static jfieldID restriction_info_fieldID;
  /// IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message.
  string summary_language_code_;
  static jfieldID summary_language_code_fieldID;
  /// Content of the message.
  object_ptr<MessageContent> content_;
  static jfieldID content_fieldID;
  /// Reply markup for the message; may be null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Describes a message.
   */
  message();

  /**
   * Describes a message.
   *
   * \param[in] id_ Message identifier; unique for the chat to which the message belongs.
   * \param[in] sender_id_ Identifier of the sender of the message.
   * \param[in] chat_id_ Chat identifier.
   * \param[in] sending_state_ The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
   * \param[in] scheduling_state_ The scheduling state of the message; may be null if the message isn't scheduled.
   * \param[in] is_outgoing_ True, if the message is outgoing.
   * \param[in] is_pinned_ True, if the message is pinned.
   * \param[in] is_from_offline_ True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message.
   * \param[in] can_be_saved_ True, if content of the message can be saved locally.
   * \param[in] has_timestamped_media_ True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
   * \param[in] is_channel_post_ True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
   * \param[in] is_paid_star_suggested_post_ True, if the message is a suggested channel post which was paid in Telegram Stars; a warning must be shown if the message is deleted in less than getOption(&quot;suggested_post_lifetime_min&quot;) seconds after sending.
   * \param[in] is_paid_ton_suggested_post_ True, if the message is a suggested channel post which was paid in Toncoins; a warning must be shown if the message is deleted in less than getOption(&quot;suggested_post_lifetime_min&quot;) seconds after sending.
   * \param[in] contains_unread_mention_ True, if the message contains an unread mention for the current user.
   * \param[in] contains_unread_poll_votes_ True, if the message is a poll message with unread votes.
   * \param[in] date_ Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages.
   * \param[in] edit_date_ Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages.
   * \param[in] forward_info_ Information about the initial message sender; may be null if none or unknown.
   * \param[in] import_info_ Information about the initial message for messages created with importMessages; may be null if the message isn't imported.
   * \param[in] interaction_info_ Information about interactions with the message; may be null if none.
   * \param[in] unread_reactions_ Information about unread reactions added to the message.
   * \param[in] fact_check_ Information about fact-check added to the message; may be null if none.
   * \param[in] suggested_post_info_ Information about the suggested post; may be null if the message isn't a suggested post.
   * \param[in] reply_to_ Information about the message or the story this message is replying to; may be null if none.
   * \param[in] topic_id_ Identifier of the topic within the chat to which the message belongs; may be null if none; may change when the chat is converted to a forum or back.
   * \param[in] self_destruct_type_ The message's self-destruct type; may be null if none.
   * \param[in] self_destruct_in_ Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet.
   * \param[in] auto_delete_in_ Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never.
   * \param[in] via_bot_user_id_ If non-zero, the user identifier of the inline bot through which this message was sent.
   * \param[in] guest_bot_caller_id_ The identifier of the user or chat which used a guest bot to send the message; may be null if none.
   * \param[in] sender_business_bot_user_id_ If non-zero, the user identifier of the business bot that sent this message.
   * \param[in] sender_boost_count_ Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead.
   * \param[in] sender_tag_ Tag of the sender of the message in the supergroup at the time the message was sent; may be empty if none or unknown. For messages sent in basic groups or supergroup administrators, the current custom title or tag must be used instead.
   * \param[in] paid_message_star_count_ The number of Telegram Stars the sender paid to send the message.
   * \param[in] author_signature_ For channel posts and anonymous group messages, optional author signature.
   * \param[in] media_album_id_ Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.
   * \param[in] effect_id_ Unique identifier of the effect added to the message; 0 if none.
   * \param[in] restriction_info_ Information about the restrictions that must be applied to the message content; may be null if none.
   * \param[in] summary_language_code_ IETF language tag of the message language on which it can be summarized; empty if summary isn't available for the message.
   * \param[in] content_ Content of the message.
   * \param[in] reply_markup_ Reply markup for the message; may be null if none.
   */
  message(int53 id_, object_ptr<MessageSender> &&sender_id_, int53 chat_id_, object_ptr<MessageSendingState> &&sending_state_, object_ptr<MessageSchedulingState> &&scheduling_state_, bool is_outgoing_, bool is_pinned_, bool is_from_offline_, bool can_be_saved_, bool has_timestamped_media_, bool is_channel_post_, bool is_paid_star_suggested_post_, bool is_paid_ton_suggested_post_, bool contains_unread_mention_, bool contains_unread_poll_votes_, int32 date_, int32 edit_date_, object_ptr<messageForwardInfo> &&forward_info_, object_ptr<messageImportInfo> &&import_info_, object_ptr<messageInteractionInfo> &&interaction_info_, array<object_ptr<unreadReaction>> &&unread_reactions_, object_ptr<factCheck> &&fact_check_, object_ptr<suggestedPostInfo> &&suggested_post_info_, object_ptr<MessageReplyTo> &&reply_to_, object_ptr<MessageTopic> &&topic_id_, object_ptr<MessageSelfDestructType> &&self_destruct_type_, double self_destruct_in_, double auto_delete_in_, int53 via_bot_user_id_, object_ptr<MessageSender> &&guest_bot_caller_id_, int53 sender_business_bot_user_id_, int32 sender_boost_count_, string const &sender_tag_, int53 paid_message_star_count_, string const &author_signature_, int64 media_album_id_, int64 effect_id_, object_ptr<restrictionInfo> &&restriction_info_, string const &summary_language_code_, object_ptr<MessageContent> &&content_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -609581767;

  static object_ptr<message> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains default auto-delete timer setting for new chats.
 */
class messageAutoDeleteTime final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message auto-delete time, in seconds. If 0, then messages aren't deleted automatically.
  int32 time_;
  static jfieldID time_fieldID;

  /**
   * Contains default auto-delete timer setting for new chats.
   */
  messageAutoDeleteTime();

  /**
   * Contains default auto-delete timer setting for new chats.
   *
   * \param[in] time_ Message auto-delete time, in seconds. If 0, then messages aren't deleted automatically.
   */
  explicit messageAutoDeleteTime(int32 time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1972045589;

  static object_ptr<messageAutoDeleteTime> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class messageCalendarDay;

/**
 * Contains information about found messages, split by days according to the option &quot;utc_time_offset&quot;.
 */
class messageCalendar final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of found messages.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Information about messages sent.
  array<object_ptr<messageCalendarDay>> days_;
  static jfieldID days_fieldID;

  /**
   * Contains information about found messages, split by days according to the option &quot;utc_time_offset&quot;.
   */
  messageCalendar();

  /**
   * Contains information about found messages, split by days according to the option &quot;utc_time_offset&quot;.
   *
   * \param[in] total_count_ Total number of found messages.
   * \param[in] days_ Information about messages sent.
   */
  messageCalendar(int32 total_count_, array<object_ptr<messageCalendarDay>> &&days_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1682890519;

  static object_ptr<messageCalendar> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Contains information about found messages sent on a specific day.
 */
class messageCalendarDay final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of found messages sent on the day.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// First message sent on the day.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * Contains information about found messages sent on a specific day.
   */
  messageCalendarDay();

  /**
   * Contains information about found messages sent on a specific day.
   *
   * \param[in] total_count_ Total number of found messages sent on the day.
   * \param[in] message_ First message sent on the day.
   */
  messageCalendarDay(int32 total_count_, object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -376467614;

  static object_ptr<messageCalendarDay> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BotWriteAccessAllowReason;

class CallDiscardReason;

class ChatTheme;

class DiceStickers;

class GiftPurchaseOfferState;

class GiftResalePrice;

class GiveawayPrize;

class MessageContent;

class MessageSender;

class PaidMedia;

class PassportElementType;

class SuggestedPostPrice;

class SuggestedPostRefundReason;

class UpgradedGiftOrigin;

class alternativeVideo;

class animatedEmoji;

class animation;

class audio;

class birthdate;

class chatBackground;

class chatPhoto;

class checklist;

class checklistTask;

class contact;

class document;

class encryptedCredentials;

class encryptedPassportElement;

class formattedText;

class forumTopicIcon;

class game;

class gift;

class giveawayParameters;

class linkPreview;

class linkPreviewOptions;

class location;

class orderInfo;

class photo;

class poll;

class productInfo;

class sharedChat;

class sharedUser;

class starAmount;

class sticker;

class upgradedGift;

class venue;

class video;

class videoNote;

class videoStoryboard;

class voiceNote;

/**
 * This class is an abstract base class.
 * Contains the content of a message.
 */
class MessageContent: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A text message.
 */
class messageText final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the message.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// A link preview attached to the message; may be null.
  object_ptr<linkPreview> link_preview_;
  static jfieldID link_preview_fieldID;
  /// Options which were used for generation of the link preview; may be null if default options were used.
  object_ptr<linkPreviewOptions> link_preview_options_;
  static jfieldID link_preview_options_fieldID;

  /**
   * A text message.
   */
  messageText();

  /**
   * A text message.
   *
   * \param[in] text_ Text of the message.
   * \param[in] link_preview_ A link preview attached to the message; may be null.
   * \param[in] link_preview_options_ Options which were used for generation of the link preview; may be null if default options were used.
   */
  messageText(object_ptr<formattedText> &&text_, object_ptr<linkPreview> &&link_preview_, object_ptr<linkPreviewOptions> &&link_preview_options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1751469188;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An animation message (GIF-style).
 */
class messageAnimation final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animation description.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;
  /// Animation caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the animation; otherwise, the caption must be shown below the animation.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// True, if the animation preview must be covered by a spoiler animation.
  bool has_spoiler_;
  static jfieldID has_spoiler_fieldID;
  /// True, if the animation thumbnail must be blurred and the animation must be shown only while tapped.
  bool is_secret_;
  static jfieldID is_secret_fieldID;

  /**
   * An animation message (GIF-style).
   */
  messageAnimation();

  /**
   * An animation message (GIF-style).
   *
   * \param[in] animation_ The animation description.
   * \param[in] caption_ Animation caption.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the animation; otherwise, the caption must be shown below the animation.
   * \param[in] has_spoiler_ True, if the animation preview must be covered by a spoiler animation.
   * \param[in] is_secret_ True, if the animation thumbnail must be blurred and the animation must be shown only while tapped.
   */
  messageAnimation(object_ptr<animation> &&animation_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, bool has_spoiler_, bool is_secret_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1899294424;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An audio message.
 */
class messageAudio final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The audio description.
  object_ptr<audio> audio_;
  static jfieldID audio_fieldID;
  /// Audio caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;

  /**
   * An audio message.
   */
  messageAudio();

  /**
   * An audio message.
   *
   * \param[in] audio_ The audio description.
   * \param[in] caption_ Audio caption.
   */
  messageAudio(object_ptr<audio> &&audio_, object_ptr<formattedText> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 276722716;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A document message (general file).
 */
class messageDocument final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The document description.
  object_ptr<document> document_;
  static jfieldID document_fieldID;
  /// Document caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;

  /**
   * A document message (general file).
   */
  messageDocument();

  /**
   * A document message (general file).
   *
   * \param[in] document_ The document description.
   * \param[in] caption_ Document caption.
   */
  messageDocument(object_ptr<document> &&document_, object_ptr<formattedText> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 596945783;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with paid media.
 */
class messagePaidMedia final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars needed to buy access to the media in the message.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Information about the media.
  array<object_ptr<PaidMedia>> media_;
  static jfieldID media_fieldID;
  /// Media caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the media; otherwise, the caption must be shown below the media.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;

  /**
   * A message with paid media.
   */
  messagePaidMedia();

  /**
   * A message with paid media.
   *
   * \param[in] star_count_ Number of Telegram Stars needed to buy access to the media in the message.
   * \param[in] media_ Information about the media.
   * \param[in] caption_ Media caption.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the media; otherwise, the caption must be shown below the media.
   */
  messagePaidMedia(int53 star_count_, array<object_ptr<PaidMedia>> &&media_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -724750073;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo message.
 */
class messagePhoto final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// The video representing the live photo; may be null if the photo is static.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Photo caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the photo; otherwise, the caption must be shown below the photo.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// True, if the photo preview must be covered by a spoiler animation.
  bool has_spoiler_;
  static jfieldID has_spoiler_fieldID;
  /// True, if the photo must be blurred and must be shown only while tapped.
  bool is_secret_;
  static jfieldID is_secret_fieldID;

  /**
   * A photo message.
   */
  messagePhoto();

  /**
   * A photo message.
   *
   * \param[in] photo_ The photo.
   * \param[in] video_ The video representing the live photo; may be null if the photo is static.
   * \param[in] caption_ Photo caption.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the photo; otherwise, the caption must be shown below the photo.
   * \param[in] has_spoiler_ True, if the photo preview must be covered by a spoiler animation.
   * \param[in] is_secret_ True, if the photo must be blurred and must be shown only while tapped.
   */
  messagePhoto(object_ptr<photo> &&photo_, object_ptr<video> &&video_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, bool has_spoiler_, bool is_secret_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1512013306;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A sticker message.
 */
class messageSticker final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The sticker description.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// True, if premium animation of the sticker must be played.
  bool is_premium_;
  static jfieldID is_premium_fieldID;

  /**
   * A sticker message.
   */
  messageSticker();

  /**
   * A sticker message.
   *
   * \param[in] sticker_ The sticker description.
   * \param[in] is_premium_ True, if premium animation of the sticker must be played.
   */
  messageSticker(object_ptr<sticker> &&sticker_, bool is_premium_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -437199670;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video message.
 */
class messageVideo final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The video description.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Alternative qualities of the video.
  array<object_ptr<alternativeVideo>> alternative_videos_;
  static jfieldID alternative_videos_fieldID;
  /// Available storyboards for the video.
  array<object_ptr<videoStoryboard>> storyboards_;
  static jfieldID storyboards_fieldID;
  /// Cover of the video; may be null if none.
  object_ptr<photo> cover_;
  static jfieldID cover_fieldID;
  /// Timestamp from which the video playing must start, in seconds.
  int32 start_timestamp_;
  static jfieldID start_timestamp_fieldID;
  /// Video caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if the caption must be shown above the video; otherwise, the caption must be shown below the video.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;
  /// True, if the video preview must be covered by a spoiler animation.
  bool has_spoiler_;
  static jfieldID has_spoiler_fieldID;
  /// True, if the video thumbnail must be blurred and the video must be shown only while tapped.
  bool is_secret_;
  static jfieldID is_secret_fieldID;

  /**
   * A video message.
   */
  messageVideo();

  /**
   * A video message.
   *
   * \param[in] video_ The video description.
   * \param[in] alternative_videos_ Alternative qualities of the video.
   * \param[in] storyboards_ Available storyboards for the video.
   * \param[in] cover_ Cover of the video; may be null if none.
   * \param[in] start_timestamp_ Timestamp from which the video playing must start, in seconds.
   * \param[in] caption_ Video caption.
   * \param[in] show_caption_above_media_ True, if the caption must be shown above the video; otherwise, the caption must be shown below the video.
   * \param[in] has_spoiler_ True, if the video preview must be covered by a spoiler animation.
   * \param[in] is_secret_ True, if the video thumbnail must be blurred and the video must be shown only while tapped.
   */
  messageVideo(object_ptr<video> &&video_, array<object_ptr<alternativeVideo>> &&alternative_videos_, array<object_ptr<videoStoryboard>> &&storyboards_, object_ptr<photo> &&cover_, int32 start_timestamp_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_, bool has_spoiler_, bool is_secret_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 952522912;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video note message.
 */
class messageVideoNote final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The video note description.
  object_ptr<videoNote> video_note_;
  static jfieldID video_note_fieldID;
  /// True, if at least one of the recipients has viewed the video note.
  bool is_viewed_;
  static jfieldID is_viewed_fieldID;
  /// True, if the video note thumbnail must be blurred and the video note must be shown only while tapped.
  bool is_secret_;
  static jfieldID is_secret_fieldID;

  /**
   * A video note message.
   */
  messageVideoNote();

  /**
   * A video note message.
   *
   * \param[in] video_note_ The video note description.
   * \param[in] is_viewed_ True, if at least one of the recipients has viewed the video note.
   * \param[in] is_secret_ True, if the video note thumbnail must be blurred and the video note must be shown only while tapped.
   */
  messageVideoNote(object_ptr<videoNote> &&video_note_, bool is_viewed_, bool is_secret_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 963323014;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A voice note message.
 */
class messageVoiceNote final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The voice note description.
  object_ptr<voiceNote> voice_note_;
  static jfieldID voice_note_fieldID;
  /// Voice note caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// True, if at least one of the recipients has listened to the voice note.
  bool is_listened_;
  static jfieldID is_listened_fieldID;

  /**
   * A voice note message.
   */
  messageVoiceNote();

  /**
   * A voice note message.
   *
   * \param[in] voice_note_ The voice note description.
   * \param[in] caption_ Voice note caption.
   * \param[in] is_listened_ True, if at least one of the recipients has listened to the voice note.
   */
  messageVoiceNote(object_ptr<voiceNote> &&voice_note_, object_ptr<formattedText> &&caption_, bool is_listened_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 527777781;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A self-destructed photo message.
 */
class messageExpiredPhoto final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A self-destructed photo message.
   */
  messageExpiredPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1404641801;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A self-destructed video message.
 */
class messageExpiredVideo final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A self-destructed video message.
   */
  messageExpiredVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1212209981;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A self-destructed video note message.
 */
class messageExpiredVideoNote final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A self-destructed video note message.
   */
  messageExpiredVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 599540711;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A self-destructed voice note message.
 */
class messageExpiredVoiceNote final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A self-destructed voice note message.
   */
  messageExpiredVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 143684989;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a location.
 */
class messageLocation final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The location description.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Time relative to the message send date, for which the location can be updated, in seconds; if 0x7FFFFFFF, then location can be updated forever.
  int32 live_period_;
  static jfieldID live_period_fieldID;
  /// Left time for which the location can be updated, in seconds. If 0, then the location can't be updated anymore. The update updateMessageContent is not sent when this field changes.
  int32 expires_in_;
  static jfieldID expires_in_fieldID;
  /// For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown.
  int32 heading_;
  static jfieldID heading_fieldID;
  /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only to the message sender.
  int32 proximity_alert_radius_;
  static jfieldID proximity_alert_radius_fieldID;

  /**
   * A message with a location.
   */
  messageLocation();

  /**
   * A message with a location.
   *
   * \param[in] location_ The location description.
   * \param[in] live_period_ Time relative to the message send date, for which the location can be updated, in seconds; if 0x7FFFFFFF, then location can be updated forever.
   * \param[in] expires_in_ Left time for which the location can be updated, in seconds. If 0, then the location can't be updated anymore. The update updateMessageContent is not sent when this field changes.
   * \param[in] heading_ For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown.
   * \param[in] proximity_alert_radius_ For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only to the message sender.
   */
  messageLocation(object_ptr<location> &&location_, int32 live_period_, int32 expires_in_, int32 heading_, int32 proximity_alert_radius_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 303973492;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about a venue.
 */
class messageVenue final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The venue description.
  object_ptr<venue> venue_;
  static jfieldID venue_fieldID;

  /**
   * A message with information about a venue.
   */
  messageVenue();

  /**
   * A message with information about a venue.
   *
   * \param[in] venue_ The venue description.
   */
  explicit messageVenue(object_ptr<venue> &&venue_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2146492043;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a user contact.
 */
class messageContact final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The contact description.
  object_ptr<contact> contact_;
  static jfieldID contact_fieldID;

  /**
   * A message with a user contact.
   */
  messageContact();

  /**
   * A message with a user contact.
   *
   * \param[in] contact_ The contact description.
   */
  explicit messageContact(object_ptr<contact> &&contact_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -512684966;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with an animated emoji.
 */
class messageAnimatedEmoji final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animated emoji.
  object_ptr<animatedEmoji> animated_emoji_;
  static jfieldID animated_emoji_fieldID;
  /// The corresponding emoji.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * A message with an animated emoji.
   */
  messageAnimatedEmoji();

  /**
   * A message with an animated emoji.
   *
   * \param[in] animated_emoji_ The animated emoji.
   * \param[in] emoji_ The corresponding emoji.
   */
  messageAnimatedEmoji(object_ptr<animatedEmoji> &&animated_emoji_, string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 908195298;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A dice message. The dice value is randomly generated by the server.
 */
class messageDice final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animated stickers with the initial dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
  object_ptr<DiceStickers> initial_state_;
  static jfieldID initial_state_fieldID;
  /// The animated stickers with the final dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
  object_ptr<DiceStickers> final_state_;
  static jfieldID final_state_fieldID;
  /// Emoji on which the dice throw animation is based.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// The dice value. If the value is 0, then the dice don't have final state yet.
  int32 value_;
  static jfieldID value_fieldID;
  /// Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded.
  int32 success_animation_frame_number_;
  static jfieldID success_animation_frame_number_fieldID;

  /**
   * A dice message. The dice value is randomly generated by the server.
   */
  messageDice();

  /**
   * A dice message. The dice value is randomly generated by the server.
   *
   * \param[in] initial_state_ The animated stickers with the initial dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
   * \param[in] final_state_ The animated stickers with the final dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
   * \param[in] emoji_ Emoji on which the dice throw animation is based.
   * \param[in] value_ The dice value. If the value is 0, then the dice don't have final state yet.
   * \param[in] success_animation_frame_number_ Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded.
   */
  messageDice(object_ptr<DiceStickers> &&initial_state_, object_ptr<DiceStickers> &&final_state_, string const &emoji_, int32 value_, int32 success_animation_frame_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1115779641;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a game.
 */
class messageGame final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The game description.
  object_ptr<game> game_;
  static jfieldID game_fieldID;

  /**
   * A message with a game.
   */
  messageGame();

  /**
   * A message with a game.
   *
   * \param[in] game_ The game description.
   */
  explicit messageGame(object_ptr<game> &&game_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -69441162;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a poll.
 */
class messagePoll final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the poll.
  object_ptr<poll> poll_;
  static jfieldID poll_fieldID;
  /// Description of the poll.
  object_ptr<formattedText> description_;
  static jfieldID description_fieldID;
  /// Media attached to the poll; may be null if none. If present, currently, can be only of the types messageAnimation, messageAudio, messageDocument, messageLocation, messagePhoto, messageVenue, or messageVideo without caption.
  object_ptr<MessageContent> media_;
  static jfieldID media_fieldID;
  /// True, if an option can be added to the poll using addPollOption.
  bool can_add_option_;
  static jfieldID can_add_option_fieldID;

  /**
   * A message with a poll.
   */
  messagePoll();

  /**
   * A message with a poll.
   *
   * \param[in] poll_ Information about the poll.
   * \param[in] description_ Description of the poll.
   * \param[in] media_ Media attached to the poll; may be null if none. If present, currently, can be only of the types messageAnimation, messageAudio, messageDocument, messageLocation, messagePhoto, messageVenue, or messageVideo without caption.
   * \param[in] can_add_option_ True, if an option can be added to the poll using addPollOption.
   */
  messagePoll(object_ptr<poll> &&poll_, object_ptr<formattedText> &&description_, object_ptr<MessageContent> &&media_, bool can_add_option_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1644813882;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A stake dice message. The dice value is randomly generated by the server.
 */
class messageStakeDice final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animated stickers with the initial dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
  object_ptr<DiceStickers> initial_state_;
  static jfieldID initial_state_fieldID;
  /// The animated stickers with the final dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
  object_ptr<DiceStickers> final_state_;
  static jfieldID final_state_fieldID;
  /// The dice value. If the value is 0, then the dice don't have final state yet.
  int32 value_;
  static jfieldID value_fieldID;
  /// The Toncoin amount that was staked; in the smallest units of the currency.
  int53 stake_toncoin_amount_;
  static jfieldID stake_toncoin_amount_fieldID;
  /// The Toncoin amount that was gained from the roll; in the smallest units of the currency; -1 if the dice don't have final state yet.
  int53 prize_toncoin_amount_;
  static jfieldID prize_toncoin_amount_fieldID;

  /**
   * A stake dice message. The dice value is randomly generated by the server.
   */
  messageStakeDice();

  /**
   * A stake dice message. The dice value is randomly generated by the server.
   *
   * \param[in] initial_state_ The animated stickers with the initial dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
   * \param[in] final_state_ The animated stickers with the final dice animation; may be null if unknown. The update updateMessageContent will be sent when the sticker became known.
   * \param[in] value_ The dice value. If the value is 0, then the dice don't have final state yet.
   * \param[in] stake_toncoin_amount_ The Toncoin amount that was staked; in the smallest units of the currency.
   * \param[in] prize_toncoin_amount_ The Toncoin amount that was gained from the roll; in the smallest units of the currency; -1 if the dice don't have final state yet.
   */
  messageStakeDice(object_ptr<DiceStickers> &&initial_state_, object_ptr<DiceStickers> &&final_state_, int32 value_, int53 stake_toncoin_amount_, int53 prize_toncoin_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 844428448;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a forwarded story.
 */
class messageStory final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// True, if the story was automatically forwarded because of a mention of the user.
  bool via_mention_;
  static jfieldID via_mention_fieldID;

  /**
   * A message with a forwarded story.
   */
  messageStory();

  /**
   * A message with a forwarded story.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   * \param[in] via_mention_ True, if the story was automatically forwarded because of a mention of the user.
   */
  messageStory(int53 story_poster_chat_id_, int32 story_id_, bool via_mention_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1514236353;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a checklist.
 */
class messageChecklist final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The checklist description.
  object_ptr<checklist> list_;
  static jfieldID list_fieldID;

  /**
   * A message with a checklist.
   */
  messageChecklist();

  /**
   * A message with a checklist.
   *
   * \param[in] list_ The checklist description.
   */
  explicit messageChecklist(object_ptr<checklist> &&list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 609926697;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
 */
class messageInvoice final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the product.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;
  /// Currency for the product price.
  string currency_;
  static jfieldID currency_fieldID;
  /// Product total price in the smallest units of the currency.
  int53 total_amount_;
  static jfieldID total_amount_fieldID;
  /// Unique invoice bot start_parameter to be passed to getInternalLink.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// True, if the invoice is a test invoice.
  bool is_test_;
  static jfieldID is_test_fieldID;
  /// True, if the shipping address must be specified.
  bool need_shipping_address_;
  static jfieldID need_shipping_address_fieldID;
  /// The identifier of the message with the receipt, after the product has been purchased.
  int53 receipt_message_id_;
  static jfieldID receipt_message_id_fieldID;
  /// Extended media attached to the invoice; may be null if none.
  object_ptr<PaidMedia> paid_media_;
  static jfieldID paid_media_fieldID;
  /// Extended media caption; may be null if none.
  object_ptr<formattedText> paid_media_caption_;
  static jfieldID paid_media_caption_fieldID;

  /**
   * A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
   */
  messageInvoice();

  /**
   * A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice.
   *
   * \param[in] product_info_ Information about the product.
   * \param[in] currency_ Currency for the product price.
   * \param[in] total_amount_ Product total price in the smallest units of the currency.
   * \param[in] start_parameter_ Unique invoice bot start_parameter to be passed to getInternalLink.
   * \param[in] is_test_ True, if the invoice is a test invoice.
   * \param[in] need_shipping_address_ True, if the shipping address must be specified.
   * \param[in] receipt_message_id_ The identifier of the message with the receipt, after the product has been purchased.
   * \param[in] paid_media_ Extended media attached to the invoice; may be null if none.
   * \param[in] paid_media_caption_ Extended media caption; may be null if none.
   */
  messageInvoice(object_ptr<productInfo> &&product_info_, string const &currency_, int53 total_amount_, string const &start_parameter_, bool is_test_, bool need_shipping_address_, int53 receipt_message_id_, object_ptr<PaidMedia> &&paid_media_, object_ptr<formattedText> &&paid_media_caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 263060806;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about an ended call.
 */
class messageCall final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Persistent unique call identifier; 0 for calls from other devices, which can't be passed as inputCallFromMessage.
  int64 unique_id_;
  static jfieldID unique_id_fieldID;
  /// True, if the call was a video call.
  bool is_video_;
  static jfieldID is_video_fieldID;
  /// Reason why the call was discarded.
  object_ptr<CallDiscardReason> discard_reason_;
  static jfieldID discard_reason_fieldID;
  /// Call duration, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;

  /**
   * A message with information about an ended call.
   */
  messageCall();

  /**
   * A message with information about an ended call.
   *
   * \param[in] unique_id_ Persistent unique call identifier; 0 for calls from other devices, which can't be passed as inputCallFromMessage.
   * \param[in] is_video_ True, if the call was a video call.
   * \param[in] discard_reason_ Reason why the call was discarded.
   * \param[in] duration_ Call duration, in seconds.
   */
  messageCall(int64 unique_id_, bool is_video_, object_ptr<CallDiscardReason> &&discard_reason_, int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 142247375;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, and getOption(&quot;can_accept_calls&quot;) is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden.
 */
class messageGroupCall final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Persistent unique group call identifier.
  int64 unique_id_;
  static jfieldID unique_id_fieldID;
  /// True, if the call is active, i.e. the called user joined the call.
  bool is_active_;
  static jfieldID is_active_fieldID;
  /// True, if the called user missed or declined the call.
  bool was_missed_;
  static jfieldID was_missed_fieldID;
  /// True, if the call is a video call.
  bool is_video_;
  static jfieldID is_video_fieldID;
  /// Call duration, in seconds; for left calls only.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Identifiers of some other call participants.
  array<object_ptr<MessageSender>> other_participant_ids_;
  static jfieldID other_participant_ids_fieldID;

  /**
   * A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, and getOption(&quot;can_accept_calls&quot;) is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden.
   */
  messageGroupCall();

  /**
   * A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, and getOption(&quot;can_accept_calls&quot;) is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden.
   *
   * \param[in] unique_id_ Persistent unique group call identifier.
   * \param[in] is_active_ True, if the call is active, i.e. the called user joined the call.
   * \param[in] was_missed_ True, if the called user missed or declined the call.
   * \param[in] is_video_ True, if the call is a video call.
   * \param[in] duration_ Call duration, in seconds; for left calls only.
   * \param[in] other_participant_ids_ Identifiers of some other call participants.
   */
  messageGroupCall(int64 unique_id_, bool is_active_, bool was_missed_, bool is_video_, int32 duration_, array<object_ptr<MessageSender>> &&other_participant_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1735752741;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new video chat was scheduled.
 */
class messageVideoChatScheduled final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Point in time (Unix timestamp) when the group call is expected to be started by an administrator.
  int32 start_date_;
  static jfieldID start_date_fieldID;

  /**
   * A new video chat was scheduled.
   */
  messageVideoChatScheduled();

  /**
   * A new video chat was scheduled.
   *
   * \param[in] group_call_id_ Identifier of the video chat. The video chat can be received through the method getGroupCall.
   * \param[in] start_date_ Point in time (Unix timestamp) when the group call is expected to be started by an administrator.
   */
  messageVideoChatScheduled(int32 group_call_id_, int32 start_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1855185481;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A newly created video chat.
 */
class messageVideoChatStarted final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * A newly created video chat.
   */
  messageVideoChatStarted();

  /**
   * A newly created video chat.
   *
   * \param[in] group_call_id_ Identifier of the video chat. The video chat can be received through the method getGroupCall.
   */
  explicit messageVideoChatStarted(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 521225561;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about an ended video chat.
 */
class messageVideoChatEnded final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call duration, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;

  /**
   * A message with information about an ended video chat.
   */
  messageVideoChatEnded();

  /**
   * A message with information about an ended video chat.
   *
   * \param[in] duration_ Call duration, in seconds.
   */
  explicit messageVideoChatEnded(int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2032544855;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about an invitation to a video chat.
 */
class messageInviteVideoChatParticipants final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the video chat. The video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Invited user identifiers.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * A message with information about an invitation to a video chat.
   */
  messageInviteVideoChatParticipants();

  /**
   * A message with information about an invitation to a video chat.
   *
   * \param[in] group_call_id_ Identifier of the video chat. The video chat can be received through the method getGroupCall.
   * \param[in] user_ids_ Invited user identifiers.
   */
  messageInviteVideoChatParticipants(int32 group_call_id_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1459065585;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about an added poll option.
 */
class messagePollOptionAdded final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the poll; can be an identifier of a deleted message or 0.
  int53 poll_message_id_;
  static jfieldID poll_message_id_fieldID;
  /// Identifier of the added option in the poll.
  string option_id_;
  static jfieldID option_id_fieldID;
  /// Text of the option; 1-100 characters; may contain only custom emoji entities.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * A message with information about an added poll option.
   */
  messagePollOptionAdded();

  /**
   * A message with information about an added poll option.
   *
   * \param[in] poll_message_id_ Identifier of the message with the poll; can be an identifier of a deleted message or 0.
   * \param[in] option_id_ Identifier of the added option in the poll.
   * \param[in] text_ Text of the option; 1-100 characters; may contain only custom emoji entities.
   */
  messagePollOptionAdded(int53 poll_message_id_, string const &option_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1826080462;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with information about a deleted poll option.
 */
class messagePollOptionDeleted final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the poll; can be an identifier of a deleted message or 0.
  int53 poll_message_id_;
  static jfieldID poll_message_id_fieldID;
  /// Identifier of the deleted option in the poll.
  string option_id_;
  static jfieldID option_id_fieldID;
  /// Text of the option; 1-100 characters; may contain only custom emoji entities.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * A message with information about a deleted poll option.
   */
  messagePollOptionDeleted();

  /**
   * A message with information about a deleted poll option.
   *
   * \param[in] poll_message_id_ Identifier of the message with the poll; can be an identifier of a deleted message or 0.
   * \param[in] option_id_ Identifier of the deleted option in the poll.
   * \param[in] text_ Text of the option; 1-100 characters; may contain only custom emoji entities.
   */
  messagePollOptionDeleted(int53 poll_message_id_, string const &option_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1808348024;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A newly created basic group.
 */
class messageBasicGroupChatCreate final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the basic group.
  string title_;
  static jfieldID title_fieldID;
  /// User identifiers of members in the basic group.
  array<int53> member_user_ids_;
  static jfieldID member_user_ids_fieldID;

  /**
   * A newly created basic group.
   */
  messageBasicGroupChatCreate();

  /**
   * A newly created basic group.
   *
   * \param[in] title_ Title of the basic group.
   * \param[in] member_user_ids_ User identifiers of members in the basic group.
   */
  messageBasicGroupChatCreate(string const &title_, array<int53> &&member_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 795404060;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A newly created supergroup or channel.
 */
class messageSupergroupChatCreate final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the supergroup or channel.
  string title_;
  static jfieldID title_fieldID;

  /**
   * A newly created supergroup or channel.
   */
  messageSupergroupChatCreate();

  /**
   * A newly created supergroup or channel.
   *
   * \param[in] title_ Title of the supergroup or channel.
   */
  explicit messageSupergroupChatCreate(string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -434325733;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An updated chat title.
 */
class messageChatChangeTitle final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New chat title.
  string title_;
  static jfieldID title_fieldID;

  /**
   * An updated chat title.
   */
  messageChatChangeTitle();

  /**
   * An updated chat title.
   *
   * \param[in] title_ New chat title.
   */
  explicit messageChatChangeTitle(string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 748272449;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An updated chat photo.
 */
class messageChatChangePhoto final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New chat photo.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * An updated chat photo.
   */
  messageChatChangePhoto();

  /**
   * An updated chat photo.
   *
   * \param[in] photo_ New chat photo.
   */
  explicit messageChatChangePhoto(object_ptr<chatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -813415093;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A deleted chat photo.
 */
class messageChatDeletePhoto final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A deleted chat photo.
   */
  messageChatDeletePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -184374809;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The owner of the chat has left.
 */
class messageChatOwnerLeft final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who will become the new owner of the chat if the previous owner isn't return; 0 if none.
  int53 new_owner_user_id_;
  static jfieldID new_owner_user_id_fieldID;

  /**
   * The owner of the chat has left.
   */
  messageChatOwnerLeft();

  /**
   * The owner of the chat has left.
   *
   * \param[in] new_owner_user_id_ Identifier of the user who will become the new owner of the chat if the previous owner isn't return; 0 if none.
   */
  explicit messageChatOwnerLeft(int53 new_owner_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 391852540;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The owner of the chat has changed.
 */
class messageChatOwnerChanged final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who is the new owner of the chat.
  int53 new_owner_user_id_;
  static jfieldID new_owner_user_id_fieldID;

  /**
   * The owner of the chat has changed.
   */
  messageChatOwnerChanged();

  /**
   * The owner of the chat has changed.
   *
   * \param[in] new_owner_user_id_ Identifier of the user who is the new owner of the chat.
   */
  explicit messageChatOwnerChanged(int53 new_owner_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1679665913;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Chat has_protected_content setting was changed or request to change it was rejected.
 */
class messageChatHasProtectedContentToggled final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the request to change the setting; can be an identifier of a deleted message or 0.
  int53 request_message_id_;
  static jfieldID request_message_id_fieldID;
  /// Previous value of the setting.
  bool old_has_protected_content_;
  static jfieldID old_has_protected_content_fieldID;
  /// New value of the setting.
  bool new_has_protected_content_;
  static jfieldID new_has_protected_content_fieldID;

  /**
   * Chat has_protected_content setting was changed or request to change it was rejected.
   */
  messageChatHasProtectedContentToggled();

  /**
   * Chat has_protected_content setting was changed or request to change it was rejected.
   *
   * \param[in] request_message_id_ Identifier of the message with the request to change the setting; can be an identifier of a deleted message or 0.
   * \param[in] old_has_protected_content_ Previous value of the setting.
   * \param[in] new_has_protected_content_ New value of the setting.
   */
  messageChatHasProtectedContentToggled(int53 request_message_id_, bool old_has_protected_content_, bool new_has_protected_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -809083979;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Chat has_protected_content setting was requested to be disabled.
 */
class messageChatHasProtectedContentDisableRequested final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the request has expired.
  bool is_expired_;
  static jfieldID is_expired_fieldID;

  /**
   * Chat has_protected_content setting was requested to be disabled.
   */
  messageChatHasProtectedContentDisableRequested();

  /**
   * Chat has_protected_content setting was requested to be disabled.
   *
   * \param[in] is_expired_ True, if the request has expired.
   */
  explicit messageChatHasProtectedContentDisableRequested(bool is_expired_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 334722856;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New chat members were added.
 */
class messageChatAddMembers final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifiers of the new members.
  array<int53> member_user_ids_;
  static jfieldID member_user_ids_fieldID;

  /**
   * New chat members were added.
   */
  messageChatAddMembers();

  /**
   * New chat members were added.
   *
   * \param[in] member_user_ids_ User identifiers of the new members.
   */
  explicit messageChatAddMembers(array<int53> &&member_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1701117908;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member joined the chat via an invite link.
 */
class messageChatJoinByLink final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A new member joined the chat via an invite link.
   */
  messageChatJoinByLink();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1846493311;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member was accepted to the chat by an administrator.
 */
class messageChatJoinByRequest final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A new member was accepted to the chat by an administrator.
   */
  messageChatJoinByRequest();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1195428732;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat member was deleted.
 */
class messageChatDeleteMember final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the deleted chat member.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A chat member was deleted.
   */
  messageChatDeleteMember();

  /**
   * A chat member was deleted.
   *
   * \param[in] user_id_ User identifier of the deleted chat member.
   */
  explicit messageChatDeleteMember(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 938029481;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A basic group was upgraded to a supergroup and was deactivated as the result.
 */
class messageChatUpgradeTo final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup to which the basic group was upgraded.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * A basic group was upgraded to a supergroup and was deactivated as the result.
   */
  messageChatUpgradeTo();

  /**
   * A basic group was upgraded to a supergroup and was deactivated as the result.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup to which the basic group was upgraded.
   */
  explicit messageChatUpgradeTo(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 104813723;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A supergroup has been created from a basic group.
 */
class messageChatUpgradeFrom final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the newly created supergroup.
  string title_;
  static jfieldID title_fieldID;
  /// The identifier of the original basic group.
  int53 basic_group_id_;
  static jfieldID basic_group_id_fieldID;

  /**
   * A supergroup has been created from a basic group.
   */
  messageChatUpgradeFrom();

  /**
   * A supergroup has been created from a basic group.
   *
   * \param[in] title_ Title of the newly created supergroup.
   * \param[in] basic_group_id_ The identifier of the original basic group.
   */
  messageChatUpgradeFrom(string const &title_, int53 basic_group_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 325954268;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message has been pinned.
 */
class messagePinMessage final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the pinned message, can be an identifier of a deleted message or 0.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * A message has been pinned.
   */
  messagePinMessage();

  /**
   * A message has been pinned.
   *
   * \param[in] message_id_ Identifier of the pinned message, can be an identifier of a deleted message or 0.
   */
  explicit messagePinMessage(int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 953503801;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A screenshot of a message in the chat has been taken.
 */
class messageScreenshotTaken final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A screenshot of a message in the chat has been taken.
   */
  messageScreenshotTaken();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1564971605;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new background was set in the chat.
 */
class messageChatSetBackground final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with a previously set same background; 0 if none. Can be an identifier of a deleted message.
  int53 old_background_message_id_;
  static jfieldID old_background_message_id_fieldID;
  /// The new background.
  object_ptr<chatBackground> background_;
  static jfieldID background_fieldID;
  /// True, if the background was set only for self.
  bool only_for_self_;
  static jfieldID only_for_self_fieldID;

  /**
   * A new background was set in the chat.
   */
  messageChatSetBackground();

  /**
   * A new background was set in the chat.
   *
   * \param[in] old_background_message_id_ Identifier of the message with a previously set same background; 0 if none. Can be an identifier of a deleted message.
   * \param[in] background_ The new background.
   * \param[in] only_for_self_ True, if the background was set only for self.
   */
  messageChatSetBackground(int53 old_background_message_id_, object_ptr<chatBackground> &&background_, bool only_for_self_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1029536832;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A theme in the chat has been changed.
 */
class messageChatSetTheme final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New theme for the chat; may be null if chat theme was reset to the default one.
  object_ptr<ChatTheme> theme_;
  static jfieldID theme_fieldID;

  /**
   * A theme in the chat has been changed.
   */
  messageChatSetTheme();

  /**
   * A theme in the chat has been changed.
   *
   * \param[in] theme_ New theme for the chat; may be null if chat theme was reset to the default one.
   */
  explicit messageChatSetTheme(object_ptr<ChatTheme> &&theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1227514007;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The auto-delete or self-destruct timer for messages in the chat has been changed.
 */
class messageChatSetMessageAutoDeleteTime final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value auto-delete or self-destruct time, in seconds; 0 if disabled.
  int32 message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;
  /// If not 0, a user identifier, which default setting was automatically applied.
  int53 from_user_id_;
  static jfieldID from_user_id_fieldID;

  /**
   * The auto-delete or self-destruct timer for messages in the chat has been changed.
   */
  messageChatSetMessageAutoDeleteTime();

  /**
   * The auto-delete or self-destruct timer for messages in the chat has been changed.
   *
   * \param[in] message_auto_delete_time_ New value auto-delete or self-destruct time, in seconds; 0 if disabled.
   * \param[in] from_user_id_ If not 0, a user identifier, which default setting was automatically applied.
   */
  messageChatSetMessageAutoDeleteTime(int32 message_auto_delete_time_, int53 from_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1637745966;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat was boosted by the sender of the message.
 */
class messageChatBoost final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of times the chat was boosted.
  int32 boost_count_;
  static jfieldID boost_count_fieldID;

  /**
   * The chat was boosted by the sender of the message.
   */
  messageChatBoost();

  /**
   * The chat was boosted by the sender of the message.
   *
   * \param[in] boost_count_ Number of times the chat was boosted.
   */
  explicit messageChatBoost(int32 boost_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1583310219;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forum topic has been created.
 */
class messageForumTopicCreated final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the topic.
  string name_;
  static jfieldID name_fieldID;
  /// True, if the name of the topic wasn't added explicitly.
  bool is_name_implicit_;
  static jfieldID is_name_implicit_fieldID;
  /// Icon of the topic.
  object_ptr<forumTopicIcon> icon_;
  static jfieldID icon_fieldID;

  /**
   * A forum topic has been created.
   */
  messageForumTopicCreated();

  /**
   * A forum topic has been created.
   *
   * \param[in] name_ Name of the topic.
   * \param[in] is_name_implicit_ True, if the name of the topic wasn't added explicitly.
   * \param[in] icon_ Icon of the topic.
   */
  messageForumTopicCreated(string const &name_, bool is_name_implicit_, object_ptr<forumTopicIcon> &&icon_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -714462886;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forum topic has been edited.
 */
class messageForumTopicEdited final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If non-empty, the new name of the topic.
  string name_;
  static jfieldID name_fieldID;
  /// True, if icon's custom_emoji_id is changed.
  bool edit_icon_custom_emoji_id_;
  static jfieldID edit_icon_custom_emoji_id_fieldID;
  /// New unique identifier of the custom emoji shown on the topic icon; 0 if none. Must be ignored if edit_icon_custom_emoji_id is false.
  int64 icon_custom_emoji_id_;
  static jfieldID icon_custom_emoji_id_fieldID;

  /**
   * A forum topic has been edited.
   */
  messageForumTopicEdited();

  /**
   * A forum topic has been edited.
   *
   * \param[in] name_ If non-empty, the new name of the topic.
   * \param[in] edit_icon_custom_emoji_id_ True, if icon's custom_emoji_id is changed.
   * \param[in] icon_custom_emoji_id_ New unique identifier of the custom emoji shown on the topic icon; 0 if none. Must be ignored if edit_icon_custom_emoji_id is false.
   */
  messageForumTopicEdited(string const &name_, bool edit_icon_custom_emoji_id_, int64 icon_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 12629888;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forum topic has been closed or opened.
 */
class messageForumTopicIsClosedToggled final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the topic was closed; otherwise, the topic was reopened.
  bool is_closed_;
  static jfieldID is_closed_fieldID;

  /**
   * A forum topic has been closed or opened.
   */
  messageForumTopicIsClosedToggled();

  /**
   * A forum topic has been closed or opened.
   *
   * \param[in] is_closed_ True, if the topic was closed; otherwise, the topic was reopened.
   */
  explicit messageForumTopicIsClosedToggled(bool is_closed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1264029664;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A General forum topic has been hidden or unhidden.
 */
class messageForumTopicIsHiddenToggled final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the topic was hidden; otherwise, the topic was unhidden.
  bool is_hidden_;
  static jfieldID is_hidden_fieldID;

  /**
   * A General forum topic has been hidden or unhidden.
   */
  messageForumTopicIsHiddenToggled();

  /**
   * A General forum topic has been hidden or unhidden.
   *
   * \param[in] is_hidden_ True, if the topic was hidden; otherwise, the topic was unhidden.
   */
  explicit messageForumTopicIsHiddenToggled(bool is_hidden_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1751936002;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A profile photo was suggested to a user in a private chat.
 */
class messageSuggestProfilePhoto final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * A profile photo was suggested to a user in a private chat.
   */
  messageSuggestProfilePhoto();

  /**
   * A profile photo was suggested to a user in a private chat.
   *
   * \param[in] photo_ The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo.
   */
  explicit messageSuggestProfilePhoto(object_ptr<chatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1251926297;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A birthdate was suggested to be set.
 */
class messageSuggestBirthdate final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The suggested birthdate. Use the method setBirthdate to apply the birthdate.
  object_ptr<birthdate> birthdate_;
  static jfieldID birthdate_fieldID;

  /**
   * A birthdate was suggested to be set.
   */
  messageSuggestBirthdate();

  /**
   * A birthdate was suggested to be set.
   *
   * \param[in] birthdate_ The suggested birthdate. Use the method setBirthdate to apply the birthdate.
   */
  explicit messageSuggestBirthdate(object_ptr<birthdate> &&birthdate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -682342263;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A non-standard action has happened in the chat.
 */
class messageCustomServiceAction final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message text to be shown in the chat.
  string text_;
  static jfieldID text_fieldID;

  /**
   * A non-standard action has happened in the chat.
   */
  messageCustomServiceAction();

  /**
   * A non-standard action has happened in the chat.
   *
   * \param[in] text_ Message text to be shown in the chat.
   */
  explicit messageCustomServiceAction(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1435879282;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new high score was achieved in a game.
 */
class messageGameScore final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the game, can be an identifier of a deleted message.
  int53 game_message_id_;
  static jfieldID game_message_id_fieldID;
  /// Identifier of the game; may be different from the games presented in the message with the game.
  int64 game_id_;
  static jfieldID game_id_fieldID;
  /// New score.
  int32 score_;
  static jfieldID score_fieldID;

  /**
   * A new high score was achieved in a game.
   */
  messageGameScore();

  /**
   * A new high score was achieved in a game.
   *
   * \param[in] game_message_id_ Identifier of the message with the game, can be an identifier of a deleted message.
   * \param[in] game_id_ Identifier of the game; may be different from the games presented in the message with the game.
   * \param[in] score_ New score.
   */
  messageGameScore(int53 game_message_id_, int64 game_id_, int32 score_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1344904575;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bot managed by another bot was created by the user.
 */
class messageManagedBotCreated final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the created bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * A bot managed by another bot was created by the user.
   */
  messageManagedBotCreated();

  /**
   * A bot managed by another bot was created by the user.
   *
   * \param[in] bot_user_id_ User identifier of the created bot.
   */
  explicit messageManagedBotCreated(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1787873036;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A payment has been sent to a bot or a business account.
 */
class messagePaymentSuccessful final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat, containing the corresponding invoice message.
  int53 invoice_chat_id_;
  static jfieldID invoice_chat_id_fieldID;
  /// Identifier of the message with the corresponding invoice; may be 0 or an identifier of a deleted message.
  int53 invoice_message_id_;
  static jfieldID invoice_message_id_fieldID;
  /// Currency for the price of the product.
  string currency_;
  static jfieldID currency_fieldID;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  static jfieldID total_amount_fieldID;
  /// Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring.
  int32 subscription_until_date_;
  static jfieldID subscription_until_date_fieldID;
  /// True, if this is a recurring payment.
  bool is_recurring_;
  static jfieldID is_recurring_fieldID;
  /// True, if this is the first recurring payment.
  bool is_first_recurring_;
  static jfieldID is_first_recurring_fieldID;
  /// Name of the invoice; may be empty if unknown.
  string invoice_name_;
  static jfieldID invoice_name_fieldID;

  /**
   * A payment has been sent to a bot or a business account.
   */
  messagePaymentSuccessful();

  /**
   * A payment has been sent to a bot or a business account.
   *
   * \param[in] invoice_chat_id_ Identifier of the chat, containing the corresponding invoice message.
   * \param[in] invoice_message_id_ Identifier of the message with the corresponding invoice; may be 0 or an identifier of a deleted message.
   * \param[in] currency_ Currency for the price of the product.
   * \param[in] total_amount_ Total price for the product, in the smallest units of the currency.
   * \param[in] subscription_until_date_ Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring.
   * \param[in] is_recurring_ True, if this is a recurring payment.
   * \param[in] is_first_recurring_ True, if this is the first recurring payment.
   * \param[in] invoice_name_ Name of the invoice; may be empty if unknown.
   */
  messagePaymentSuccessful(int53 invoice_chat_id_, int53 invoice_message_id_, string const &currency_, int53 total_amount_, int32 subscription_until_date_, bool is_recurring_, bool is_first_recurring_, string const &invoice_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1046878481;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A payment has been received by the bot or the business account.
 */
class messagePaymentSuccessfulBot final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Currency for price of the product.
  string currency_;
  static jfieldID currency_fieldID;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  static jfieldID total_amount_fieldID;
  /// Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring.
  int32 subscription_until_date_;
  static jfieldID subscription_until_date_fieldID;
  /// True, if this is a recurring payment.
  bool is_recurring_;
  static jfieldID is_recurring_fieldID;
  /// True, if this is the first recurring payment.
  bool is_first_recurring_;
  static jfieldID is_first_recurring_fieldID;
  /// Invoice payload.
  bytes invoice_payload_;
  static jfieldID invoice_payload_fieldID;
  /// Identifier of the shipping option chosen by the user; may be empty if not applicable; for bots only.
  string shipping_option_id_;
  static jfieldID shipping_option_id_fieldID;
  /// Information about the order; may be null; for bots only.
  object_ptr<orderInfo> order_info_;
  static jfieldID order_info_fieldID;
  /// Telegram payment identifier.
  string telegram_payment_charge_id_;
  static jfieldID telegram_payment_charge_id_fieldID;
  /// Provider payment identifier.
  string provider_payment_charge_id_;
  static jfieldID provider_payment_charge_id_fieldID;

  /**
   * A payment has been received by the bot or the business account.
   */
  messagePaymentSuccessfulBot();

  /**
   * A payment has been received by the bot or the business account.
   *
   * \param[in] currency_ Currency for price of the product.
   * \param[in] total_amount_ Total price for the product, in the smallest units of the currency.
   * \param[in] subscription_until_date_ Point in time (Unix timestamp) when the subscription will expire; 0 if unknown or the payment isn't recurring.
   * \param[in] is_recurring_ True, if this is a recurring payment.
   * \param[in] is_first_recurring_ True, if this is the first recurring payment.
   * \param[in] invoice_payload_ Invoice payload.
   * \param[in] shipping_option_id_ Identifier of the shipping option chosen by the user; may be empty if not applicable; for bots only.
   * \param[in] order_info_ Information about the order; may be null; for bots only.
   * \param[in] telegram_payment_charge_id_ Telegram payment identifier.
   * \param[in] provider_payment_charge_id_ Provider payment identifier.
   */
  messagePaymentSuccessfulBot(string const &currency_, int53 total_amount_, int32 subscription_until_date_, bool is_recurring_, bool is_first_recurring_, bytes const &invoice_payload_, string const &shipping_option_id_, object_ptr<orderInfo> &&order_info_, string const &telegram_payment_charge_id_, string const &provider_payment_charge_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -949596737;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A payment has been refunded.
 */
class messagePaymentRefunded final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the previous owner of the Telegram Stars that refunds them.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Currency for the price of the product.
  string currency_;
  static jfieldID currency_fieldID;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  static jfieldID total_amount_fieldID;
  /// Invoice payload; only for bots.
  bytes invoice_payload_;
  static jfieldID invoice_payload_fieldID;
  /// Telegram payment identifier.
  string telegram_payment_charge_id_;
  static jfieldID telegram_payment_charge_id_fieldID;
  /// Provider payment identifier.
  string provider_payment_charge_id_;
  static jfieldID provider_payment_charge_id_fieldID;

  /**
   * A payment has been refunded.
   */
  messagePaymentRefunded();

  /**
   * A payment has been refunded.
   *
   * \param[in] owner_id_ Identifier of the previous owner of the Telegram Stars that refunds them.
   * \param[in] currency_ Currency for the price of the product.
   * \param[in] total_amount_ Total price for the product, in the smallest units of the currency.
   * \param[in] invoice_payload_ Invoice payload; only for bots.
   * \param[in] telegram_payment_charge_id_ Telegram payment identifier.
   * \param[in] provider_payment_charge_id_ Provider payment identifier.
   */
  messagePaymentRefunded(object_ptr<MessageSender> &&owner_id_, string const &currency_, int53 total_amount_, bytes const &invoice_payload_, string const &telegram_payment_charge_id_, string const &provider_payment_charge_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 297580787;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Telegram Premium was gifted to a user.
 */
class messageGiftedPremium final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
  int53 gifter_user_id_;
  static jfieldID gifter_user_id_fieldID;
  /// The identifier of a user who received Telegram Premium; 0 if the gift is incoming.
  int53 receiver_user_id_;
  static jfieldID receiver_user_id_fieldID;
  /// Message added to the gifted Telegram Premium by the sender.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Currency for the paid amount.
  string currency_;
  static jfieldID currency_fieldID;
  /// The paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Cryptocurrency used to pay for the gift; may be empty if none.
  string cryptocurrency_;
  static jfieldID cryptocurrency_fieldID;
  /// The paid amount, in the smallest units of the cryptocurrency; 0 if none.
  int64 cryptocurrency_amount_;
  static jfieldID cryptocurrency_amount_fieldID;
  /// Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Number of days the Telegram Premium subscription will be active.
  int32 day_count_;
  static jfieldID day_count_fieldID;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Telegram Premium was gifted to a user.
   */
  messageGiftedPremium();

  /**
   * Telegram Premium was gifted to a user.
   *
   * \param[in] gifter_user_id_ The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
   * \param[in] receiver_user_id_ The identifier of a user who received Telegram Premium; 0 if the gift is incoming.
   * \param[in] text_ Message added to the gifted Telegram Premium by the sender.
   * \param[in] currency_ Currency for the paid amount.
   * \param[in] amount_ The paid amount, in the smallest units of the currency.
   * \param[in] cryptocurrency_ Cryptocurrency used to pay for the gift; may be empty if none.
   * \param[in] cryptocurrency_amount_ The paid amount, in the smallest units of the cryptocurrency; 0 if none.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
   * \param[in] day_count_ Number of days the Telegram Premium subscription will be active.
   * \param[in] sticker_ A sticker to be shown in the message; may be null if unknown.
   */
  messageGiftedPremium(int53 gifter_user_id_, int53 receiver_user_id_, object_ptr<formattedText> &&text_, string const &currency_, int53 amount_, string const &cryptocurrency_, int64 cryptocurrency_amount_, int32 month_count_, int32 day_count_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 807892848;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Premium gift code was created for the user.
 */
class messagePremiumGiftCode final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a chat or a user who created the gift code; may be null if unknown.
  object_ptr<MessageSender> creator_id_;
  static jfieldID creator_id_fieldID;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// True, if the gift code was created for a giveaway.
  bool is_from_giveaway_;
  static jfieldID is_from_giveaway_fieldID;
  /// True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
  bool is_unclaimed_;
  static jfieldID is_unclaimed_fieldID;
  /// Currency for the paid amount; empty if unknown.
  string currency_;
  static jfieldID currency_fieldID;
  /// The paid amount, in the smallest units of the currency; 0 if unknown.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Cryptocurrency used to pay for the gift; may be empty if none or unknown.
  string cryptocurrency_;
  static jfieldID cryptocurrency_fieldID;
  /// The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
  int64 cryptocurrency_amount_;
  static jfieldID cryptocurrency_amount_fieldID;
  /// Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Number of days the Telegram Premium subscription will be active after code activation.
  int32 day_count_;
  static jfieldID day_count_fieldID;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// The gift code.
  string code_;
  static jfieldID code_fieldID;

  /**
   * A Telegram Premium gift code was created for the user.
   */
  messagePremiumGiftCode();

  /**
   * A Telegram Premium gift code was created for the user.
   *
   * \param[in] creator_id_ Identifier of a chat or a user who created the gift code; may be null if unknown.
   * \param[in] text_ Message added to the gift.
   * \param[in] is_from_giveaway_ True, if the gift code was created for a giveaway.
   * \param[in] is_unclaimed_ True, if the winner for the corresponding Telegram Premium subscription wasn't chosen.
   * \param[in] currency_ Currency for the paid amount; empty if unknown.
   * \param[in] amount_ The paid amount, in the smallest units of the currency; 0 if unknown.
   * \param[in] cryptocurrency_ Cryptocurrency used to pay for the gift; may be empty if none or unknown.
   * \param[in] cryptocurrency_amount_ The paid amount, in the smallest units of the cryptocurrency; 0 if unknown.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
   * \param[in] day_count_ Number of days the Telegram Premium subscription will be active after code activation.
   * \param[in] sticker_ A sticker to be shown in the message; may be null if unknown.
   * \param[in] code_ The gift code.
   */
  messagePremiumGiftCode(object_ptr<MessageSender> &&creator_id_, object_ptr<formattedText> &&text_, bool is_from_giveaway_, bool is_unclaimed_, string const &currency_, int53 amount_, string const &cryptocurrency_, int64 cryptocurrency_amount_, int32 month_count_, int32 day_count_, object_ptr<sticker> &&sticker_, string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 680217675;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A giveaway was created for the chat. Use telegramPaymentPurposePremiumGiveaway, storePaymentPurposePremiumGiveaway, telegramPaymentPurposeStarGiveaway, or storePaymentPurposeStarGiveaway to create a giveaway.
 */
class messageGiveawayCreated final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that will be shared by winners of the giveaway; 0 for Telegram Premium giveaways.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * A giveaway was created for the chat. Use telegramPaymentPurposePremiumGiveaway, storePaymentPurposePremiumGiveaway, telegramPaymentPurposeStarGiveaway, or storePaymentPurposeStarGiveaway to create a giveaway.
   */
  messageGiveawayCreated();

  /**
   * A giveaway was created for the chat. Use telegramPaymentPurposePremiumGiveaway, storePaymentPurposePremiumGiveaway, telegramPaymentPurposeStarGiveaway, or storePaymentPurposeStarGiveaway to create a giveaway.
   *
   * \param[in] star_count_ Number of Telegram Stars that will be shared by winners of the giveaway; 0 for Telegram Premium giveaways.
   */
  explicit messageGiveawayCreated(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 972252063;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A giveaway.
 */
class messageGiveaway final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// Number of users which will receive Telegram Premium subscription gift codes.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Prize of the giveaway.
  object_ptr<GiveawayPrize> prize_;
  static jfieldID prize_fieldID;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * A giveaway.
   */
  messageGiveaway();

  /**
   * A giveaway.
   *
   * \param[in] parameters_ Giveaway parameters.
   * \param[in] winner_count_ Number of users which will receive Telegram Premium subscription gift codes.
   * \param[in] prize_ Prize of the giveaway.
   * \param[in] sticker_ A sticker to be shown in the message; may be null if unknown.
   */
  messageGiveaway(object_ptr<giveawayParameters> &&parameters_, int32 winner_count_, object_ptr<GiveawayPrize> &&prize_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -345908568;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A giveaway without public winners has been completed for the chat.
 */
class messageGiveawayCompleted final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message.
  int53 giveaway_message_id_;
  static jfieldID giveaway_message_id_fieldID;
  /// Number of winners in the giveaway.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// True, if the giveaway is a Telegram Star giveaway.
  bool is_star_giveaway_;
  static jfieldID is_star_giveaway_fieldID;
  /// Number of undistributed prizes; for Telegram Premium giveaways only.
  int32 unclaimed_prize_count_;
  static jfieldID unclaimed_prize_count_fieldID;

  /**
   * A giveaway without public winners has been completed for the chat.
   */
  messageGiveawayCompleted();

  /**
   * A giveaway without public winners has been completed for the chat.
   *
   * \param[in] giveaway_message_id_ Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message.
   * \param[in] winner_count_ Number of winners in the giveaway.
   * \param[in] is_star_giveaway_ True, if the giveaway is a Telegram Star giveaway.
   * \param[in] unclaimed_prize_count_ Number of undistributed prizes; for Telegram Premium giveaways only.
   */
  messageGiveawayCompleted(int53 giveaway_message_id_, int32 winner_count_, bool is_star_giveaway_, int32 unclaimed_prize_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -467351305;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A giveaway with public winners has been completed for the chat.
 */
class messageGiveawayWinners final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway.
  int53 boosted_chat_id_;
  static jfieldID boosted_chat_id_fieldID;
  /// Identifier of the message with the giveaway in the boosted chat.
  int53 giveaway_message_id_;
  static jfieldID giveaway_message_id_fieldID;
  /// Number of other chats that participated in the giveaway.
  int32 additional_chat_count_;
  static jfieldID additional_chat_count_fieldID;
  /// Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway.
  int32 actual_winners_selection_date_;
  static jfieldID actual_winners_selection_date_fieldID;
  /// True, if only new members of the chats were eligible for the giveaway.
  bool only_new_members_;
  static jfieldID only_new_members_fieldID;
  /// True, if the giveaway was canceled and was fully refunded.
  bool was_refunded_;
  static jfieldID was_refunded_fieldID;
  /// Prize of the giveaway.
  object_ptr<GiveawayPrize> prize_;
  static jfieldID prize_fieldID;
  /// Additional description of the giveaway prize.
  string prize_description_;
  static jfieldID prize_description_fieldID;
  /// Total number of winners in the giveaway.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Up to 100 user identifiers of the winners of the giveaway.
  array<int53> winner_user_ids_;
  static jfieldID winner_user_ids_fieldID;
  /// Number of undistributed prizes; for Telegram Premium giveaways only.
  int32 unclaimed_prize_count_;
  static jfieldID unclaimed_prize_count_fieldID;

  /**
   * A giveaway with public winners has been completed for the chat.
   */
  messageGiveawayWinners();

  /**
   * A giveaway with public winners has been completed for the chat.
   *
   * \param[in] boosted_chat_id_ Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway.
   * \param[in] giveaway_message_id_ Identifier of the message with the giveaway in the boosted chat.
   * \param[in] additional_chat_count_ Number of other chats that participated in the giveaway.
   * \param[in] actual_winners_selection_date_ Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway.
   * \param[in] only_new_members_ True, if only new members of the chats were eligible for the giveaway.
   * \param[in] was_refunded_ True, if the giveaway was canceled and was fully refunded.
   * \param[in] prize_ Prize of the giveaway.
   * \param[in] prize_description_ Additional description of the giveaway prize.
   * \param[in] winner_count_ Total number of winners in the giveaway.
   * \param[in] winner_user_ids_ Up to 100 user identifiers of the winners of the giveaway.
   * \param[in] unclaimed_prize_count_ Number of undistributed prizes; for Telegram Premium giveaways only.
   */
  messageGiveawayWinners(int53 boosted_chat_id_, int53 giveaway_message_id_, int32 additional_chat_count_, int32 actual_winners_selection_date_, bool only_new_members_, bool was_refunded_, object_ptr<GiveawayPrize> &&prize_, string const &prize_description_, int32 winner_count_, array<int53> &&winner_user_ids_, int32 unclaimed_prize_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2098585405;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Telegram Stars were gifted to a user.
 */
class messageGiftedStars final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of a user who gifted Telegram Stars; 0 if the gift was anonymous or is outgoing.
  int53 gifter_user_id_;
  static jfieldID gifter_user_id_fieldID;
  /// The identifier of a user who received Telegram Stars; 0 if the gift is incoming.
  int53 receiver_user_id_;
  static jfieldID receiver_user_id_fieldID;
  /// Currency for the paid amount.
  string currency_;
  static jfieldID currency_fieldID;
  /// The paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Cryptocurrency used to pay for the gift; may be empty if none.
  string cryptocurrency_;
  static jfieldID cryptocurrency_fieldID;
  /// The paid amount, in the smallest units of the cryptocurrency; 0 if none.
  int64 cryptocurrency_amount_;
  static jfieldID cryptocurrency_amount_fieldID;
  /// Number of Telegram Stars that were gifted.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the transaction for Telegram Stars purchase; for receiver only.
  string transaction_id_;
  static jfieldID transaction_id_fieldID;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Telegram Stars were gifted to a user.
   */
  messageGiftedStars();

  /**
   * Telegram Stars were gifted to a user.
   *
   * \param[in] gifter_user_id_ The identifier of a user who gifted Telegram Stars; 0 if the gift was anonymous or is outgoing.
   * \param[in] receiver_user_id_ The identifier of a user who received Telegram Stars; 0 if the gift is incoming.
   * \param[in] currency_ Currency for the paid amount.
   * \param[in] amount_ The paid amount, in the smallest units of the currency.
   * \param[in] cryptocurrency_ Cryptocurrency used to pay for the gift; may be empty if none.
   * \param[in] cryptocurrency_amount_ The paid amount, in the smallest units of the cryptocurrency; 0 if none.
   * \param[in] star_count_ Number of Telegram Stars that were gifted.
   * \param[in] transaction_id_ Identifier of the transaction for Telegram Stars purchase; for receiver only.
   * \param[in] sticker_ A sticker to be shown in the message; may be null if unknown.
   */
  messageGiftedStars(int53 gifter_user_id_, int53 receiver_user_id_, string const &currency_, int53 amount_, string const &cryptocurrency_, int64 cryptocurrency_amount_, int53 star_count_, string const &transaction_id_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1102954151;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Toncoins were gifted to a user.
 */
class messageGiftedTon final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of a user who gifted Toncoins; 0 if the gift was anonymous or is outgoing.
  int53 gifter_user_id_;
  static jfieldID gifter_user_id_fieldID;
  /// The identifier of a user who received Toncoins; 0 if the gift is incoming.
  int53 receiver_user_id_;
  static jfieldID receiver_user_id_fieldID;
  /// The received Toncoin amount, in the smallest units of the cryptocurrency.
  int53 ton_amount_;
  static jfieldID ton_amount_fieldID;
  /// Identifier of the transaction for Toncoin credit; for receiver only.
  string transaction_id_;
  static jfieldID transaction_id_fieldID;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Toncoins were gifted to a user.
   */
  messageGiftedTon();

  /**
   * Toncoins were gifted to a user.
   *
   * \param[in] gifter_user_id_ The identifier of a user who gifted Toncoins; 0 if the gift was anonymous or is outgoing.
   * \param[in] receiver_user_id_ The identifier of a user who received Toncoins; 0 if the gift is incoming.
   * \param[in] ton_amount_ The received Toncoin amount, in the smallest units of the cryptocurrency.
   * \param[in] transaction_id_ Identifier of the transaction for Toncoin credit; for receiver only.
   * \param[in] sticker_ A sticker to be shown in the message; may be null if unknown.
   */
  messageGiftedTon(int53 gifter_user_id_, int53 receiver_user_id_, int53 ton_amount_, string const &transaction_id_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 766483995;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Stars were received by the current user from a giveaway.
 */
class messageGiveawayPrizeStars final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that were received.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the transaction for Telegram Stars credit.
  string transaction_id_;
  static jfieldID transaction_id_fieldID;
  /// Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway.
  int53 boosted_chat_id_;
  static jfieldID boosted_chat_id_fieldID;
  /// Identifier of the message with the giveaway in the boosted chat; may be 0 or an identifier of a deleted message.
  int53 giveaway_message_id_;
  static jfieldID giveaway_message_id_fieldID;
  /// True, if the corresponding winner wasn't chosen and the Telegram Stars were received by the owner of the boosted chat.
  bool is_unclaimed_;
  static jfieldID is_unclaimed_fieldID;
  /// A sticker to be shown in the message; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * A Telegram Stars were received by the current user from a giveaway.
   */
  messageGiveawayPrizeStars();

  /**
   * A Telegram Stars were received by the current user from a giveaway.
   *
   * \param[in] star_count_ Number of Telegram Stars that were received.
   * \param[in] transaction_id_ Identifier of the transaction for Telegram Stars credit.
   * \param[in] boosted_chat_id_ Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway.
   * \param[in] giveaway_message_id_ Identifier of the message with the giveaway in the boosted chat; may be 0 or an identifier of a deleted message.
   * \param[in] is_unclaimed_ True, if the corresponding winner wasn't chosen and the Telegram Stars were received by the owner of the boosted chat.
   * \param[in] sticker_ A sticker to be shown in the message; may be null if unknown.
   */
  messageGiveawayPrizeStars(int53 star_count_, string const &transaction_id_, int53 boosted_chat_id_, int53 giveaway_message_id_, bool is_unclaimed_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1441833501;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
 */
class messageGift final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;
  /// Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Receiver of the gift.
  object_ptr<MessageSender> receiver_id_;
  static jfieldID receiver_id_fieldID;
  /// Unique identifier of the received gift for the current user; only for the receiver of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
  int32 unique_gift_number_;
  static jfieldID unique_gift_number_fieldID;
  /// Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver.
  int53 sell_star_count_;
  static jfieldID sell_star_count_fieldID;
  /// Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
  int53 prepaid_upgrade_star_count_;
  static jfieldID prepaid_upgrade_star_count_fieldID;
  /// True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
  bool is_upgrade_separate_;
  static jfieldID is_upgrade_separate_fieldID;
  /// True, if the message is a notification about a gift won on an auction.
  bool is_from_auction_;
  static jfieldID is_from_auction_fieldID;
  /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
  bool is_private_;
  static jfieldID is_private_fieldID;
  /// True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
  bool is_saved_;
  static jfieldID is_saved_fieldID;
  /// True, if the message is about prepaid upgrade of the gift by another user.
  bool is_prepaid_upgrade_;
  static jfieldID is_prepaid_upgrade_fieldID;
  /// True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.
  bool can_be_upgraded_;
  static jfieldID can_be_upgraded_fieldID;
  /// True, if the gift was converted to Telegram Stars; only for the receiver of the gift.
  bool was_converted_;
  static jfieldID was_converted_fieldID;
  /// True, if the gift was upgraded to a unique gift.
  bool was_upgraded_;
  static jfieldID was_upgraded_fieldID;
  /// True, if the gift was refunded and isn't available anymore.
  bool was_refunded_;
  static jfieldID was_refunded_fieldID;
  /// Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift.
  string upgraded_received_gift_id_;
  static jfieldID upgraded_received_gift_id_fieldID;
  /// If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
  string prepaid_upgrade_hash_;
  static jfieldID prepaid_upgrade_hash_fieldID;

  /**
   * A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
   */
  messageGift();

  /**
   * A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
   *
   * \param[in] gift_ The gift.
   * \param[in] sender_id_ Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users.
   * \param[in] receiver_id_ Receiver of the gift.
   * \param[in] received_gift_id_ Unique identifier of the received gift for the current user; only for the receiver of the gift.
   * \param[in] text_ Message added to the gift.
   * \param[in] unique_gift_number_ Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
   * \param[in] sell_star_count_ Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver.
   * \param[in] prepaid_upgrade_star_count_ Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
   * \param[in] is_upgrade_separate_ True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
   * \param[in] is_from_auction_ True, if the message is a notification about a gift won on an auction.
   * \param[in] is_private_ True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
   * \param[in] is_saved_ True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
   * \param[in] is_prepaid_upgrade_ True, if the message is about prepaid upgrade of the gift by another user.
   * \param[in] can_be_upgraded_ True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.
   * \param[in] was_converted_ True, if the gift was converted to Telegram Stars; only for the receiver of the gift.
   * \param[in] was_upgraded_ True, if the gift was upgraded to a unique gift.
   * \param[in] was_refunded_ True, if the gift was refunded and isn't available anymore.
   * \param[in] upgraded_received_gift_id_ Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift.
   * \param[in] prepaid_upgrade_hash_ If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
   */
  messageGift(object_ptr<gift> &&gift_, object_ptr<MessageSender> &&sender_id_, object_ptr<MessageSender> &&receiver_id_, string const &received_gift_id_, object_ptr<formattedText> &&text_, int32 unique_gift_number_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, bool is_upgrade_separate_, bool is_from_auction_, bool is_private_, bool is_saved_, bool is_prepaid_upgrade_, bool can_be_upgraded_, bool was_converted_, bool was_upgraded_, bool was_refunded_, string const &upgraded_received_gift_id_, string const &prepaid_upgrade_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1990929579;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
 */
class messageUpgradedGift final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// Sender of the gift; may be null for anonymous gifts.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Receiver of the gift.
  object_ptr<MessageSender> receiver_id_;
  static jfieldID receiver_id_fieldID;
  /// Origin of the upgraded gift.
  object_ptr<UpgradedGiftOrigin> origin_;
  static jfieldID origin_fieldID;
  /// Unique identifier of the received gift for the current user; only for the receiver of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
  bool is_saved_;
  static jfieldID is_saved_fieldID;
  /// True, if the gift can be transferred to another owner; only for the receiver of the gift.
  bool can_be_transferred_;
  static jfieldID can_be_transferred_fieldID;
  /// True, if the gift has already been transferred to another owner; only for the receiver of the gift.
  bool was_transferred_;
  static jfieldID was_transferred_fieldID;
  /// Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
  int53 transfer_star_count_;
  static jfieldID transfer_star_count_fieldID;
  /// Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift.
  int53 drop_original_details_star_count_;
  static jfieldID drop_original_details_star_count_fieldID;
  /// Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
  int32 next_transfer_date_;
  static jfieldID next_transfer_date_fieldID;
  /// Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift.
  int32 next_resale_date_;
  static jfieldID next_resale_date_fieldID;
  /// Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift.
  int32 export_date_;
  static jfieldID export_date_fieldID;
  /// Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift.
  int32 craft_date_;
  static jfieldID craft_date_fieldID;

  /**
   * An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
   */
  messageUpgradedGift();

  /**
   * An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift.
   *
   * \param[in] gift_ The gift.
   * \param[in] sender_id_ Sender of the gift; may be null for anonymous gifts.
   * \param[in] receiver_id_ Receiver of the gift.
   * \param[in] origin_ Origin of the upgraded gift.
   * \param[in] received_gift_id_ Unique identifier of the received gift for the current user; only for the receiver of the gift.
   * \param[in] is_saved_ True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.
   * \param[in] can_be_transferred_ True, if the gift can be transferred to another owner; only for the receiver of the gift.
   * \param[in] was_transferred_ True, if the gift has already been transferred to another owner; only for the receiver of the gift.
   * \param[in] transfer_star_count_ Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
   * \param[in] drop_original_details_star_count_ Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift.
   * \param[in] next_transfer_date_ Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
   * \param[in] next_resale_date_ Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift.
   * \param[in] export_date_ Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift.
   * \param[in] craft_date_ Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift.
   */
  messageUpgradedGift(object_ptr<upgradedGift> &&gift_, object_ptr<MessageSender> &&sender_id_, object_ptr<MessageSender> &&receiver_id_, object_ptr<UpgradedGiftOrigin> &&origin_, string const &received_gift_id_, bool is_saved_, bool can_be_transferred_, bool was_transferred_, int53 transfer_star_count_, int53 drop_original_details_star_count_, int32 next_transfer_date_, int32 next_resale_date_, int32 export_date_, int32 craft_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1432909893;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A gift which purchase, upgrade or transfer were refunded.
 */
class messageRefundedUpgradedGift final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;
  /// Sender of the gift.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Receiver of the gift.
  object_ptr<MessageSender> receiver_id_;
  static jfieldID receiver_id_fieldID;
  /// Origin of the upgraded gift.
  object_ptr<UpgradedGiftOrigin> origin_;
  static jfieldID origin_fieldID;

  /**
   * A gift which purchase, upgrade or transfer were refunded.
   */
  messageRefundedUpgradedGift();

  /**
   * A gift which purchase, upgrade or transfer were refunded.
   *
   * \param[in] gift_ The gift.
   * \param[in] sender_id_ Sender of the gift.
   * \param[in] receiver_id_ Receiver of the gift.
   * \param[in] origin_ Origin of the upgraded gift.
   */
  messageRefundedUpgradedGift(object_ptr<gift> &&gift_, object_ptr<MessageSender> &&sender_id_, object_ptr<MessageSender> &&receiver_id_, object_ptr<UpgradedGiftOrigin> &&origin_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -605744001;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An offer to purchase an upgraded gift was sent or received.
 */
class messageUpgradedGiftPurchaseOffer final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// State of the offer.
  object_ptr<GiftPurchaseOfferState> state_;
  static jfieldID state_fieldID;
  /// The proposed price.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;
  /// Point in time (Unix timestamp) when the offer will expire or has expired.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;

  /**
   * An offer to purchase an upgraded gift was sent or received.
   */
  messageUpgradedGiftPurchaseOffer();

  /**
   * An offer to purchase an upgraded gift was sent or received.
   *
   * \param[in] gift_ The gift.
   * \param[in] state_ State of the offer.
   * \param[in] price_ The proposed price.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the offer will expire or has expired.
   */
  messageUpgradedGiftPurchaseOffer(object_ptr<upgradedGift> &&gift_, object_ptr<GiftPurchaseOfferState> &&state_, object_ptr<GiftResalePrice> &&price_, int32 expiration_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1809958483;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An offer to purchase a gift was rejected or expired.
 */
class messageUpgradedGiftPurchaseOfferRejected final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// The proposed price.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;
  /// Identifier of the message with purchase offer which was rejected or expired; may be 0 or an identifier of a deleted message.
  int53 offer_message_id_;
  static jfieldID offer_message_id_fieldID;
  /// True, if the offer has expired; otherwise, the offer was explicitly rejected.
  bool was_expired_;
  static jfieldID was_expired_fieldID;

  /**
   * An offer to purchase a gift was rejected or expired.
   */
  messageUpgradedGiftPurchaseOfferRejected();

  /**
   * An offer to purchase a gift was rejected or expired.
   *
   * \param[in] gift_ The gift.
   * \param[in] price_ The proposed price.
   * \param[in] offer_message_id_ Identifier of the message with purchase offer which was rejected or expired; may be 0 or an identifier of a deleted message.
   * \param[in] was_expired_ True, if the offer has expired; otherwise, the offer was explicitly rejected.
   */
  messageUpgradedGiftPurchaseOfferRejected(object_ptr<upgradedGift> &&gift_, object_ptr<GiftResalePrice> &&price_, int53 offer_message_id_, bool was_expired_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 59315711;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Paid messages were refunded.
 */
class messagePaidMessagesRefunded final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of refunded messages.
  int32 message_count_;
  static jfieldID message_count_fieldID;
  /// The number of refunded Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Paid messages were refunded.
   */
  messagePaidMessagesRefunded();

  /**
   * Paid messages were refunded.
   *
   * \param[in] message_count_ The number of refunded messages.
   * \param[in] star_count_ The number of refunded Telegram Stars.
   */
  messagePaidMessagesRefunded(int32 message_count_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 580403343;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A price for paid messages was changed in the supergroup chat.
 */
class messagePaidMessagePriceChanged final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * A price for paid messages was changed in the supergroup chat.
   */
  messagePaidMessagePriceChanged();

  /**
   * A price for paid messages was changed in the supergroup chat.
   *
   * \param[in] paid_message_star_count_ The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message.
   */
  explicit messagePaidMessagePriceChanged(int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -344945397;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A price for direct messages was changed in the channel chat.
 */
class messageDirectMessagePriceChanged final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if direct messages group was enabled for the channel; false otherwise.
  bool is_enabled_;
  static jfieldID is_enabled_fieldID;
  /// The new number of Telegram Stars that must be paid by non-administrator users of the channel chat for each message sent to the direct messages group; 0 if the direct messages group was disabled or the messages are free.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * A price for direct messages was changed in the channel chat.
   */
  messageDirectMessagePriceChanged();

  /**
   * A price for direct messages was changed in the channel chat.
   *
   * \param[in] is_enabled_ True, if direct messages group was enabled for the channel; false otherwise.
   * \param[in] paid_message_star_count_ The new number of Telegram Stars that must be paid by non-administrator users of the channel chat for each message sent to the direct messages group; 0 if the direct messages group was disabled or the messages are free.
   */
  messageDirectMessagePriceChanged(bool is_enabled_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1320832439;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some tasks from a checklist were marked as done or not done.
 */
class messageChecklistTasksDone final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the checklist; may be 0 or an identifier of a deleted message.
  int53 checklist_message_id_;
  static jfieldID checklist_message_id_fieldID;
  /// Identifiers of tasks that were marked as done.
  array<int32> marked_as_done_task_ids_;
  static jfieldID marked_as_done_task_ids_fieldID;
  /// Identifiers of tasks that were marked as not done.
  array<int32> marked_as_not_done_task_ids_;
  static jfieldID marked_as_not_done_task_ids_fieldID;

  /**
   * Some tasks from a checklist were marked as done or not done.
   */
  messageChecklistTasksDone();

  /**
   * Some tasks from a checklist were marked as done or not done.
   *
   * \param[in] checklist_message_id_ Identifier of the message with the checklist; may be 0 or an identifier of a deleted message.
   * \param[in] marked_as_done_task_ids_ Identifiers of tasks that were marked as done.
   * \param[in] marked_as_not_done_task_ids_ Identifiers of tasks that were marked as not done.
   */
  messageChecklistTasksDone(int53 checklist_message_id_, array<int32> &&marked_as_done_task_ids_, array<int32> &&marked_as_not_done_task_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -716083401;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some tasks were added to a checklist.
 */
class messageChecklistTasksAdded final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the checklist; may be 0 or an identifier of a deleted message.
  int53 checklist_message_id_;
  static jfieldID checklist_message_id_fieldID;
  /// List of tasks added to the checklist.
  array<object_ptr<checklistTask>> tasks_;
  static jfieldID tasks_fieldID;

  /**
   * Some tasks were added to a checklist.
   */
  messageChecklistTasksAdded();

  /**
   * Some tasks were added to a checklist.
   *
   * \param[in] checklist_message_id_ Identifier of the message with the checklist; may be 0 or an identifier of a deleted message.
   * \param[in] tasks_ List of tasks added to the checklist.
   */
  messageChecklistTasksAdded(int53 checklist_message_id_, array<object_ptr<checklistTask>> &&tasks_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2057538984;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Approval of suggested post has failed, because the user which proposed the post had no enough funds.
 */
class messageSuggestedPostApprovalFailed final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
  int53 suggested_post_message_id_;
  static jfieldID suggested_post_message_id_fieldID;
  /// Price of the suggested post.
  object_ptr<SuggestedPostPrice> price_;
  static jfieldID price_fieldID;

  /**
   * Approval of suggested post has failed, because the user which proposed the post had no enough funds.
   */
  messageSuggestedPostApprovalFailed();

  /**
   * Approval of suggested post has failed, because the user which proposed the post had no enough funds.
   *
   * \param[in] suggested_post_message_id_ Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
   * \param[in] price_ Price of the suggested post.
   */
  messageSuggestedPostApprovalFailed(int53 suggested_post_message_id_, object_ptr<SuggestedPostPrice> &&price_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1752703725;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A suggested post was approved.
 */
class messageSuggestedPostApproved final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
  int53 suggested_post_message_id_;
  static jfieldID suggested_post_message_id_fieldID;
  /// Price of the suggested post; may be null if the post is non-paid.
  object_ptr<SuggestedPostPrice> price_;
  static jfieldID price_fieldID;
  /// Point in time (Unix timestamp) when the post is expected to be published.
  int32 send_date_;
  static jfieldID send_date_fieldID;

  /**
   * A suggested post was approved.
   */
  messageSuggestedPostApproved();

  /**
   * A suggested post was approved.
   *
   * \param[in] suggested_post_message_id_ Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
   * \param[in] price_ Price of the suggested post; may be null if the post is non-paid.
   * \param[in] send_date_ Point in time (Unix timestamp) when the post is expected to be published.
   */
  messageSuggestedPostApproved(int53 suggested_post_message_id_, object_ptr<SuggestedPostPrice> &&price_, int32 send_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 563425361;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A suggested post was declined.
 */
class messageSuggestedPostDeclined final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
  int53 suggested_post_message_id_;
  static jfieldID suggested_post_message_id_fieldID;
  /// Comment added by administrator of the channel when the post was declined.
  string comment_;
  static jfieldID comment_fieldID;

  /**
   * A suggested post was declined.
   */
  messageSuggestedPostDeclined();

  /**
   * A suggested post was declined.
   *
   * \param[in] suggested_post_message_id_ Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
   * \param[in] comment_ Comment added by administrator of the channel when the post was declined.
   */
  messageSuggestedPostDeclined(int53 suggested_post_message_id_, string const &comment_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -26948155;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A suggested post was published for getOption(&quot;suggested_post_lifetime_min&quot;) seconds and payment for the post was received.
 */
class messageSuggestedPostPaid final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
  int53 suggested_post_message_id_;
  static jfieldID suggested_post_message_id_fieldID;
  /// The amount of received Telegram Stars.
  object_ptr<starAmount> star_amount_;
  static jfieldID star_amount_fieldID;
  /// The amount of received Toncoins; in the smallest units of the cryptocurrency.
  int53 ton_amount_;
  static jfieldID ton_amount_fieldID;

  /**
   * A suggested post was published for getOption(&quot;suggested_post_lifetime_min&quot;) seconds and payment for the post was received.
   */
  messageSuggestedPostPaid();

  /**
   * A suggested post was published for getOption(&quot;suggested_post_lifetime_min&quot;) seconds and payment for the post was received.
   *
   * \param[in] suggested_post_message_id_ Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
   * \param[in] star_amount_ The amount of received Telegram Stars.
   * \param[in] ton_amount_ The amount of received Toncoins; in the smallest units of the cryptocurrency.
   */
  messageSuggestedPostPaid(int53 suggested_post_message_id_, object_ptr<starAmount> &&star_amount_, int53 ton_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1575439273;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A suggested post was refunded.
 */
class messageSuggestedPostRefunded final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
  int53 suggested_post_message_id_;
  static jfieldID suggested_post_message_id_fieldID;
  /// Reason of the refund.
  object_ptr<SuggestedPostRefundReason> reason_;
  static jfieldID reason_fieldID;

  /**
   * A suggested post was refunded.
   */
  messageSuggestedPostRefunded();

  /**
   * A suggested post was refunded.
   *
   * \param[in] suggested_post_message_id_ Identifier of the message with the suggested post; may be 0 or an identifier of a deleted message.
   * \param[in] reason_ Reason of the refund.
   */
  messageSuggestedPostRefunded(int53 suggested_post_message_id_, object_ptr<SuggestedPostRefundReason> &&reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -554073340;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A contact has registered with Telegram.
 */
class messageContactRegistered final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A contact has registered with Telegram.
   */
  messageContactRegistered();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1502020353;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The current user shared users, which were requested by the bot.
 */
class messageUsersShared final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The shared users.
  array<object_ptr<sharedUser>> users_;
  static jfieldID users_fieldID;
  /// Identifier of the keyboard button with the request.
  int32 button_id_;
  static jfieldID button_id_fieldID;

  /**
   * The current user shared users, which were requested by the bot.
   */
  messageUsersShared();

  /**
   * The current user shared users, which were requested by the bot.
   *
   * \param[in] users_ The shared users.
   * \param[in] button_id_ Identifier of the keyboard button with the request.
   */
  messageUsersShared(array<object_ptr<sharedUser>> &&users_, int32 button_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -842442318;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The current user shared a chat, which was requested by the bot.
 */
class messageChatShared final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The shared chat.
  object_ptr<sharedChat> chat_;
  static jfieldID chat_fieldID;
  /// Identifier of the keyboard button with the request.
  int32 button_id_;
  static jfieldID button_id_fieldID;

  /**
   * The current user shared a chat, which was requested by the bot.
   */
  messageChatShared();

  /**
   * The current user shared a chat, which was requested by the bot.
   *
   * \param[in] chat_ The shared chat.
   * \param[in] button_id_ Identifier of the keyboard button with the request.
   */
  messageChatShared(object_ptr<sharedChat> &&chat_, int32 button_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1362699935;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user allowed the bot to send messages.
 */
class messageBotWriteAccessAllowed final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The reason why the bot was allowed to write messages.
  object_ptr<BotWriteAccessAllowReason> reason_;
  static jfieldID reason_fieldID;

  /**
   * The user allowed the bot to send messages.
   */
  messageBotWriteAccessAllowed();

  /**
   * The user allowed the bot to send messages.
   *
   * \param[in] reason_ The reason why the bot was allowed to write messages.
   */
  explicit messageBotWriteAccessAllowed(object_ptr<BotWriteAccessAllowReason> &&reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1702185036;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Data from a Web App has been sent to a bot.
 */
class messageWebAppDataSent final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the keyboardButtonTypeWebApp button, which opened the Web App.
  string button_text_;
  static jfieldID button_text_fieldID;

  /**
   * Data from a Web App has been sent to a bot.
   */
  messageWebAppDataSent();

  /**
   * Data from a Web App has been sent to a bot.
   *
   * \param[in] button_text_ Text of the keyboardButtonTypeWebApp button, which opened the Web App.
   */
  explicit messageWebAppDataSent(string const &button_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -83674862;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Data from a Web App has been received; for bots only.
 */
class messageWebAppDataReceived final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the keyboardButtonTypeWebApp button, which opened the Web App.
  string button_text_;
  static jfieldID button_text_fieldID;
  /// The data.
  string data_;
  static jfieldID data_fieldID;

  /**
   * Data from a Web App has been received; for bots only.
   */
  messageWebAppDataReceived();

  /**
   * Data from a Web App has been received; for bots only.
   *
   * \param[in] button_text_ Text of the keyboardButtonTypeWebApp button, which opened the Web App.
   * \param[in] data_ The data.
   */
  messageWebAppDataReceived(string const &button_text_, string const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -8578539;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Telegram Passport data has been sent to a bot.
 */
class messagePassportDataSent final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of Telegram Passport element types sent.
  array<object_ptr<PassportElementType>> types_;
  static jfieldID types_fieldID;

  /**
   * Telegram Passport data has been sent to a bot.
   */
  messagePassportDataSent();

  /**
   * Telegram Passport data has been sent to a bot.
   *
   * \param[in] types_ List of Telegram Passport element types sent.
   */
  explicit messagePassportDataSent(array<object_ptr<PassportElementType>> &&types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1017405171;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Telegram Passport data has been received; for bots only.
 */
class messagePassportDataReceived final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of received Telegram Passport elements.
  array<object_ptr<encryptedPassportElement>> elements_;
  static jfieldID elements_fieldID;
  /// Encrypted data credentials.
  object_ptr<encryptedCredentials> credentials_;
  static jfieldID credentials_fieldID;

  /**
   * Telegram Passport data has been received; for bots only.
   */
  messagePassportDataReceived();

  /**
   * Telegram Passport data has been received; for bots only.
   *
   * \param[in] elements_ List of received Telegram Passport elements.
   * \param[in] credentials_ Encrypted data credentials.
   */
  messagePassportDataReceived(array<object_ptr<encryptedPassportElement>> &&elements_, object_ptr<encryptedCredentials> &&credentials_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1367863624;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user in the chat came within proximity alert range.
 */
class messageProximityAlertTriggered final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of a user or chat that triggered the proximity alert.
  object_ptr<MessageSender> traveler_id_;
  static jfieldID traveler_id_fieldID;
  /// The identifier of a user or chat that subscribed for the proximity alert.
  object_ptr<MessageSender> watcher_id_;
  static jfieldID watcher_id_fieldID;
  /// The distance between the users.
  int32 distance_;
  static jfieldID distance_fieldID;

  /**
   * A user in the chat came within proximity alert range.
   */
  messageProximityAlertTriggered();

  /**
   * A user in the chat came within proximity alert range.
   *
   * \param[in] traveler_id_ The identifier of a user or chat that triggered the proximity alert.
   * \param[in] watcher_id_ The identifier of a user or chat that subscribed for the proximity alert.
   * \param[in] distance_ The distance between the users.
   */
  messageProximityAlertTriggered(object_ptr<MessageSender> &&traveler_id_, object_ptr<MessageSender> &&watcher_id_, int32 distance_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 67761875;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message content that is not supported in the current TDLib version.
 */
class messageUnsupported final : public MessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A message content that is not supported in the current TDLib version.
   */
  messageUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1816726139;

  static object_ptr<MessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied.
 */
class messageCopyOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local. Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable.
  bool send_copy_;
  static jfieldID send_copy_fieldID;
  /// True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false.
  bool replace_caption_;
  static jfieldID replace_caption_fieldID;
  /// New message caption; pass null to copy message without caption. Ignored if replace_caption is false.
  object_ptr<formattedText> new_caption_;
  static jfieldID new_caption_fieldID;
  /// True, if new caption must be shown above the media; otherwise, new caption must be shown below the media; not supported in secret chats. Ignored if replace_caption is false.
  bool new_show_caption_above_media_;
  static jfieldID new_show_caption_above_media_fieldID;

  /**
   * Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied.
   */
  messageCopyOptions();

  /**
   * Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied.
   *
   * \param[in] send_copy_ True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local. Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable.
   * \param[in] replace_caption_ True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false.
   * \param[in] new_caption_ New message caption; pass null to copy message without caption. Ignored if replace_caption is false.
   * \param[in] new_show_caption_above_media_ True, if new caption must be shown above the media; otherwise, new caption must be shown below the media; not supported in secret chats. Ignored if replace_caption is false.
   */
  messageCopyOptions(bool send_copy_, bool replace_caption_, object_ptr<formattedText> &&new_caption_, bool new_show_caption_above_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1079772090;

  static object_ptr<messageCopyOptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageEffectType;

class sticker;

/**
 * Contains information about an effect added to a message.
 */
class messageEffect final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the effect.
  int64 id_;
  static jfieldID id_fieldID;
  /// Static icon for the effect in WEBP format; may be null if none.
  object_ptr<sticker> static_icon_;
  static jfieldID static_icon_fieldID;
  /// Emoji corresponding to the effect that can be used if static icon isn't available.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// True, if Telegram Premium subscription is required to use the effect.
  bool is_premium_;
  static jfieldID is_premium_fieldID;
  /// Type of the effect.
  object_ptr<MessageEffectType> type_;
  static jfieldID type_fieldID;

  /**
   * Contains information about an effect added to a message.
   */
  messageEffect();

  /**
   * Contains information about an effect added to a message.
   *
   * \param[in] id_ Unique identifier of the effect.
   * \param[in] static_icon_ Static icon for the effect in WEBP format; may be null if none.
   * \param[in] emoji_ Emoji corresponding to the effect that can be used if static icon isn't available.
   * \param[in] is_premium_ True, if Telegram Premium subscription is required to use the effect.
   * \param[in] type_ Type of the effect.
   */
  messageEffect(int64 id_, object_ptr<sticker> &&static_icon_, string const &emoji_, bool is_premium_, object_ptr<MessageEffectType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1758836433;

  static object_ptr<messageEffect> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * This class is an abstract base class.
 * Describes type of emoji effect.
 */
class MessageEffectType: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageEffectType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An effect from an emoji reaction.
 */
class messageEffectTypeEmojiReaction final : public MessageEffectType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Select animation for the effect in TGS format.
  object_ptr<sticker> select_animation_;
  static jfieldID select_animation_fieldID;
  /// Effect animation for the effect in TGS format.
  object_ptr<sticker> effect_animation_;
  static jfieldID effect_animation_fieldID;

  /**
   * An effect from an emoji reaction.
   */
  messageEffectTypeEmojiReaction();

  /**
   * An effect from an emoji reaction.
   *
   * \param[in] select_animation_ Select animation for the effect in TGS format.
   * \param[in] effect_animation_ Effect animation for the effect in TGS format.
   */
  messageEffectTypeEmojiReaction(object_ptr<sticker> &&select_animation_, object_ptr<sticker> &&effect_animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1756079678;

  static object_ptr<MessageEffectType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An effect from a premium sticker.
 */
class messageEffectTypePremiumSticker final : public MessageEffectType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The premium sticker. The effect can be found at sticker.full_type.premium_animation.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * An effect from a premium sticker.
   */
  messageEffectTypePremiumSticker();

  /**
   * An effect from a premium sticker.
   *
   * \param[in] sticker_ The premium sticker. The effect can be found at sticker.full_type.premium_animation.
   */
  explicit messageEffectTypePremiumSticker(object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1637231609;

  static object_ptr<MessageEffectType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about a file with messages exported from another app.
 */
class MessageFileType: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageFileType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The messages were exported from a private chat.
 */
class messageFileTypePrivate final : public MessageFileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the other party; may be empty if unrecognized.
  string name_;
  static jfieldID name_fieldID;

  /**
   * The messages were exported from a private chat.
   */
  messageFileTypePrivate();

  /**
   * The messages were exported from a private chat.
   *
   * \param[in] name_ Name of the other party; may be empty if unrecognized.
   */
  explicit messageFileTypePrivate(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -521908524;

  static object_ptr<MessageFileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The messages were exported from a group chat.
 */
class messageFileTypeGroup final : public MessageFileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the group chat; may be empty if unrecognized.
  string title_;
  static jfieldID title_fieldID;

  /**
   * The messages were exported from a group chat.
   */
  messageFileTypeGroup();

  /**
   * The messages were exported from a group chat.
   *
   * \param[in] title_ Title of the group chat; may be empty if unrecognized.
   */
  explicit messageFileTypeGroup(string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -219836568;

  static object_ptr<MessageFileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The messages were exported from a chat of unknown type.
 */
class messageFileTypeUnknown final : public MessageFileType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The messages were exported from a chat of unknown type.
   */
  messageFileTypeUnknown();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1176353458;

  static object_ptr<MessageFileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageOrigin;

class forwardSource;

/**
 * Contains information about a forwarded message.
 */
class messageForwardInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Origin of the forwarded message.
  object_ptr<MessageOrigin> origin_;
  static jfieldID origin_fieldID;
  /// Point in time (Unix timestamp) when the message was originally sent.
  int32 date_;
  static jfieldID date_fieldID;
  /// For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown.
  object_ptr<forwardSource> source_;
  static jfieldID source_fieldID;
  /// The type of public service announcement for the forwarded message.
  string public_service_announcement_type_;
  static jfieldID public_service_announcement_type_fieldID;

  /**
   * Contains information about a forwarded message.
   */
  messageForwardInfo();

  /**
   * Contains information about a forwarded message.
   *
   * \param[in] origin_ Origin of the forwarded message.
   * \param[in] date_ Point in time (Unix timestamp) when the message was originally sent.
   * \param[in] source_ For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown.
   * \param[in] public_service_announcement_type_ The type of public service announcement for the forwarded message.
   */
  messageForwardInfo(object_ptr<MessageOrigin> &&origin_, int32 date_, object_ptr<forwardSource> &&source_, string const &public_service_announcement_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -880313475;

  static object_ptr<messageForwardInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a message created with importMessages.
 */
class messageImportInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the original sender.
  string sender_name_;
  static jfieldID sender_name_fieldID;
  /// Point in time (Unix timestamp) when the message was originally sent.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Contains information about a message created with importMessages.
   */
  messageImportInfo();

  /**
   * Contains information about a message created with importMessages.
   *
   * \param[in] sender_name_ Name of the original sender.
   * \param[in] date_ Point in time (Unix timestamp) when the message was originally sent.
   */
  messageImportInfo(string const &sender_name_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -421549105;

  static object_ptr<messageImportInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class messageReactions;

class messageReplyInfo;

/**
 * Contains information about interactions with a message.
 */
class messageInteractionInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of times the message was viewed.
  int32 view_count_;
  static jfieldID view_count_fieldID;
  /// Number of times the message was forwarded.
  int32 forward_count_;
  static jfieldID forward_count_fieldID;
  /// Information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself.
  object_ptr<messageReplyInfo> reply_info_;
  static jfieldID reply_info_fieldID;
  /// The list of reactions or tags added to the message; may be null.
  object_ptr<messageReactions> reactions_;
  static jfieldID reactions_fieldID;

  /**
   * Contains information about interactions with a message.
   */
  messageInteractionInfo();

  /**
   * Contains information about interactions with a message.
   *
   * \param[in] view_count_ Number of times the message was viewed.
   * \param[in] forward_count_ Number of times the message was forwarded.
   * \param[in] reply_info_ Information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself.
   * \param[in] reactions_ The list of reactions or tags added to the message; may be null.
   */
  messageInteractionInfo(int32 view_count_, int32 forward_count_, object_ptr<messageReplyInfo> &&reply_info_, object_ptr<messageReactions> &&reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 733797893;

  static object_ptr<messageInteractionInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains an HTTPS link to a message in a supergroup or channel, or a forum topic.
 */
class messageLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link.
  string link_;
  static jfieldID link_fieldID;
  /// True, if the link will work for non-members of the chat.
  bool is_public_;
  static jfieldID is_public_fieldID;

  /**
   * Contains an HTTPS link to a message in a supergroup or channel, or a forum topic.
   */
  messageLink();

  /**
   * Contains an HTTPS link to a message in a supergroup or channel, or a forum topic.
   *
   * \param[in] link_ The link.
   * \param[in] is_public_ True, if the link will work for non-members of the chat.
   */
  messageLink(string const &link_, bool is_public_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1354089818;

  static object_ptr<messageLink> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

class message;

/**
 * Contains information about a link to a message or a forum topic in a chat.
 */
class messageLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the link is a public link for a message or a forum topic in a chat.
  bool is_public_;
  static jfieldID is_public_fieldID;
  /// If found, identifier of the chat to which the link points, 0 otherwise.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the specific topic in which the message must be opened, or a topic to open if the message is missing; may be null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// If found, the linked message; may be null.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// Timestamp from which the video/audio/video note/voice note/story playing must start, in seconds; 0 if not specified. The media can be in the message content or in its link preview.
  int32 media_timestamp_;
  static jfieldID media_timestamp_fieldID;
  /// Identifier of the checklist task that is linked; 0 if none.
  int32 checklist_task_id_;
  static jfieldID checklist_task_id_fieldID;
  /// Identifier of the poll option that is linked; empty if none.
  string poll_option_id_;
  static jfieldID poll_option_id_fieldID;
  /// True, if the whole media album to which the message belongs is linked.
  bool for_album_;
  static jfieldID for_album_fieldID;

  /**
   * Contains information about a link to a message or a forum topic in a chat.
   */
  messageLinkInfo();

  /**
   * Contains information about a link to a message or a forum topic in a chat.
   *
   * \param[in] is_public_ True, if the link is a public link for a message or a forum topic in a chat.
   * \param[in] chat_id_ If found, identifier of the chat to which the link points, 0 otherwise.
   * \param[in] topic_id_ Identifier of the specific topic in which the message must be opened, or a topic to open if the message is missing; may be null if none.
   * \param[in] message_ If found, the linked message; may be null.
   * \param[in] media_timestamp_ Timestamp from which the video/audio/video note/voice note/story playing must start, in seconds; 0 if not specified. The media can be in the message content or in its link preview.
   * \param[in] checklist_task_id_ Identifier of the checklist task that is linked; 0 if none.
   * \param[in] poll_option_id_ Identifier of the poll option that is linked; empty if none.
   * \param[in] for_album_ True, if the whole media album to which the message belongs is linked.
   */
  messageLinkInfo(bool is_public_, int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<message> &&message_, int32 media_timestamp_, int32 checklist_task_id_, string const &poll_option_id_, bool for_album_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1091360815;

  static object_ptr<messageLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about the origin of a message.
 */
class MessageOrigin: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageOrigin> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was originally sent by a known user.
 */
class messageOriginUser final : public MessageOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who originally sent the message.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;

  /**
   * The message was originally sent by a known user.
   */
  messageOriginUser();

  /**
   * The message was originally sent by a known user.
   *
   * \param[in] sender_user_id_ Identifier of the user who originally sent the message.
   */
  explicit messageOriginUser(int53 sender_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1677684669;

  static object_ptr<MessageOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was originally sent by a user, which is hidden by their privacy settings.
 */
class messageOriginHiddenUser final : public MessageOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the sender.
  string sender_name_;
  static jfieldID sender_name_fieldID;

  /**
   * The message was originally sent by a user, which is hidden by their privacy settings.
   */
  messageOriginHiddenUser();

  /**
   * The message was originally sent by a user, which is hidden by their privacy settings.
   *
   * \param[in] sender_name_ Name of the sender.
   */
  explicit messageOriginHiddenUser(string const &sender_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -317971494;

  static object_ptr<MessageOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was originally sent on behalf of a chat.
 */
class messageOriginChat final : public MessageOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that originally sent the message.
  int53 sender_chat_id_;
  static jfieldID sender_chat_id_fieldID;
  /// For messages originally sent by an anonymous chat administrator, original message author signature.
  string author_signature_;
  static jfieldID author_signature_fieldID;

  /**
   * The message was originally sent on behalf of a chat.
   */
  messageOriginChat();

  /**
   * The message was originally sent on behalf of a chat.
   *
   * \param[in] sender_chat_id_ Identifier of the chat that originally sent the message.
   * \param[in] author_signature_ For messages originally sent by an anonymous chat administrator, original message author signature.
   */
  messageOriginChat(int53 sender_chat_id_, string const &author_signature_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -205824332;

  static object_ptr<MessageOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was originally a post in a channel.
 */
class messageOriginChannel final : public MessageOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat to which the message was originally sent.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier of the original message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Original post author signature.
  string author_signature_;
  static jfieldID author_signature_fieldID;

  /**
   * The message was originally a post in a channel.
   */
  messageOriginChannel();

  /**
   * The message was originally a post in a channel.
   *
   * \param[in] chat_id_ Identifier of the channel chat to which the message was originally sent.
   * \param[in] message_id_ Message identifier of the original message.
   * \param[in] author_signature_ Original post author signature.
   */
  messageOriginChannel(int53 chat_id_, int53 message_id_, string const &author_signature_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1451535938;

  static object_ptr<MessageOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a message in a specific position.
 */
class messagePosition final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// 0-based message position in the full list of suitable messages.
  int32 position_;
  static jfieldID position_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Point in time (Unix timestamp) when the message was sent.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Contains information about a message in a specific position.
   */
  messagePosition();

  /**
   * Contains information about a message in a specific position.
   *
   * \param[in] position_ 0-based message position in the full list of suitable messages.
   * \param[in] message_id_ Message identifier.
   * \param[in] date_ Point in time (Unix timestamp) when the message was sent.
   */
  messagePosition(int32 position_, int53 message_id_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1292189935;

  static object_ptr<messagePosition> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class messagePosition;

/**
 * Contains a list of message positions.
 */
class messagePositions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total number of messages found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of message positions.
  array<object_ptr<messagePosition>> positions_;
  static jfieldID positions_fieldID;

  /**
   * Contains a list of message positions.
   */
  messagePositions();

  /**
   * Contains a list of message positions.
   *
   * \param[in] total_count_ Total number of messages found.
   * \param[in] positions_ List of message positions.
   */
  messagePositions(int32 total_count_, array<object_ptr<messagePosition>> &&positions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1930466649;

  static object_ptr<messagePositions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains properties of a message and describes actions that can be done with the message right now.
 */
class messageProperties final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if an offer can be added to the message using addOffer.
  bool can_add_offer_;
  static jfieldID can_add_offer_fieldID;
  /// True, if tasks can be added to the message's checklist using addChecklistTasks if the current user has Telegram Premium subscription.
  bool can_add_tasks_;
  static jfieldID can_add_tasks_fieldID;
  /// True, if the message is a suggested post that can be approved by the user using approveSuggestedPost.
  bool can_be_approved_;
  static jfieldID can_be_approved_fieldID;
  /// True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options.
  bool can_be_copied_;
  static jfieldID can_be_copied_fieldID;
  /// True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options.
  bool can_be_copied_to_secret_chat_;
  static jfieldID can_be_copied_to_secret_chat_fieldID;
  /// True, if the message is a suggested post that can be declined by the user using declineSuggestedPost.
  bool can_be_declined_;
  static jfieldID can_be_declined_fieldID;
  /// True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false.
  bool can_be_deleted_only_for_self_;
  static jfieldID can_be_deleted_only_for_self_fieldID;
  /// True, if the message can be deleted for all users using the method deleteMessages with revoke == true.
  bool can_be_deleted_for_all_users_;
  static jfieldID can_be_deleted_for_all_users_fieldID;
  /// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location, poll, and checklist messages this fields shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message.
  bool can_be_edited_;
  static jfieldID can_be_edited_fieldID;
  /// True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options.
  bool can_be_forwarded_;
  static jfieldID can_be_forwarded_fieldID;
  /// True, if the message can be paid using inputInvoiceMessage.
  bool can_be_paid_;
  static jfieldID can_be_paid_fieldID;
  /// True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage.
  bool can_be_pinned_;
  static jfieldID can_be_pinned_fieldID;
  /// True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage.
  bool can_be_replied_;
  static jfieldID can_be_replied_fieldID;
  /// True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage.
  bool can_be_replied_in_another_chat_;
  static jfieldID can_be_replied_in_another_chat_fieldID;
  /// True, if content of the message can be saved locally.
  bool can_be_saved_;
  static jfieldID can_be_saved_fieldID;
  /// True, if the message can be shared in a story using inputStoryAreaTypeMessage.
  bool can_be_shared_in_story_;
  static jfieldID can_be_shared_in_story_fieldID;
  /// True, if the user can delete reactions of other users in the message using the method deleteMessageReactionsFromSender.
  bool can_delete_reactions_;
  static jfieldID can_delete_reactions_fieldID;
  /// True, if the message can be edited using the method editMessageMedia.
  bool can_edit_media_;
  static jfieldID can_edit_media_fieldID;
  /// True, if scheduling state of the message can be edited.
  bool can_edit_scheduling_state_;
  static jfieldID can_edit_scheduling_state_fieldID;
  /// True, if another price or post send time can be suggested using addOffer.
  bool can_edit_suggested_post_info_;
  static jfieldID can_edit_suggested_post_info_fieldID;
  /// True, if author of the message sent on behalf of a chat can be received through getMessageAuthor.
  bool can_get_author_;
  static jfieldID can_get_author_fieldID;
  /// True, if code for message embedding can be received using getMessageEmbeddingCode.
  bool can_get_embedding_code_;
  static jfieldID can_get_embedding_code_fieldID;
  /// True, if a link can be generated for the message using getMessageLink.
  bool can_get_link_;
  static jfieldID can_get_link_fieldID;
  /// True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink.
  bool can_get_media_timestamp_links_;
  static jfieldID can_get_media_timestamp_links_fieldID;
  /// True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
  bool can_get_message_thread_;
  static jfieldID can_get_message_thread_fieldID;
  /// True, if the message is a poll and vote statistics are available through getPollVoteStatistics.
  bool can_get_poll_vote_statistics_;
  static jfieldID can_get_poll_vote_statistics_fieldID;
  /// True, if read date of the message can be received through getMessageReadDate.
  bool can_get_read_date_;
  static jfieldID can_get_read_date_fieldID;
  /// True, if message statistics are available through getMessageStatistics and message forwards can be received using getMessagePublicForwards.
  bool can_get_statistics_;
  static jfieldID can_get_statistics_fieldID;
  /// True, if advertisements for video of the message can be received through getVideoMessageAdvertisements.
  bool can_get_video_advertisements_;
  static jfieldID can_get_video_advertisements_fieldID;
  /// True, if chat members already viewed the message can be received through getMessageViewers.
  bool can_get_viewers_;
  static jfieldID can_get_viewers_fieldID;
  /// True, if tasks can be marked as done or not done in the message's checklist using markChecklistTasksAsDone if the current user has Telegram Premium subscription.
  bool can_mark_tasks_as_done_;
  static jfieldID can_mark_tasks_as_done_fieldID;
  /// True, if speech can be recognized for the message through recognizeSpeech.
  bool can_recognize_speech_;
  static jfieldID can_recognize_speech_fieldID;
  /// True, if the message can be reported using reportChat.
  bool can_report_chat_;
  static jfieldID can_report_chat_fieldID;
  /// True, if reactions on the message can be reported through reportMessageReactions.
  bool can_report_reactions_;
  static jfieldID can_report_reactions_fieldID;
  /// True, if the message can be reported using reportSupergroupSpam.
  bool can_report_supergroup_spam_;
  static jfieldID can_report_supergroup_spam_fieldID;
  /// True, if fact check for the message can be changed through setMessageFactCheck.
  bool can_set_fact_check_;
  static jfieldID can_set_fact_check_fieldID;
  /// True, if content of the message can't be saved locally, because it is protected by the current user; if true, then can_be_saved is false.
  bool has_protected_content_by_current_user_;
  static jfieldID has_protected_content_by_current_user_fieldID;
  /// True, if content of the message can't be saved locally, because it is protected by the other user; if true, then can_be_saved is false.
  bool has_protected_content_by_other_user_;
  static jfieldID has_protected_content_by_other_user_fieldID;
  /// True, if message statistics must be available from context menu of the message.
  bool need_show_statistics_;
  static jfieldID need_show_statistics_fieldID;

  /**
   * Contains properties of a message and describes actions that can be done with the message right now.
   */
  messageProperties();

  /**
   * Contains properties of a message and describes actions that can be done with the message right now.
   *
   * \param[in] can_add_offer_ True, if an offer can be added to the message using addOffer.
   * \param[in] can_add_tasks_ True, if tasks can be added to the message's checklist using addChecklistTasks if the current user has Telegram Premium subscription.
   * \param[in] can_be_approved_ True, if the message is a suggested post that can be approved by the user using approveSuggestedPost.
   * \param[in] can_be_copied_ True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options.
   * \param[in] can_be_copied_to_secret_chat_ True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options.
   * \param[in] can_be_declined_ True, if the message is a suggested post that can be declined by the user using declineSuggestedPost.
   * \param[in] can_be_deleted_only_for_self_ True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false.
   * \param[in] can_be_deleted_for_all_users_ True, if the message can be deleted for all users using the method deleteMessages with revoke == true.
   * \param[in] can_be_edited_ True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location, poll, and checklist messages this fields shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message.
   * \param[in] can_be_forwarded_ True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options.
   * \param[in] can_be_paid_ True, if the message can be paid using inputInvoiceMessage.
   * \param[in] can_be_pinned_ True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage.
   * \param[in] can_be_replied_ True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage.
   * \param[in] can_be_replied_in_another_chat_ True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage.
   * \param[in] can_be_saved_ True, if content of the message can be saved locally.
   * \param[in] can_be_shared_in_story_ True, if the message can be shared in a story using inputStoryAreaTypeMessage.
   * \param[in] can_delete_reactions_ True, if the user can delete reactions of other users in the message using the method deleteMessageReactionsFromSender.
   * \param[in] can_edit_media_ True, if the message can be edited using the method editMessageMedia.
   * \param[in] can_edit_scheduling_state_ True, if scheduling state of the message can be edited.
   * \param[in] can_edit_suggested_post_info_ True, if another price or post send time can be suggested using addOffer.
   * \param[in] can_get_author_ True, if author of the message sent on behalf of a chat can be received through getMessageAuthor.
   * \param[in] can_get_embedding_code_ True, if code for message embedding can be received using getMessageEmbeddingCode.
   * \param[in] can_get_link_ True, if a link can be generated for the message using getMessageLink.
   * \param[in] can_get_media_timestamp_links_ True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink.
   * \param[in] can_get_message_thread_ True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
   * \param[in] can_get_poll_vote_statistics_ True, if the message is a poll and vote statistics are available through getPollVoteStatistics.
   * \param[in] can_get_read_date_ True, if read date of the message can be received through getMessageReadDate.
   * \param[in] can_get_statistics_ True, if message statistics are available through getMessageStatistics and message forwards can be received using getMessagePublicForwards.
   * \param[in] can_get_video_advertisements_ True, if advertisements for video of the message can be received through getVideoMessageAdvertisements.
   * \param[in] can_get_viewers_ True, if chat members already viewed the message can be received through getMessageViewers.
   * \param[in] can_mark_tasks_as_done_ True, if tasks can be marked as done or not done in the message's checklist using markChecklistTasksAsDone if the current user has Telegram Premium subscription.
   * \param[in] can_recognize_speech_ True, if speech can be recognized for the message through recognizeSpeech.
   * \param[in] can_report_chat_ True, if the message can be reported using reportChat.
   * \param[in] can_report_reactions_ True, if reactions on the message can be reported through reportMessageReactions.
   * \param[in] can_report_supergroup_spam_ True, if the message can be reported using reportSupergroupSpam.
   * \param[in] can_set_fact_check_ True, if fact check for the message can be changed through setMessageFactCheck.
   * \param[in] has_protected_content_by_current_user_ True, if content of the message can't be saved locally, because it is protected by the current user; if true, then can_be_saved is false.
   * \param[in] has_protected_content_by_other_user_ True, if content of the message can't be saved locally, because it is protected by the other user; if true, then can_be_saved is false.
   * \param[in] need_show_statistics_ True, if message statistics must be available from context menu of the message.
   */
  messageProperties(bool can_add_offer_, bool can_add_tasks_, bool can_be_approved_, bool can_be_copied_, bool can_be_copied_to_secret_chat_, bool can_be_declined_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_paid_, bool can_be_pinned_, bool can_be_replied_, bool can_be_replied_in_another_chat_, bool can_be_saved_, bool can_be_shared_in_story_, bool can_delete_reactions_, bool can_edit_media_, bool can_edit_scheduling_state_, bool can_edit_suggested_post_info_, bool can_get_author_, bool can_get_embedding_code_, bool can_get_link_, bool can_get_media_timestamp_links_, bool can_get_message_thread_, bool can_get_poll_vote_statistics_, bool can_get_read_date_, bool can_get_statistics_, bool can_get_video_advertisements_, bool can_get_viewers_, bool can_mark_tasks_as_done_, bool can_recognize_speech_, bool can_report_chat_, bool can_report_reactions_, bool can_report_supergroup_spam_, bool can_set_fact_check_, bool has_protected_content_by_current_user_, bool has_protected_content_by_other_user_, bool need_show_statistics_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -688751636;

  static object_ptr<messageProperties> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ReactionType;

/**
 * Contains information about a reaction to a message.
 */
class messageReaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  static jfieldID type_fieldID;
  /// Number of times the reaction was added.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// True, if the reaction is chosen by the current user.
  bool is_chosen_;
  static jfieldID is_chosen_fieldID;
  /// Identifier of the message sender used by the current user to add the reaction; may be null if unknown or the reaction isn't chosen.
  object_ptr<MessageSender> used_sender_id_;
  static jfieldID used_sender_id_fieldID;
  /// Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats.
  array<object_ptr<MessageSender>> recent_sender_ids_;
  static jfieldID recent_sender_ids_fieldID;

  /**
   * Contains information about a reaction to a message.
   */
  messageReaction();

  /**
   * Contains information about a reaction to a message.
   *
   * \param[in] type_ Type of the reaction.
   * \param[in] total_count_ Number of times the reaction was added.
   * \param[in] is_chosen_ True, if the reaction is chosen by the current user.
   * \param[in] used_sender_id_ Identifier of the message sender used by the current user to add the reaction; may be null if unknown or the reaction isn't chosen.
   * \param[in] recent_sender_ids_ Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats.
   */
  messageReaction(object_ptr<ReactionType> &&type_, int32 total_count_, bool is_chosen_, object_ptr<MessageSender> &&used_sender_id_, array<object_ptr<MessageSender>> &&recent_sender_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1093994369;

  static object_ptr<messageReaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class messageReaction;

class paidReactor;

/**
 * Contains a list of reactions added to a message.
 */
class messageReactions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of added reactions.
  array<object_ptr<messageReaction>> reactions_;
  static jfieldID reactions_fieldID;
  /// True, if the reactions are tags and Telegram Premium users can filter messages by them.
  bool are_tags_;
  static jfieldID are_tags_fieldID;
  /// Information about top users that added the paid reaction.
  array<object_ptr<paidReactor>> paid_reactors_;
  static jfieldID paid_reactors_fieldID;
  /// True, if the list of added reactions is available using getMessageAddedReactions.
  bool can_get_added_reactions_;
  static jfieldID can_get_added_reactions_fieldID;

  /**
   * Contains a list of reactions added to a message.
   */
  messageReactions();

  /**
   * Contains a list of reactions added to a message.
   *
   * \param[in] reactions_ List of added reactions.
   * \param[in] are_tags_ True, if the reactions are tags and Telegram Premium users can filter messages by them.
   * \param[in] paid_reactors_ Information about top users that added the paid reaction.
   * \param[in] can_get_added_reactions_ True, if the list of added reactions is available using getMessageAddedReactions.
   */
  messageReactions(array<object_ptr<messageReaction>> &&reactions_, bool are_tags_, array<object_ptr<paidReactor>> &&paid_reactors_, bool can_get_added_reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1475966817;

  static object_ptr<messageReactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes read date of a recent outgoing message in a private chat.
 */
class MessageReadDate: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageReadDate> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains read date of the message.
 */
class messageReadDateRead final : public MessageReadDate {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the message was read by the other user.
  int32 read_date_;
  static jfieldID read_date_fieldID;

  /**
   * Contains read date of the message.
   */
  messageReadDateRead();

  /**
   * Contains read date of the message.
   *
   * \param[in] read_date_ Point in time (Unix timestamp) when the message was read by the other user.
   */
  explicit messageReadDateRead(int32 read_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1972186672;

  static object_ptr<MessageReadDate> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is unread yet.
 */
class messageReadDateUnread final : public MessageReadDate {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is unread yet.
   */
  messageReadDateUnread();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 397549868;

  static object_ptr<MessageReadDate> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is too old to get read date.
 */
class messageReadDateTooOld final : public MessageReadDate {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is too old to get read date.
   */
  messageReadDateTooOld();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1233773024;

  static object_ptr<MessageReadDate> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The read date is unknown due to privacy settings of the other user.
 */
class messageReadDateUserPrivacyRestricted final : public MessageReadDate {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The read date is unknown due to privacy settings of the other user.
   */
  messageReadDateUserPrivacyRestricted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1282567130;

  static object_ptr<MessageReadDate> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The read date is unknown due to privacy settings of the current user, but will be known if the user subscribes to Telegram Premium.
 */
class messageReadDateMyPrivacyRestricted final : public MessageReadDate {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The read date is unknown due to privacy settings of the current user, but will be known if the user subscribes to Telegram Premium.
   */
  messageReadDateMyPrivacyRestricted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -693971852;

  static object_ptr<MessageReadDate> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Contains information about replies to a message.
 */
class messageReplyInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of times the message was directly or indirectly replied.
  int32 reply_count_;
  static jfieldID reply_count_fieldID;
  /// Identifiers of at most 3 recent repliers to the message; available in channels with a discussion supergroup. The users and chats are expected to be inaccessible: only their photo and name will be available.
  array<object_ptr<MessageSender>> recent_replier_ids_;
  static jfieldID recent_replier_ids_fieldID;
  /// Identifier of the last read incoming reply to the message.
  int53 last_read_inbox_message_id_;
  static jfieldID last_read_inbox_message_id_fieldID;
  /// Identifier of the last read outgoing reply to the message.
  int53 last_read_outbox_message_id_;
  static jfieldID last_read_outbox_message_id_fieldID;
  /// Identifier of the last reply to the message.
  int53 last_message_id_;
  static jfieldID last_message_id_fieldID;

  /**
   * Contains information about replies to a message.
   */
  messageReplyInfo();

  /**
   * Contains information about replies to a message.
   *
   * \param[in] reply_count_ Number of times the message was directly or indirectly replied.
   * \param[in] recent_replier_ids_ Identifiers of at most 3 recent repliers to the message; available in channels with a discussion supergroup. The users and chats are expected to be inaccessible: only their photo and name will be available.
   * \param[in] last_read_inbox_message_id_ Identifier of the last read incoming reply to the message.
   * \param[in] last_read_outbox_message_id_ Identifier of the last read outgoing reply to the message.
   * \param[in] last_message_id_ Identifier of the last reply to the message.
   */
  messageReplyInfo(int32 reply_count_, array<object_ptr<MessageSender>> &&recent_replier_ids_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int53 last_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2093702263;

  static object_ptr<messageReplyInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageContent;

class MessageOrigin;

class textQuote;

/**
 * This class is an abstract base class.
 * Contains information about the message or the story a message is replying to.
 */
class MessageReplyTo: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageReplyTo> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a message replied by a given message.
 */
class messageReplyToMessage final : public MessageReplyTo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the chat to which the message belongs; may be 0 if the replied message is in unknown chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The identifier of the message; may be 0 if the replied message is in unknown chat.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Chosen quote from the replied message; may be null if none.
  object_ptr<textQuote> quote_;
  static jfieldID quote_fieldID;
  /// Identifier of the checklist task in the original message that was replied; 0 if none.
  int32 checklist_task_id_;
  static jfieldID checklist_task_id_fieldID;
  /// Identifier of the poll option in the original message that was replied; empty if none.
  string poll_option_id_;
  static jfieldID poll_option_id_fieldID;
  /// Information about origin of the message if the message was from another chat or topic; may be null for messages from the same chat.
  object_ptr<MessageOrigin> origin_;
  static jfieldID origin_fieldID;
  /// Point in time (Unix timestamp) when the message was sent if the message was from another chat or topic; 0 for messages from the same chat.
  int32 origin_send_date_;
  static jfieldID origin_send_date_fieldID;
  /// Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media. Can be only one of the following types: messageAnimation, messageAudio, messageChecklist, messageContact, messageDice, messageDocument, messageGame, messageGiveaway, messageGiveawayWinners, messageInvoice, messageLocation, messagePaidMedia, messagePhoto, messagePoll, messageStakeDice, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote.
  object_ptr<MessageContent> content_;
  static jfieldID content_fieldID;

  /**
   * Describes a message replied by a given message.
   */
  messageReplyToMessage();

  /**
   * Describes a message replied by a given message.
   *
   * \param[in] chat_id_ The identifier of the chat to which the message belongs; may be 0 if the replied message is in unknown chat.
   * \param[in] message_id_ The identifier of the message; may be 0 if the replied message is in unknown chat.
   * \param[in] quote_ Chosen quote from the replied message; may be null if none.
   * \param[in] checklist_task_id_ Identifier of the checklist task in the original message that was replied; 0 if none.
   * \param[in] poll_option_id_ Identifier of the poll option in the original message that was replied; empty if none.
   * \param[in] origin_ Information about origin of the message if the message was from another chat or topic; may be null for messages from the same chat.
   * \param[in] origin_send_date_ Point in time (Unix timestamp) when the message was sent if the message was from another chat or topic; 0 for messages from the same chat.
   * \param[in] content_ Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media. Can be only one of the following types: messageAnimation, messageAudio, messageChecklist, messageContact, messageDice, messageDocument, messageGame, messageGiveaway, messageGiveawayWinners, messageInvoice, messageLocation, messagePaidMedia, messagePhoto, messagePoll, messageStakeDice, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote.
   */
  messageReplyToMessage(int53 chat_id_, int53 message_id_, object_ptr<textQuote> &&quote_, int32 checklist_task_id_, string const &poll_option_id_, object_ptr<MessageOrigin> &&origin_, int32 origin_send_date_, object_ptr<MessageContent> &&content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -203917195;

  static object_ptr<MessageReplyTo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a story replied by a given message.
 */
class messageReplyToStory final : public MessageReplyTo {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Describes a story replied by a given message.
   */
  messageReplyToStory();

  /**
   * Describes a story replied by a given message.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story.
   * \param[in] story_id_ The identifier of the story.
   */
  messageReplyToStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -674492596;

  static object_ptr<MessageReplyTo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about the time when a scheduled message will be sent.
 */
class MessageSchedulingState: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageSchedulingState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message will be sent at the specified date.
 */
class messageSchedulingStateSendAtDate final : public MessageSchedulingState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the message will be sent. The date must be within 367 days in the future.
  int32 send_date_;
  static jfieldID send_date_fieldID;
  /// Period after which the message will be sent again; in seconds; 0 if never; for Telegram Premium users only; may be non-zero only in sendMessage and forwardMessages with one message requests; must be one of 0, 86400, 7 * 86400, 14 * 86400, 30 * 86400, 91 * 86400, 182 * 86400, 365 * 86400, or additionally 60, or 300 in the Test DC.
  int32 repeat_period_;
  static jfieldID repeat_period_fieldID;

  /**
   * The message will be sent at the specified date.
   */
  messageSchedulingStateSendAtDate();

  /**
   * The message will be sent at the specified date.
   *
   * \param[in] send_date_ Point in time (Unix timestamp) when the message will be sent. The date must be within 367 days in the future.
   * \param[in] repeat_period_ Period after which the message will be sent again; in seconds; 0 if never; for Telegram Premium users only; may be non-zero only in sendMessage and forwardMessages with one message requests; must be one of 0, 86400, 7 * 86400, 14 * 86400, 30 * 86400, 91 * 86400, 182 * 86400, 365 * 86400, or additionally 60, or 300 in the Test DC.
   */
  messageSchedulingStateSendAtDate(int32 send_date_, int32 repeat_period_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1505903015;

  static object_ptr<MessageSchedulingState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message will be sent when the other user is online. Applicable to private chats only and when the exact online status of the other user is known.
 */
class messageSchedulingStateSendWhenOnline final : public MessageSchedulingState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message will be sent when the other user is online. Applicable to private chats only and when the exact online status of the other user is known.
   */
  messageSchedulingStateSendWhenOnline();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2092947464;

  static object_ptr<MessageSchedulingState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message will be sent when the video in the message is converted and optimized; can be used only by the server.
 */
class messageSchedulingStateSendWhenVideoProcessed final : public MessageSchedulingState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate point in time (Unix timestamp) when the message is expected to be sent.
  int32 send_date_;
  static jfieldID send_date_fieldID;

  /**
   * The message will be sent when the video in the message is converted and optimized; can be used only by the server.
   */
  messageSchedulingStateSendWhenVideoProcessed();

  /**
   * The message will be sent when the video in the message is converted and optimized; can be used only by the server.
   *
   * \param[in] send_date_ Approximate point in time (Unix timestamp) when the message is expected to be sent.
   */
  explicit messageSchedulingStateSendWhenVideoProcessed(int32 send_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2101578734;

  static object_ptr<MessageSchedulingState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes when a message will be self-destructed.
 */
class MessageSelfDestructType: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageSelfDestructType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message will be self-destructed in the specified time after its content was opened.
 */
class messageSelfDestructTypeTimer final : public MessageSelfDestructType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message's self-destruct time, in seconds; must be between 0 and 60 in private chats.
  int32 self_destruct_time_;
  static jfieldID self_destruct_time_fieldID;

  /**
   * The message will be self-destructed in the specified time after its content was opened.
   */
  messageSelfDestructTypeTimer();

  /**
   * The message will be self-destructed in the specified time after its content was opened.
   *
   * \param[in] self_destruct_time_ The message's self-destruct time, in seconds; must be between 0 and 60 in private chats.
   */
  explicit messageSelfDestructTypeTimer(int32 self_destruct_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1351440333;

  static object_ptr<MessageSelfDestructType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message can be opened only once and will be self-destructed once closed.
 */
class messageSelfDestructTypeImmediately final : public MessageSelfDestructType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message can be opened only once and will be self-destructed once closed.
   */
  messageSelfDestructTypeImmediately();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1036218363;

  static object_ptr<MessageSelfDestructType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSchedulingState;

class inputSuggestedPostInfo;

/**
 * Options to be used when a message is sent.
 */
class messageSendOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the suggested post; pass null if none. For messages to channel direct messages chat only. Applicable only to sendMessage and addOffer.
  object_ptr<inputSuggestedPostInfo> suggested_post_info_;
  static jfieldID suggested_post_info_fieldID;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  static jfieldID disable_notification_fieldID;
  /// Pass true if the message is sent from the background.
  bool from_background_;
  static jfieldID from_background_fieldID;
  /// Pass true if the content of the message must be protected from forwarding and saving; for bots only.
  bool protect_content_;
  static jfieldID protect_content_fieldID;
  /// Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only.
  bool allow_paid_broadcast_;
  static jfieldID allow_paid_broadcast_fieldID;
  /// The number of Telegram Stars the user agreed to pay to send the messages.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;
  /// Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.
  bool update_order_of_installed_sticker_sets_;
  static jfieldID update_order_of_installed_sticker_sets_fieldID;
  /// Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, live location messages and self-destructing messages can't be scheduled.
  object_ptr<MessageSchedulingState> scheduling_state_;
  static jfieldID scheduling_state_fieldID;
  /// Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats.
  int64 effect_id_;
  static jfieldID effect_id_fieldID;
  /// Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
  int32 sending_id_;
  static jfieldID sending_id_fieldID;
  /// Pass true to get a fake message instead of actually sending them.
  bool only_preview_;
  static jfieldID only_preview_fieldID;

  /**
   * Options to be used when a message is sent.
   */
  messageSendOptions();

  /**
   * Options to be used when a message is sent.
   *
   * \param[in] suggested_post_info_ Information about the suggested post; pass null if none. For messages to channel direct messages chat only. Applicable only to sendMessage and addOffer.
   * \param[in] disable_notification_ Pass true to disable notification for the message.
   * \param[in] from_background_ Pass true if the message is sent from the background.
   * \param[in] protect_content_ Pass true if the content of the message must be protected from forwarding and saving; for bots only.
   * \param[in] allow_paid_broadcast_ Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only.
   * \param[in] paid_message_star_count_ The number of Telegram Stars the user agreed to pay to send the messages.
   * \param[in] update_order_of_installed_sticker_sets_ Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.
   * \param[in] scheduling_state_ Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, live location messages and self-destructing messages can't be scheduled.
   * \param[in] effect_id_ Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage, sendMessageAlbum in private chats and forwardMessages with one message to private chats.
   * \param[in] sending_id_ Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
   * \param[in] only_preview_ Pass true to get a fake message instead of actually sending them.
   */
  messageSendOptions(object_ptr<inputSuggestedPostInfo> &&suggested_post_info_, bool disable_notification_, bool from_background_, bool protect_content_, bool allow_paid_broadcast_, int53 paid_message_star_count_, bool update_order_of_installed_sticker_sets_, object_ptr<MessageSchedulingState> &&scheduling_state_, int64 effect_id_, int32 sending_id_, bool only_preview_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1725581906;

  static object_ptr<messageSendOptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about the sender of a message.
 */
class MessageSender: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageSender> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was sent by a known user.
 */
class messageSenderUser final : public MessageSender {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who sent the message.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * The message was sent by a known user.
   */
  messageSenderUser();

  /**
   * The message was sent by a known user.
   *
   * \param[in] user_id_ Identifier of the user who sent the message.
   */
  explicit messageSenderUser(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -336109341;

  static object_ptr<MessageSender> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was sent on behalf of a chat.
 */
class messageSenderChat final : public MessageSender {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that sent the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The message was sent on behalf of a chat.
   */
  messageSenderChat();

  /**
   * The message was sent on behalf of a chat.
   *
   * \param[in] chat_id_ Identifier of the chat that sent the message.
   */
  explicit messageSenderChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -239660751;

  static object_ptr<MessageSender> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Represents a list of message senders.
 */
class messageSenders final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of message senders found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of message senders.
  array<object_ptr<MessageSender>> senders_;
  static jfieldID senders_fieldID;

  /**
   * Represents a list of message senders.
   */
  messageSenders();

  /**
   * Represents a list of message senders.
   *
   * \param[in] total_count_ Approximate total number of message senders found.
   * \param[in] senders_ List of message senders.
   */
  messageSenders(int32 total_count_, array<object_ptr<MessageSender>> &&senders_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -690158467;

  static object_ptr<messageSenders> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class error;

/**
 * This class is an abstract base class.
 * Contains information about the sending state of the message.
 */
class MessageSendingState: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageSendingState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is being sent now, but has not yet been delivered to the server.
 */
class messageSendingStatePending final : public MessageSendingState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Non-persistent message sending identifier, specified by the application.
  int32 sending_id_;
  static jfieldID sending_id_fieldID;

  /**
   * The message is being sent now, but has not yet been delivered to the server.
   */
  messageSendingStatePending();

  /**
   * The message is being sent now, but has not yet been delivered to the server.
   *
   * \param[in] sending_id_ Non-persistent message sending identifier, specified by the application.
   */
  explicit messageSendingStatePending(int32 sending_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -215260236;

  static object_ptr<MessageSendingState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message failed to be sent.
 */
class messageSendingStateFailed final : public MessageSendingState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The cause of the message sending failure.
  object_ptr<error> error_;
  static jfieldID error_fieldID;
  /// True, if the message can be re-sent using resendMessages or readdQuickReplyShortcutMessages.
  bool can_retry_;
  static jfieldID can_retry_fieldID;
  /// True, if the message can be re-sent only on behalf of a different sender.
  bool need_another_sender_;
  static jfieldID need_another_sender_fieldID;
  /// True, if the message can be re-sent only if another quote is chosen in the message that is replied by the given message.
  bool need_another_reply_quote_;
  static jfieldID need_another_reply_quote_fieldID;
  /// True, if the message can be re-sent only if the message to be replied is removed. This will be done automatically by resendMessages.
  bool need_drop_reply_;
  static jfieldID need_drop_reply_fieldID;
  /// The number of Telegram Stars that must be paid to send the message; 0 if the current amount is correct.
  int53 required_paid_message_star_count_;
  static jfieldID required_paid_message_star_count_fieldID;
  /// Time left before the message can be re-sent, in seconds. No update is sent when this field changes.
  double retry_after_;
  static jfieldID retry_after_fieldID;

  /**
   * The message failed to be sent.
   */
  messageSendingStateFailed();

  /**
   * The message failed to be sent.
   *
   * \param[in] error_ The cause of the message sending failure.
   * \param[in] can_retry_ True, if the message can be re-sent using resendMessages or readdQuickReplyShortcutMessages.
   * \param[in] need_another_sender_ True, if the message can be re-sent only on behalf of a different sender.
   * \param[in] need_another_reply_quote_ True, if the message can be re-sent only if another quote is chosen in the message that is replied by the given message.
   * \param[in] need_drop_reply_ True, if the message can be re-sent only if the message to be replied is removed. This will be done automatically by resendMessages.
   * \param[in] required_paid_message_star_count_ The number of Telegram Stars that must be paid to send the message; 0 if the current amount is correct.
   * \param[in] retry_after_ Time left before the message can be re-sent, in seconds. No update is sent when this field changes.
   */
  messageSendingStateFailed(object_ptr<error> &&error_, bool can_retry_, bool need_another_sender_, bool need_another_reply_quote_, bool need_drop_reply_, int53 required_paid_message_star_count_, double retry_after_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -777630522;

  static object_ptr<MessageSendingState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes source of a message.
 */
class MessageSource: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from a chat history.
 */
class messageSourceChatHistory final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from a chat history.
   */
  messageSourceChatHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1090386116;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from history of a message thread.
 */
class messageSourceMessageThreadHistory final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from history of a message thread.
   */
  messageSourceMessageThreadHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 290427142;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from history of a forum topic.
 */
class messageSourceForumTopicHistory final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from history of a forum topic.
   */
  messageSourceForumTopicHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1518064457;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from history of a topic in a channel direct messages chat administered by the current user.
 */
class messageSourceDirectMessagesChatTopicHistory final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from history of a topic in a channel direct messages chat administered by the current user.
   */
  messageSourceDirectMessagesChatTopicHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1869256503;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from chat, message thread or forum topic history preview.
 */
class messageSourceHistoryPreview final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from chat, message thread or forum topic history preview.
   */
  messageSourceHistoryPreview();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1024254993;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from a chat list or a forum topic list.
 */
class messageSourceChatList final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from a chat list or a forum topic list.
   */
  messageSourceChatList();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2047406102;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from search results, including file downloads, local file list, outgoing document messages, calendar.
 */
class messageSourceSearch final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from search results, including file downloads, local file list, outgoing document messages, calendar.
   */
  messageSourceSearch();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1921333105;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from a chat event log.
 */
class messageSourceChatEventLog final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from a chat event log.
   */
  messageSourceChatEventLog();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1028777540;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from a notification.
 */
class messageSourceNotification final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from a notification.
   */
  messageSourceNotification();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1046406163;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was screenshotted; the source must be used only if the message content was visible during the screenshot.
 */
class messageSourceScreenshot final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message was screenshotted; the source must be used only if the message content was visible during the screenshot.
   */
  messageSourceScreenshot();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 469982474;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message is from some other source.
 */
class messageSourceOther final : public MessageSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message is from some other source.
   */
  messageSourceOther();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 901818114;

  static object_ptr<MessageSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

/**
 * A detailed statistics about a message.
 */
class messageStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A graph containing number of message views and shares.
  object_ptr<StatisticalGraph> message_interaction_graph_;
  static jfieldID message_interaction_graph_fieldID;
  /// A graph containing number of message reactions.
  object_ptr<StatisticalGraph> message_reaction_graph_;
  static jfieldID message_reaction_graph_fieldID;

  /**
   * A detailed statistics about a message.
   */
  messageStatistics();

  /**
   * A detailed statistics about a message.
   *
   * \param[in] message_interaction_graph_ A graph containing number of message views and shares.
   * \param[in] message_reaction_graph_ A graph containing number of message reactions.
   */
  messageStatistics(object_ptr<StatisticalGraph> &&message_interaction_graph_, object_ptr<StatisticalGraph> &&message_reaction_graph_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1563537657;

  static object_ptr<messageStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class draftMessage;

class message;

class messageReplyInfo;

/**
 * Contains information about a message thread.
 */
class messageThreadInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message thread belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message thread identifier, unique within the chat.
  int53 message_thread_id_;
  static jfieldID message_thread_id_fieldID;
  /// Information about the message thread; may be null for forum topic threads.
  object_ptr<messageReplyInfo> reply_info_;
  static jfieldID reply_info_fieldID;
  /// Approximate number of unread messages in the message thread.
  int32 unread_message_count_;
  static jfieldID unread_message_count_fieldID;
  /// The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
  array<object_ptr<message>> messages_;
  static jfieldID messages_fieldID;
  /// A draft of a message in the message thread; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;

  /**
   * Contains information about a message thread.
   */
  messageThreadInfo();

  /**
   * Contains information about a message thread.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message thread belongs.
   * \param[in] message_thread_id_ Message thread identifier, unique within the chat.
   * \param[in] reply_info_ Information about the message thread; may be null for forum topic threads.
   * \param[in] unread_message_count_ Approximate number of unread messages in the message thread.
   * \param[in] messages_ The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   * \param[in] draft_message_ A draft of a message in the message thread; may be null if none.
   */
  messageThreadInfo(int53 chat_id_, int53 message_thread_id_, object_ptr<messageReplyInfo> &&reply_info_, int32 unread_message_count_, array<object_ptr<message>> &&messages_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -248536056;

  static object_ptr<messageThreadInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a topic of messages in a chat.
 */
class MessageTopic: public Object {
 public:
  static jclass Class;

  static object_ptr<MessageTopic> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A topic in a non-forum supergroup chat.
 */
class messageTopicThread final : public MessageTopic {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the message thread.
  int53 message_thread_id_;
  static jfieldID message_thread_id_fieldID;

  /**
   * A topic in a non-forum supergroup chat.
   */
  messageTopicThread();

  /**
   * A topic in a non-forum supergroup chat.
   *
   * \param[in] message_thread_id_ Unique identifier of the message thread.
   */
  explicit messageTopicThread(int53 message_thread_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1360920071;

  static object_ptr<MessageTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A topic in a forum supergroup chat or a chat with a bot.
 */
class messageTopicForum final : public MessageTopic {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the forum topic.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * A topic in a forum supergroup chat or a chat with a bot.
   */
  messageTopicForum();

  /**
   * A topic in a forum supergroup chat or a chat with a bot.
   *
   * \param[in] forum_topic_id_ Unique identifier of the forum topic.
   */
  explicit messageTopicForum(int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2119440112;

  static object_ptr<MessageTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A topic in a channel direct messages chat administered by the current user.
 */
class messageTopicDirectMessages final : public MessageTopic {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the topic.
  int53 direct_messages_chat_topic_id_;
  static jfieldID direct_messages_chat_topic_id_fieldID;

  /**
   * A topic in a channel direct messages chat administered by the current user.
   */
  messageTopicDirectMessages();

  /**
   * A topic in a channel direct messages chat administered by the current user.
   *
   * \param[in] direct_messages_chat_topic_id_ Unique identifier of the topic.
   */
  explicit messageTopicDirectMessages(int53 direct_messages_chat_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1285378599;

  static object_ptr<MessageTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A topic in Saved Messages chat.
 */
class messageTopicSavedMessages final : public MessageTopic {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the Saved Messages topic.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;

  /**
   * A topic in Saved Messages chat.
   */
  messageTopicSavedMessages();

  /**
   * A topic in Saved Messages chat.
   *
   * \param[in] saved_messages_topic_id_ Unique identifier of the Saved Messages topic.
   */
  explicit messageTopicSavedMessages(int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 588026991;

  static object_ptr<MessageTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a viewer of a message.
 */
class messageViewer final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the viewer.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Approximate point in time (Unix timestamp) when the message was viewed.
  int32 view_date_;
  static jfieldID view_date_fieldID;

  /**
   * Represents a viewer of a message.
   */
  messageViewer();

  /**
   * Represents a viewer of a message.
   *
   * \param[in] user_id_ User identifier of the viewer.
   * \param[in] view_date_ Approximate point in time (Unix timestamp) when the message was viewed.
   */
  messageViewer(int53 user_id_, int32 view_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1458639309;

  static object_ptr<messageViewer> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class messageViewer;

/**
 * Represents a list of message viewers.
 */
class messageViewers final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of message viewers.
  array<object_ptr<messageViewer>> viewers_;
  static jfieldID viewers_fieldID;

  /**
   * Represents a list of message viewers.
   */
  messageViewers();

  /**
   * Represents a list of message viewers.
   *
   * \param[in] viewers_ List of message viewers.
   */
  explicit messageViewers(array<object_ptr<messageViewer>> &&viewers_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2116480287;

  static object_ptr<messageViewers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Contains a list of messages.
 */
class messages final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of messages found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of messages; messages may be null.
  array<object_ptr<message>> messages_;
  static jfieldID messages_fieldID;

  /**
   * Contains a list of messages.
   */
  messages();

  /**
   * Contains a list of messages.
   *
   * \param[in] total_count_ Approximate total number of messages found.
   * \param[in] messages_ List of messages; messages may be null.
   */
  messages(int32 total_count_, array<object_ptr<message>> &&messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -16498159;

  static object_ptr<messages> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Thumbnail image of a very poor quality and low resolution.
 */
class minithumbnail final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Thumbnail width, usually doesn't exceed 40.
  int32 width_;
  static jfieldID width_fieldID;
  /// Thumbnail height, usually doesn't exceed 40.
  int32 height_;
  static jfieldID height_fieldID;
  /// The thumbnail in JPEG format.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * Thumbnail image of a very poor quality and low resolution.
   */
  minithumbnail();

  /**
   * Thumbnail image of a very poor quality and low resolution.
   *
   * \param[in] width_ Thumbnail width, usually doesn't exceed 40.
   * \param[in] height_ Thumbnail height, usually doesn't exceed 40.
   * \param[in] data_ The thumbnail in JPEG format.
   */
  minithumbnail(int32 width_, int32 height_, bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -328540758;

  static object_ptr<minithumbnail> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class NetworkStatisticsEntry;

/**
 * A full list of available network statistic entries.
 */
class networkStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) from which the statistics are collected.
  int32 since_date_;
  static jfieldID since_date_fieldID;
  /// Network statistics entries.
  array<object_ptr<NetworkStatisticsEntry>> entries_;
  static jfieldID entries_fieldID;

  /**
   * A full list of available network statistic entries.
   */
  networkStatistics();

  /**
   * A full list of available network statistic entries.
   *
   * \param[in] since_date_ Point in time (Unix timestamp) from which the statistics are collected.
   * \param[in] entries_ Network statistics entries.
   */
  networkStatistics(int32 since_date_, array<object_ptr<NetworkStatisticsEntry>> &&entries_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1615554212;

  static object_ptr<networkStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class FileType;

class NetworkType;

/**
 * This class is an abstract base class.
 * Contains statistics about network usage.
 */
class NetworkStatisticsEntry: public Object {
 public:
  static jclass Class;

  static object_ptr<NetworkStatisticsEntry> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about the total amount of data that was used to send and receive files.
 */
class networkStatisticsEntryFile final : public NetworkStatisticsEntry {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the file the data is part of; pass null if the data isn't related to files.
  object_ptr<FileType> file_type_;
  static jfieldID file_type_fieldID;
  /// Type of the network the data was sent through. Call setNetworkType to maintain the actual network type.
  object_ptr<NetworkType> network_type_;
  static jfieldID network_type_fieldID;
  /// Total number of bytes sent.
  int53 sent_bytes_;
  static jfieldID sent_bytes_fieldID;
  /// Total number of bytes received.
  int53 received_bytes_;
  static jfieldID received_bytes_fieldID;

  /**
   * Contains information about the total amount of data that was used to send and receive files.
   */
  networkStatisticsEntryFile();

  /**
   * Contains information about the total amount of data that was used to send and receive files.
   *
   * \param[in] file_type_ Type of the file the data is part of; pass null if the data isn't related to files.
   * \param[in] network_type_ Type of the network the data was sent through. Call setNetworkType to maintain the actual network type.
   * \param[in] sent_bytes_ Total number of bytes sent.
   * \param[in] received_bytes_ Total number of bytes received.
   */
  networkStatisticsEntryFile(object_ptr<FileType> &&file_type_, object_ptr<NetworkType> &&network_type_, int53 sent_bytes_, int53 received_bytes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 188452706;

  static object_ptr<NetworkStatisticsEntry> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about the total amount of data that was used for calls.
 */
class networkStatisticsEntryCall final : public NetworkStatisticsEntry {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the network the data was sent through. Call setNetworkType to maintain the actual network type.
  object_ptr<NetworkType> network_type_;
  static jfieldID network_type_fieldID;
  /// Total number of bytes sent.
  int53 sent_bytes_;
  static jfieldID sent_bytes_fieldID;
  /// Total number of bytes received.
  int53 received_bytes_;
  static jfieldID received_bytes_fieldID;
  /// Total call duration, in seconds.
  double duration_;
  static jfieldID duration_fieldID;

  /**
   * Contains information about the total amount of data that was used for calls.
   */
  networkStatisticsEntryCall();

  /**
   * Contains information about the total amount of data that was used for calls.
   *
   * \param[in] network_type_ Type of the network the data was sent through. Call setNetworkType to maintain the actual network type.
   * \param[in] sent_bytes_ Total number of bytes sent.
   * \param[in] received_bytes_ Total number of bytes received.
   * \param[in] duration_ Total call duration, in seconds.
   */
  networkStatisticsEntryCall(object_ptr<NetworkType> &&network_type_, int53 sent_bytes_, int53 received_bytes_, double duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 737000365;

  static object_ptr<NetworkStatisticsEntry> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the type of network.
 */
class NetworkType: public Object {
 public:
  static jclass Class;

  static object_ptr<NetworkType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The network is not available.
 */
class networkTypeNone final : public NetworkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The network is not available.
   */
  networkTypeNone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1971691759;

  static object_ptr<NetworkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A mobile network.
 */
class networkTypeMobile final : public NetworkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A mobile network.
   */
  networkTypeMobile();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 819228239;

  static object_ptr<NetworkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A mobile roaming network.
 */
class networkTypeMobileRoaming final : public NetworkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A mobile roaming network.
   */
  networkTypeMobileRoaming();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1435199760;

  static object_ptr<NetworkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Wi-Fi network.
 */
class networkTypeWiFi final : public NetworkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Wi-Fi network.
   */
  networkTypeWiFi();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -633872070;

  static object_ptr<NetworkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A different network type (e.g., Ethernet network).
 */
class networkTypeOther final : public NetworkType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A different network type (e.g., Ethernet network).
   */
  networkTypeOther();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1942128539;

  static object_ptr<NetworkType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains privacy settings for chats with non-contacts.
 */
class newChatPrivacySettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting.
  bool allow_new_chats_from_unknown_users_;
  static jfieldID allow_new_chats_from_unknown_users_fieldID;
  /// Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption(&quot;paid_message_star_count_max&quot;). If positive, then allow_new_chats_from_unknown_users must be true. The current user will receive getOption(&quot;paid_message_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for message sending. Can be positive, only if getOption(&quot;can_enable_paid_messages&quot;) is true.
  int53 incoming_paid_message_star_count_;
  static jfieldID incoming_paid_message_star_count_fieldID;

  /**
   * Contains privacy settings for chats with non-contacts.
   */
  newChatPrivacySettings();

  /**
   * Contains privacy settings for chats with non-contacts.
   *
   * \param[in] allow_new_chats_from_unknown_users_ True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting.
   * \param[in] incoming_paid_message_star_count_ Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption(&quot;paid_message_star_count_max&quot;). If positive, then allow_new_chats_from_unknown_users must be true. The current user will receive getOption(&quot;paid_message_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for message sending. Can be positive, only if getOption(&quot;can_enable_paid_messages&quot;) is true.
   */
  newChatPrivacySettings(bool allow_new_chats_from_unknown_users_, int53 incoming_paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 123716192;

  static object_ptr<newChatPrivacySettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class NotificationType;

/**
 * Contains information about a notification.
 */
class notification final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique persistent identifier of this notification.
  int32 id_;
  static jfieldID id_fieldID;
  /// Notification date.
  int32 date_;
  static jfieldID date_fieldID;
  /// True, if the notification was explicitly sent without sound.
  bool is_silent_;
  static jfieldID is_silent_fieldID;
  /// Notification type.
  object_ptr<NotificationType> type_;
  static jfieldID type_fieldID;

  /**
   * Contains information about a notification.
   */
  notification();

  /**
   * Contains information about a notification.
   *
   * \param[in] id_ Unique persistent identifier of this notification.
   * \param[in] date_ Notification date.
   * \param[in] is_silent_ True, if the notification was explicitly sent without sound.
   * \param[in] type_ Notification type.
   */
  notification(int32 id_, int32 date_, bool is_silent_, object_ptr<NotificationType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 788743120;

  static object_ptr<notification> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class NotificationGroupType;

class notification;

/**
 * Describes a group of notifications.
 */
class notificationGroup final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique persistent auto-incremented from 1 identifier of the notification group.
  int32 id_;
  static jfieldID id_fieldID;
  /// Type of the group.
  object_ptr<NotificationGroupType> type_;
  static jfieldID type_fieldID;
  /// Identifier of a chat to which all notifications in the group belong.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Total number of active notifications in the group.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of active notifications.
  array<object_ptr<notification>> notifications_;
  static jfieldID notifications_fieldID;

  /**
   * Describes a group of notifications.
   */
  notificationGroup();

  /**
   * Describes a group of notifications.
   *
   * \param[in] id_ Unique persistent auto-incremented from 1 identifier of the notification group.
   * \param[in] type_ Type of the group.
   * \param[in] chat_id_ Identifier of a chat to which all notifications in the group belong.
   * \param[in] total_count_ Total number of active notifications in the group.
   * \param[in] notifications_ The list of active notifications.
   */
  notificationGroup(int32 id_, object_ptr<NotificationGroupType> &&type_, int53 chat_id_, int32 total_count_, array<object_ptr<notification>> &&notifications_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 780691541;

  static object_ptr<notificationGroup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the type of notifications in a notification group.
 */
class NotificationGroupType: public Object {
 public:
  static jclass Class;

  static object_ptr<NotificationGroupType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages.
 */
class notificationGroupTypeMessages final : public NotificationGroupType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages.
   */
  notificationGroupTypeMessages();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1702481123;

  static object_ptr<NotificationGroupType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message.
 */
class notificationGroupTypeMentions final : public NotificationGroupType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message.
   */
  notificationGroupTypeMentions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2050324051;

  static object_ptr<NotificationGroupType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A group containing a notification of type notificationTypeNewSecretChat.
 */
class notificationGroupTypeSecretChat final : public NotificationGroupType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A group containing a notification of type notificationTypeNewSecretChat.
   */
  notificationGroupTypeSecretChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1390759476;

  static object_ptr<NotificationGroupType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A group containing notifications of type notificationTypeNewCall.
 */
class notificationGroupTypeCalls final : public NotificationGroupType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A group containing notifications of type notificationTypeNewCall.
   */
  notificationGroupTypeCalls();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1379123538;

  static object_ptr<NotificationGroupType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the types of chats to which notification settings are relevant.
 */
class NotificationSettingsScope: public Object {
 public:
  static jclass Class;

  static object_ptr<NotificationSettingsScope> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notification settings applied to all private and secret chats when the corresponding chat setting has a default value.
 */
class notificationSettingsScopePrivateChats final : public NotificationSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Notification settings applied to all private and secret chats when the corresponding chat setting has a default value.
   */
  notificationSettingsScopePrivateChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 937446759;

  static object_ptr<NotificationSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notification settings applied to all basic group and supergroup chats when the corresponding chat setting has a default value.
 */
class notificationSettingsScopeGroupChats final : public NotificationSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Notification settings applied to all basic group and supergroup chats when the corresponding chat setting has a default value.
   */
  notificationSettingsScopeGroupChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1212142067;

  static object_ptr<NotificationSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notification settings applied to all channel chats when the corresponding chat setting has a default value.
 */
class notificationSettingsScopeChannelChats final : public NotificationSettingsScope {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Notification settings applied to all channel chats when the corresponding chat setting has a default value.
   */
  notificationSettingsScopeChannelChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 548013448;

  static object_ptr<NotificationSettingsScope> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Describes a notification sound in MP3 format.
 */
class notificationSound final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the notification sound.
  int64 id_;
  static jfieldID id_fieldID;
  /// Duration of the sound, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Point in time (Unix timestamp) when the sound was created.
  int32 date_;
  static jfieldID date_fieldID;
  /// Title of the notification sound.
  string title_;
  static jfieldID title_fieldID;
  /// Arbitrary data, defined while the sound was uploaded.
  string data_;
  static jfieldID data_fieldID;
  /// File containing the sound.
  object_ptr<file> sound_;
  static jfieldID sound_fieldID;

  /**
   * Describes a notification sound in MP3 format.
   */
  notificationSound();

  /**
   * Describes a notification sound in MP3 format.
   *
   * \param[in] id_ Unique identifier of the notification sound.
   * \param[in] duration_ Duration of the sound, in seconds.
   * \param[in] date_ Point in time (Unix timestamp) when the sound was created.
   * \param[in] title_ Title of the notification sound.
   * \param[in] data_ Arbitrary data, defined while the sound was uploaded.
   * \param[in] sound_ File containing the sound.
   */
  notificationSound(int64 id_, int32 duration_, int32 date_, string const &title_, string const &data_, object_ptr<file> &&sound_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -185638601;

  static object_ptr<notificationSound> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class notificationSound;

/**
 * Contains a list of notification sounds.
 */
class notificationSounds final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of notification sounds.
  array<object_ptr<notificationSound>> notification_sounds_;
  static jfieldID notification_sounds_fieldID;

  /**
   * Contains a list of notification sounds.
   */
  notificationSounds();

  /**
   * Contains a list of notification sounds.
   *
   * \param[in] notification_sounds_ A list of notification sounds.
   */
  explicit notificationSounds(array<object_ptr<notificationSound>> &&notification_sounds_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -630813169;

  static object_ptr<notificationSounds> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class PushMessageContent;

class message;

/**
 * This class is an abstract base class.
 * Contains detailed information about a notification.
 */
class NotificationType: public Object {
 public:
  static jclass Class;

  static object_ptr<NotificationType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New message was received.
 */
class notificationTypeNewMessage final : public NotificationType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// True, if message content must be displayed in notifications.
  bool show_preview_;
  static jfieldID show_preview_fieldID;

  /**
   * New message was received.
   */
  notificationTypeNewMessage();

  /**
   * New message was received.
   *
   * \param[in] message_ The message.
   * \param[in] show_preview_ True, if message content must be displayed in notifications.
   */
  notificationTypeNewMessage(object_ptr<message> &&message_, bool show_preview_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -254745614;

  static object_ptr<NotificationType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New secret chat was created.
 */
class notificationTypeNewSecretChat final : public NotificationType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * New secret chat was created.
   */
  notificationTypeNewSecretChat();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1198638768;

  static object_ptr<NotificationType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New call was received.
 */
class notificationTypeNewCall final : public NotificationType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  int32 call_id_;
  static jfieldID call_id_fieldID;

  /**
   * New call was received.
   */
  notificationTypeNewCall();

  /**
   * New call was received.
   *
   * \param[in] call_id_ Call identifier.
   */
  explicit notificationTypeNewCall(int32 call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1712734585;

  static object_ptr<NotificationType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New message was received through a push notification.
 */
class notificationTypeNewPushMessage final : public NotificationType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message identifier. The message will not be available in the chat history, but the identifier can be used in viewMessages, or as a message to be replied in the same chat.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the sender of the message. Corresponding user or chat may be inaccessible.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Name of the sender.
  string sender_name_;
  static jfieldID sender_name_fieldID;
  /// True, if the message is outgoing.
  bool is_outgoing_;
  static jfieldID is_outgoing_fieldID;
  /// Push message content.
  object_ptr<PushMessageContent> content_;
  static jfieldID content_fieldID;

  /**
   * New message was received through a push notification.
   */
  notificationTypeNewPushMessage();

  /**
   * New message was received through a push notification.
   *
   * \param[in] message_id_ The message identifier. The message will not be available in the chat history, but the identifier can be used in viewMessages, or as a message to be replied in the same chat.
   * \param[in] sender_id_ Identifier of the sender of the message. Corresponding user or chat may be inaccessible.
   * \param[in] sender_name_ Name of the sender.
   * \param[in] is_outgoing_ True, if the message is outgoing.
   * \param[in] content_ Push message content.
   */
  notificationTypeNewPushMessage(int53 message_id_, object_ptr<MessageSender> &&sender_id_, string const &sender_name_, bool is_outgoing_, object_ptr<PushMessageContent> &&content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -711680462;

  static object_ptr<NotificationType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about the OAuth authorization.
 */
class oauthLinkInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user for which the link was generated; may be 0 if unknown. The corresponding user may be unknown. If the user is logged in the application, then they must be chosen for authorization by default.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// An HTTP URL where the user authorizes.
  string url_;
  static jfieldID url_fieldID;
  /// A domain of the URL.
  string domain_;
  static jfieldID domain_fieldID;
  /// True, if the authorization originates from an application.
  bool from_app_;
  static jfieldID from_app_fieldID;
  /// Verified name of the application; if empty, then &quot;Unverified App&quot; must be shown instead.
  string verified_app_name_;
  static jfieldID verified_app_name_fieldID;
  /// User identifier of a bot linked with the website.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// True, if the user must be asked for the permission to the bot to send them messages.
  bool request_write_access_;
  static jfieldID request_write_access_fieldID;
  /// True, if the user must be asked for the permission to share their phone number.
  bool request_phone_number_access_;
  static jfieldID request_phone_number_access_fieldID;
  /// The version of a browser used for the authorization.
  string browser_;
  static jfieldID browser_fieldID;
  /// Operating system the browser is running on.
  string platform_;
  static jfieldID platform_fieldID;
  /// IP address from which the authorization is performed, in human-readable format.
  string ip_address_;
  static jfieldID ip_address_fieldID;
  /// Human-readable description of a country and a region from which the authorization is performed, based on the IP address.
  string location_;
  static jfieldID location_fieldID;
  /// True, if code matching dialog must be shown first and checkOauthRequestMatchCode must be called before acceptOauthRequest. Otherwise, checkOauthRequestMatchCode must not be called.
  bool match_code_first_;
  static jfieldID match_code_first_fieldID;
  /// The list of codes to match; may be empty if irrelevant.
  array<string> match_codes_;
  static jfieldID match_codes_fieldID;

  /**
   * Information about the OAuth authorization.
   */
  oauthLinkInfo();

  /**
   * Information about the OAuth authorization.
   *
   * \param[in] user_id_ Identifier of the user for which the link was generated; may be 0 if unknown. The corresponding user may be unknown. If the user is logged in the application, then they must be chosen for authorization by default.
   * \param[in] url_ An HTTP URL where the user authorizes.
   * \param[in] domain_ A domain of the URL.
   * \param[in] from_app_ True, if the authorization originates from an application.
   * \param[in] verified_app_name_ Verified name of the application; if empty, then &quot;Unverified App&quot; must be shown instead.
   * \param[in] bot_user_id_ User identifier of a bot linked with the website.
   * \param[in] request_write_access_ True, if the user must be asked for the permission to the bot to send them messages.
   * \param[in] request_phone_number_access_ True, if the user must be asked for the permission to share their phone number.
   * \param[in] browser_ The version of a browser used for the authorization.
   * \param[in] platform_ Operating system the browser is running on.
   * \param[in] ip_address_ IP address from which the authorization is performed, in human-readable format.
   * \param[in] location_ Human-readable description of a country and a region from which the authorization is performed, based on the IP address.
   * \param[in] match_code_first_ True, if code matching dialog must be shown first and checkOauthRequestMatchCode must be called before acceptOauthRequest. Otherwise, checkOauthRequestMatchCode must not be called.
   * \param[in] match_codes_ The list of codes to match; may be empty if irrelevant.
   */
  oauthLinkInfo(int53 user_id_, string const &url_, string const &domain_, bool from_app_, string const &verified_app_name_, int53 bot_user_id_, bool request_write_access_, bool request_phone_number_access_, string const &browser_, string const &platform_, string const &ip_address_, string const &location_, bool match_code_first_, array<string> &&match_codes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -908945202;

  static object_ptr<oauthLinkInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An object of this type is returned on a successful function call for certain functions.
 */
class ok final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An object of this type is returned on a successful function call for certain functions.
   */
  ok();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -722616727;

  static object_ptr<ok> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the value of an option.
 */
class OptionValue: public Object {
 public:
  static jclass Class;

  static object_ptr<OptionValue> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a boolean option.
 */
class optionValueBoolean final : public OptionValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The value of the option.
  bool value_;
  static jfieldID value_fieldID;

  /**
   * Represents a boolean option.
   */
  optionValueBoolean();

  /**
   * Represents a boolean option.
   *
   * \param[in] value_ The value of the option.
   */
  explicit optionValueBoolean(bool value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 63135518;

  static object_ptr<OptionValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an unknown option or an option which has a default value.
 */
class optionValueEmpty final : public OptionValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Represents an unknown option or an option which has a default value.
   */
  optionValueEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 918955155;

  static object_ptr<OptionValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an integer option.
 */
class optionValueInteger final : public OptionValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The value of the option.
  int64 value_;
  static jfieldID value_fieldID;

  /**
   * Represents an integer option.
   */
  optionValueInteger();

  /**
   * Represents an integer option.
   *
   * \param[in] value_ The value of the option.
   */
  explicit optionValueInteger(int64 value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -186858780;

  static object_ptr<OptionValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a string option.
 */
class optionValueString final : public OptionValue {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The value of the option.
  string value_;
  static jfieldID value_fieldID;

  /**
   * Represents a string option.
   */
  optionValueString();

  /**
   * Represents a string option.
   *
   * \param[in] value_ The value of the option.
   */
  explicit optionValueString(string const &value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 756248212;

  static object_ptr<OptionValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class address;

/**
 * Order information.
 */
class orderInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the user.
  string name_;
  static jfieldID name_fieldID;
  /// Phone number of the user.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// Email address of the user.
  string email_address_;
  static jfieldID email_address_fieldID;
  /// Shipping address for this order; may be null.
  object_ptr<address> shipping_address_;
  static jfieldID shipping_address_fieldID;

  /**
   * Order information.
   */
  orderInfo();

  /**
   * Order information.
   *
   * \param[in] name_ Name of the user.
   * \param[in] phone_number_ Phone number of the user.
   * \param[in] email_address_ Email address of the user.
   * \param[in] shipping_address_ Shipping address for this order; may be null.
   */
  orderInfo(string const &name_, string const &phone_number_, string const &email_address_, object_ptr<address> &&shipping_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 783997294;

  static object_ptr<orderInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class closedVectorPath;

/**
 * Represents outline of an image.
 */
class outline final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of closed vector paths.
  array<object_ptr<closedVectorPath>> paths_;
  static jfieldID paths_fieldID;

  /**
   * Represents outline of an image.
   */
  outline();

  /**
   * Represents outline of an image.
   *
   * \param[in] paths_ The list of closed vector paths.
   */
  explicit outline(array<object_ptr<closedVectorPath>> &&paths_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -161506702;

  static object_ptr<outline> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PageBlock;

class RichText;

class animation;

class audio;

class chatPhotoInfo;

class location;

class pageBlockCaption;

class pageBlockListItem;

class pageBlockRelatedArticle;

class pageBlockTableCell;

class photo;

class video;

class voiceNote;

/**
 * This class is an abstract base class.
 * Describes a block of an instant view for a web page.
 */
class PageBlock: public Object {
 public:
  static jclass Class;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The title of a page.
 */
class pageBlockTitle final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title.
  object_ptr<RichText> title_;
  static jfieldID title_fieldID;

  /**
   * The title of a page.
   */
  pageBlockTitle();

  /**
   * The title of a page.
   *
   * \param[in] title_ Title.
   */
  explicit pageBlockTitle(object_ptr<RichText> &&title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1629664784;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The subtitle of a page.
 */
class pageBlockSubtitle final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subtitle.
  object_ptr<RichText> subtitle_;
  static jfieldID subtitle_fieldID;

  /**
   * The subtitle of a page.
   */
  pageBlockSubtitle();

  /**
   * The subtitle of a page.
   *
   * \param[in] subtitle_ Subtitle.
   */
  explicit pageBlockSubtitle(object_ptr<RichText> &&subtitle_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 264524263;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The author and publishing date of a page.
 */
class pageBlockAuthorDate final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Author.
  object_ptr<RichText> author_;
  static jfieldID author_fieldID;
  /// Point in time (Unix timestamp) when the article was published; 0 if unknown.
  int32 publish_date_;
  static jfieldID publish_date_fieldID;

  /**
   * The author and publishing date of a page.
   */
  pageBlockAuthorDate();

  /**
   * The author and publishing date of a page.
   *
   * \param[in] author_ Author.
   * \param[in] publish_date_ Point in time (Unix timestamp) when the article was published; 0 if unknown.
   */
  pageBlockAuthorDate(object_ptr<RichText> &&author_, int32 publish_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1300231184;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A header.
 */
class pageBlockHeader final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Header.
  object_ptr<RichText> header_;
  static jfieldID header_fieldID;

  /**
   * A header.
   */
  pageBlockHeader();

  /**
   * A header.
   *
   * \param[in] header_ Header.
   */
  explicit pageBlockHeader(object_ptr<RichText> &&header_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1402854811;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A subheader.
 */
class pageBlockSubheader final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subheader.
  object_ptr<RichText> subheader_;
  static jfieldID subheader_fieldID;

  /**
   * A subheader.
   */
  pageBlockSubheader();

  /**
   * A subheader.
   *
   * \param[in] subheader_ Subheader.
   */
  explicit pageBlockSubheader(object_ptr<RichText> &&subheader_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1263956774;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A kicker.
 */
class pageBlockKicker final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Kicker.
  object_ptr<RichText> kicker_;
  static jfieldID kicker_fieldID;

  /**
   * A kicker.
   */
  pageBlockKicker();

  /**
   * A kicker.
   *
   * \param[in] kicker_ Kicker.
   */
  explicit pageBlockKicker(object_ptr<RichText> &&kicker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1361282635;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A text paragraph.
 */
class pageBlockParagraph final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Paragraph text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A text paragraph.
   */
  pageBlockParagraph();

  /**
   * A text paragraph.
   *
   * \param[in] text_ Paragraph text.
   */
  explicit pageBlockParagraph(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1182402406;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A preformatted text paragraph.
 */
class pageBlockPreformatted final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Paragraph text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// Programming language for which the text needs to be formatted.
  string language_;
  static jfieldID language_fieldID;

  /**
   * A preformatted text paragraph.
   */
  pageBlockPreformatted();

  /**
   * A preformatted text paragraph.
   *
   * \param[in] text_ Paragraph text.
   * \param[in] language_ Programming language for which the text needs to be formatted.
   */
  pageBlockPreformatted(object_ptr<RichText> &&text_, string const &language_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1066346178;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The footer of a page.
 */
class pageBlockFooter final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Footer.
  object_ptr<RichText> footer_;
  static jfieldID footer_fieldID;

  /**
   * The footer of a page.
   */
  pageBlockFooter();

  /**
   * The footer of a page.
   *
   * \param[in] footer_ Footer.
   */
  explicit pageBlockFooter(object_ptr<RichText> &&footer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 886429480;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An empty block separating a page.
 */
class pageBlockDivider final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An empty block separating a page.
   */
  pageBlockDivider();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -618614392;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor.
 */
class pageBlockAnchor final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the anchor.
  string name_;
  static jfieldID name_fieldID;

  /**
   * An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor.
   */
  pageBlockAnchor();

  /**
   * An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor.
   *
   * \param[in] name_ Name of the anchor.
   */
  explicit pageBlockAnchor(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -837994576;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A list of data blocks.
 */
class pageBlockList final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The items of the list.
  array<object_ptr<pageBlockListItem>> items_;
  static jfieldID items_fieldID;

  /**
   * A list of data blocks.
   */
  pageBlockList();

  /**
   * A list of data blocks.
   *
   * \param[in] items_ The items of the list.
   */
  explicit pageBlockList(array<object_ptr<pageBlockListItem>> &&items_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1037074852;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A block quote.
 */
class pageBlockBlockQuote final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Quote text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// Quote credit.
  object_ptr<RichText> credit_;
  static jfieldID credit_fieldID;

  /**
   * A block quote.
   */
  pageBlockBlockQuote();

  /**
   * A block quote.
   *
   * \param[in] text_ Quote text.
   * \param[in] credit_ Quote credit.
   */
  pageBlockBlockQuote(object_ptr<RichText> &&text_, object_ptr<RichText> &&credit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1657834142;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A pull quote.
 */
class pageBlockPullQuote final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Quote text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// Quote credit.
  object_ptr<RichText> credit_;
  static jfieldID credit_fieldID;

  /**
   * A pull quote.
   */
  pageBlockPullQuote();

  /**
   * A pull quote.
   *
   * \param[in] text_ Quote text.
   * \param[in] credit_ Quote credit.
   */
  pageBlockPullQuote(object_ptr<RichText> &&text_, object_ptr<RichText> &&credit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 490242317;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An animation.
 */
class pageBlockAnimation final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Animation file; may be null.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;
  /// Animation caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;
  /// True, if the animation must be played automatically.
  bool need_autoplay_;
  static jfieldID need_autoplay_fieldID;

  /**
   * An animation.
   */
  pageBlockAnimation();

  /**
   * An animation.
   *
   * \param[in] animation_ Animation file; may be null.
   * \param[in] caption_ Animation caption.
   * \param[in] need_autoplay_ True, if the animation must be played automatically.
   */
  pageBlockAnimation(object_ptr<animation> &&animation_, object_ptr<pageBlockCaption> &&caption_, bool need_autoplay_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1355669513;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An audio file.
 */
class pageBlockAudio final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Audio file; may be null.
  object_ptr<audio> audio_;
  static jfieldID audio_fieldID;
  /// Audio file caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;

  /**
   * An audio file.
   */
  pageBlockAudio();

  /**
   * An audio file.
   *
   * \param[in] audio_ Audio file; may be null.
   * \param[in] caption_ Audio file caption.
   */
  pageBlockAudio(object_ptr<audio> &&audio_, object_ptr<pageBlockCaption> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -63371245;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo.
 */
class pageBlockPhoto final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo file; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Photo caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;
  /// URL that needs to be opened when the photo is clicked.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A photo.
   */
  pageBlockPhoto();

  /**
   * A photo.
   *
   * \param[in] photo_ Photo file; may be null.
   * \param[in] caption_ Photo caption.
   * \param[in] url_ URL that needs to be opened when the photo is clicked.
   */
  pageBlockPhoto(object_ptr<photo> &&photo_, object_ptr<pageBlockCaption> &&caption_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 417601156;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video.
 */
class pageBlockVideo final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Video file; may be null.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Video caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;
  /// True, if the video must be played automatically.
  bool need_autoplay_;
  static jfieldID need_autoplay_fieldID;
  /// True, if the video must be looped.
  bool is_looped_;
  static jfieldID is_looped_fieldID;

  /**
   * A video.
   */
  pageBlockVideo();

  /**
   * A video.
   *
   * \param[in] video_ Video file; may be null.
   * \param[in] caption_ Video caption.
   * \param[in] need_autoplay_ True, if the video must be played automatically.
   * \param[in] is_looped_ True, if the video must be looped.
   */
  pageBlockVideo(object_ptr<video> &&video_, object_ptr<pageBlockCaption> &&caption_, bool need_autoplay_, bool is_looped_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 510041394;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A voice note.
 */
class pageBlockVoiceNote final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Voice note; may be null.
  object_ptr<voiceNote> voice_note_;
  static jfieldID voice_note_fieldID;
  /// Voice note caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;

  /**
   * A voice note.
   */
  pageBlockVoiceNote();

  /**
   * A voice note.
   *
   * \param[in] voice_note_ Voice note; may be null.
   * \param[in] caption_ Voice note caption.
   */
  pageBlockVoiceNote(object_ptr<voiceNote> &&voice_note_, object_ptr<pageBlockCaption> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1823310463;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A page cover.
 */
class pageBlockCover final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Cover.
  object_ptr<PageBlock> cover_;
  static jfieldID cover_fieldID;

  /**
   * A page cover.
   */
  pageBlockCover();

  /**
   * A page cover.
   *
   * \param[in] cover_ Cover.
   */
  explicit pageBlockCover(object_ptr<PageBlock> &&cover_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 972174080;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An embedded web page.
 */
class pageBlockEmbedded final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the embedded page, if available.
  string url_;
  static jfieldID url_fieldID;
  /// HTML-markup of the embedded page.
  string html_;
  static jfieldID html_fieldID;
  /// Poster photo, if available; may be null.
  object_ptr<photo> poster_photo_;
  static jfieldID poster_photo_fieldID;
  /// Block width; 0 if unknown.
  int32 width_;
  static jfieldID width_fieldID;
  /// Block height; 0 if unknown.
  int32 height_;
  static jfieldID height_fieldID;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;
  /// True, if the block must be full width.
  bool is_full_width_;
  static jfieldID is_full_width_fieldID;
  /// True, if scrolling needs to be allowed.
  bool allow_scrolling_;
  static jfieldID allow_scrolling_fieldID;

  /**
   * An embedded web page.
   */
  pageBlockEmbedded();

  /**
   * An embedded web page.
   *
   * \param[in] url_ URL of the embedded page, if available.
   * \param[in] html_ HTML-markup of the embedded page.
   * \param[in] poster_photo_ Poster photo, if available; may be null.
   * \param[in] width_ Block width; 0 if unknown.
   * \param[in] height_ Block height; 0 if unknown.
   * \param[in] caption_ Block caption.
   * \param[in] is_full_width_ True, if the block must be full width.
   * \param[in] allow_scrolling_ True, if scrolling needs to be allowed.
   */
  pageBlockEmbedded(string const &url_, string const &html_, object_ptr<photo> &&poster_photo_, int32 width_, int32 height_, object_ptr<pageBlockCaption> &&caption_, bool is_full_width_, bool allow_scrolling_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1942577763;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An embedded post.
 */
class pageBlockEmbeddedPost final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the embedded post.
  string url_;
  static jfieldID url_fieldID;
  /// Post author.
  string author_;
  static jfieldID author_fieldID;
  /// Post author photo; may be null.
  object_ptr<photo> author_photo_;
  static jfieldID author_photo_fieldID;
  /// Point in time (Unix timestamp) when the post was created; 0 if unknown.
  int32 date_;
  static jfieldID date_fieldID;
  /// Post content.
  array<object_ptr<PageBlock>> page_blocks_;
  static jfieldID page_blocks_fieldID;
  /// Post caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;

  /**
   * An embedded post.
   */
  pageBlockEmbeddedPost();

  /**
   * An embedded post.
   *
   * \param[in] url_ URL of the embedded post.
   * \param[in] author_ Post author.
   * \param[in] author_photo_ Post author photo; may be null.
   * \param[in] date_ Point in time (Unix timestamp) when the post was created; 0 if unknown.
   * \param[in] page_blocks_ Post content.
   * \param[in] caption_ Post caption.
   */
  pageBlockEmbeddedPost(string const &url_, string const &author_, object_ptr<photo> &&author_photo_, int32 date_, array<object_ptr<PageBlock>> &&page_blocks_, object_ptr<pageBlockCaption> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 397600949;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A collage.
 */
class pageBlockCollage final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Collage item contents.
  array<object_ptr<PageBlock>> page_blocks_;
  static jfieldID page_blocks_fieldID;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;

  /**
   * A collage.
   */
  pageBlockCollage();

  /**
   * A collage.
   *
   * \param[in] page_blocks_ Collage item contents.
   * \param[in] caption_ Block caption.
   */
  pageBlockCollage(array<object_ptr<PageBlock>> &&page_blocks_, object_ptr<pageBlockCaption> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1163760110;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A slideshow.
 */
class pageBlockSlideshow final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Slideshow item contents.
  array<object_ptr<PageBlock>> page_blocks_;
  static jfieldID page_blocks_fieldID;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;

  /**
   * A slideshow.
   */
  pageBlockSlideshow();

  /**
   * A slideshow.
   *
   * \param[in] page_blocks_ Slideshow item contents.
   * \param[in] caption_ Block caption.
   */
  pageBlockSlideshow(array<object_ptr<PageBlock>> &&page_blocks_, object_ptr<pageBlockCaption> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 539217375;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A link to a chat.
 */
class pageBlockChatLink final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat title.
  string title_;
  static jfieldID title_fieldID;
  /// Chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  static jfieldID photo_fieldID;
  /// Identifier of the accent color for chat title and background of chat photo.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Chat username by which all other information about the chat can be resolved.
  string username_;
  static jfieldID username_fieldID;

  /**
   * A link to a chat.
   */
  pageBlockChatLink();

  /**
   * A link to a chat.
   *
   * \param[in] title_ Chat title.
   * \param[in] photo_ Chat photo; may be null.
   * \param[in] accent_color_id_ Identifier of the accent color for chat title and background of chat photo.
   * \param[in] username_ Chat username by which all other information about the chat can be resolved.
   */
  pageBlockChatLink(string const &title_, object_ptr<chatPhotoInfo> &&photo_, int32 accent_color_id_, string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1646188731;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A table.
 */
class pageBlockTable final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Table caption.
  object_ptr<RichText> caption_;
  static jfieldID caption_fieldID;
  /// Table cells.
  array<array<object_ptr<pageBlockTableCell>>> cells_;
  static jfieldID cells_fieldID;
  /// True, if the table is bordered.
  bool is_bordered_;
  static jfieldID is_bordered_fieldID;
  /// True, if the table is striped.
  bool is_striped_;
  static jfieldID is_striped_fieldID;

  /**
   * A table.
   */
  pageBlockTable();

  /**
   * A table.
   *
   * \param[in] caption_ Table caption.
   * \param[in] cells_ Table cells.
   * \param[in] is_bordered_ True, if the table is bordered.
   * \param[in] is_striped_ True, if the table is striped.
   */
  pageBlockTable(object_ptr<RichText> &&caption_, array<array<object_ptr<pageBlockTableCell>>> &&cells_, bool is_bordered_, bool is_striped_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -942649288;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A collapsible block.
 */
class pageBlockDetails final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Always visible heading for the block.
  object_ptr<RichText> header_;
  static jfieldID header_fieldID;
  /// Block contents.
  array<object_ptr<PageBlock>> page_blocks_;
  static jfieldID page_blocks_fieldID;
  /// True, if the block is open by default.
  bool is_open_;
  static jfieldID is_open_fieldID;

  /**
   * A collapsible block.
   */
  pageBlockDetails();

  /**
   * A collapsible block.
   *
   * \param[in] header_ Always visible heading for the block.
   * \param[in] page_blocks_ Block contents.
   * \param[in] is_open_ True, if the block is open by default.
   */
  pageBlockDetails(object_ptr<RichText> &&header_, array<object_ptr<PageBlock>> &&page_blocks_, bool is_open_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1599869809;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Related articles.
 */
class pageBlockRelatedArticles final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Block header.
  object_ptr<RichText> header_;
  static jfieldID header_fieldID;
  /// List of related articles.
  array<object_ptr<pageBlockRelatedArticle>> articles_;
  static jfieldID articles_fieldID;

  /**
   * Related articles.
   */
  pageBlockRelatedArticles();

  /**
   * Related articles.
   *
   * \param[in] header_ Block header.
   * \param[in] articles_ List of related articles.
   */
  pageBlockRelatedArticles(object_ptr<RichText> &&header_, array<object_ptr<pageBlockRelatedArticle>> &&articles_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1807324374;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A map.
 */
class pageBlockMap final : public PageBlock {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Location of the map center.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Map zoom level.
  int32 zoom_;
  static jfieldID zoom_fieldID;
  /// Map width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Map height.
  int32 height_;
  static jfieldID height_fieldID;
  /// Block caption.
  object_ptr<pageBlockCaption> caption_;
  static jfieldID caption_fieldID;

  /**
   * A map.
   */
  pageBlockMap();

  /**
   * A map.
   *
   * \param[in] location_ Location of the map center.
   * \param[in] zoom_ Map zoom level.
   * \param[in] width_ Map width.
   * \param[in] height_ Map height.
   * \param[in] caption_ Block caption.
   */
  pageBlockMap(object_ptr<location> &&location_, int32 zoom_, int32 width_, int32 height_, object_ptr<pageBlockCaption> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1510961171;

  static object_ptr<PageBlock> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class RichText;

/**
 * Contains a caption of another block.
 */
class pageBlockCaption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Content of the caption.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// Block credit (like HTML tag &lt;cite&gt;).
  object_ptr<RichText> credit_;
  static jfieldID credit_fieldID;

  /**
   * Contains a caption of another block.
   */
  pageBlockCaption();

  /**
   * Contains a caption of another block.
   *
   * \param[in] text_ Content of the caption.
   * \param[in] credit_ Block credit (like HTML tag &lt;cite&gt;).
   */
  pageBlockCaption(object_ptr<RichText> &&text_, object_ptr<RichText> &&credit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1180064650;

  static object_ptr<pageBlockCaption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a horizontal alignment of a table cell content.
 */
class PageBlockHorizontalAlignment: public Object {
 public:
  static jclass Class;

  static object_ptr<PageBlockHorizontalAlignment> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The content must be left-aligned.
 */
class pageBlockHorizontalAlignmentLeft final : public PageBlockHorizontalAlignment {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The content must be left-aligned.
   */
  pageBlockHorizontalAlignmentLeft();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 848701417;

  static object_ptr<PageBlockHorizontalAlignment> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The content must be center-aligned.
 */
class pageBlockHorizontalAlignmentCenter final : public PageBlockHorizontalAlignment {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The content must be center-aligned.
   */
  pageBlockHorizontalAlignmentCenter();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1009203990;

  static object_ptr<PageBlockHorizontalAlignment> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The content must be right-aligned.
 */
class pageBlockHorizontalAlignmentRight final : public PageBlockHorizontalAlignment {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The content must be right-aligned.
   */
  pageBlockHorizontalAlignmentRight();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1371369214;

  static object_ptr<PageBlockHorizontalAlignment> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PageBlock;

/**
 * Describes an item of a list page block.
 */
class pageBlockListItem final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Item label.
  string label_;
  static jfieldID label_fieldID;
  /// Item blocks.
  array<object_ptr<PageBlock>> page_blocks_;
  static jfieldID page_blocks_fieldID;

  /**
   * Describes an item of a list page block.
   */
  pageBlockListItem();

  /**
   * Describes an item of a list page block.
   *
   * \param[in] label_ Item label.
   * \param[in] page_blocks_ Item blocks.
   */
  pageBlockListItem(string const &label_, array<object_ptr<PageBlock>> &&page_blocks_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 323186259;

  static object_ptr<pageBlockListItem> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

/**
 * Contains information about a related article.
 */
class pageBlockRelatedArticle final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Related article URL.
  string url_;
  static jfieldID url_fieldID;
  /// Article title; may be empty.
  string title_;
  static jfieldID title_fieldID;
  /// Article description; may be empty.
  string description_;
  static jfieldID description_fieldID;
  /// Article photo; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Article author; may be empty.
  string author_;
  static jfieldID author_fieldID;
  /// Point in time (Unix timestamp) when the article was published; 0 if unknown.
  int32 publish_date_;
  static jfieldID publish_date_fieldID;

  /**
   * Contains information about a related article.
   */
  pageBlockRelatedArticle();

  /**
   * Contains information about a related article.
   *
   * \param[in] url_ Related article URL.
   * \param[in] title_ Article title; may be empty.
   * \param[in] description_ Article description; may be empty.
   * \param[in] photo_ Article photo; may be null.
   * \param[in] author_ Article author; may be empty.
   * \param[in] publish_date_ Point in time (Unix timestamp) when the article was published; 0 if unknown.
   */
  pageBlockRelatedArticle(string const &url_, string const &title_, string const &description_, object_ptr<photo> &&photo_, string const &author_, int32 publish_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 481199251;

  static object_ptr<pageBlockRelatedArticle> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PageBlockHorizontalAlignment;

class PageBlockVerticalAlignment;

class RichText;

/**
 * Represents a cell of a table.
 */
class pageBlockTableCell final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Cell text; may be null. If the text is null, then the cell must be invisible.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// True, if it is a header cell.
  bool is_header_;
  static jfieldID is_header_fieldID;
  /// The number of columns the cell spans.
  int32 colspan_;
  static jfieldID colspan_fieldID;
  /// The number of rows the cell spans.
  int32 rowspan_;
  static jfieldID rowspan_fieldID;
  /// Horizontal cell content alignment.
  object_ptr<PageBlockHorizontalAlignment> align_;
  static jfieldID align_fieldID;
  /// Vertical cell content alignment.
  object_ptr<PageBlockVerticalAlignment> valign_;
  static jfieldID valign_fieldID;

  /**
   * Represents a cell of a table.
   */
  pageBlockTableCell();

  /**
   * Represents a cell of a table.
   *
   * \param[in] text_ Cell text; may be null. If the text is null, then the cell must be invisible.
   * \param[in] is_header_ True, if it is a header cell.
   * \param[in] colspan_ The number of columns the cell spans.
   * \param[in] rowspan_ The number of rows the cell spans.
   * \param[in] align_ Horizontal cell content alignment.
   * \param[in] valign_ Vertical cell content alignment.
   */
  pageBlockTableCell(object_ptr<RichText> &&text_, bool is_header_, int32 colspan_, int32 rowspan_, object_ptr<PageBlockHorizontalAlignment> &&align_, object_ptr<PageBlockVerticalAlignment> &&valign_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1417658214;

  static object_ptr<pageBlockTableCell> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a Vertical alignment of a table cell content.
 */
class PageBlockVerticalAlignment: public Object {
 public:
  static jclass Class;

  static object_ptr<PageBlockVerticalAlignment> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The content must be top-aligned.
 */
class pageBlockVerticalAlignmentTop final : public PageBlockVerticalAlignment {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The content must be top-aligned.
   */
  pageBlockVerticalAlignmentTop();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 195500454;

  static object_ptr<PageBlockVerticalAlignment> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The content must be middle-aligned.
 */
class pageBlockVerticalAlignmentMiddle final : public PageBlockVerticalAlignment {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The content must be middle-aligned.
   */
  pageBlockVerticalAlignmentMiddle();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2123096587;

  static object_ptr<PageBlockVerticalAlignment> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The content must be bottom-aligned.
 */
class pageBlockVerticalAlignmentBottom final : public PageBlockVerticalAlignment {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The content must be bottom-aligned.
   */
  pageBlockVerticalAlignmentBottom();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2092531158;

  static object_ptr<PageBlockVerticalAlignment> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class minithumbnail;

class photo;

class video;

/**
 * This class is an abstract base class.
 * Describes a paid media.
 */
class PaidMedia: public Object {
 public:
  static jclass Class;

  static object_ptr<PaidMedia> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is hidden until the invoice is paid.
 */
class paidMediaPreview final : public PaidMedia {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Media width; 0 if unknown.
  int32 width_;
  static jfieldID width_fieldID;
  /// Media height; 0 if unknown.
  int32 height_;
  static jfieldID height_fieldID;
  /// Media duration, in seconds; 0 if unknown.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Media minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;

  /**
   * The media is hidden until the invoice is paid.
   */
  paidMediaPreview();

  /**
   * The media is hidden until the invoice is paid.
   *
   * \param[in] width_ Media width; 0 if unknown.
   * \param[in] height_ Media height; 0 if unknown.
   * \param[in] duration_ Media duration, in seconds; 0 if unknown.
   * \param[in] minithumbnail_ Media minithumbnail; may be null.
   */
  paidMediaPreview(int32 width_, int32 height_, int32 duration_, object_ptr<minithumbnail> &&minithumbnail_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1128151948;

  static object_ptr<PaidMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is a photo.
 */
class paidMediaPhoto final : public PaidMedia {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// The video representing the live photo; may be null if the photo is static.
  object_ptr<video> video_;
  static jfieldID video_fieldID;

  /**
   * The media is a photo.
   */
  paidMediaPhoto();

  /**
   * The media is a photo.
   *
   * \param[in] photo_ The photo.
   * \param[in] video_ The video representing the live photo; may be null if the photo is static.
   */
  paidMediaPhoto(object_ptr<photo> &&photo_, object_ptr<video> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -307151500;

  static object_ptr<PaidMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is a video.
 */
class paidMediaVideo final : public PaidMedia {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The video.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Cover of the video; may be null if none.
  object_ptr<photo> cover_;
  static jfieldID cover_fieldID;
  /// Timestamp from which the video playing must start, in seconds.
  int32 start_timestamp_;
  static jfieldID start_timestamp_fieldID;

  /**
   * The media is a video.
   */
  paidMediaVideo();

  /**
   * The media is a video.
   *
   * \param[in] video_ The video.
   * \param[in] cover_ Cover of the video; may be null if none.
   * \param[in] start_timestamp_ Timestamp from which the video playing must start, in seconds.
   */
  paidMediaVideo(object_ptr<video> &&video_, object_ptr<photo> &&cover_, int32 start_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 870838318;

  static object_ptr<PaidMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The media is unsupported.
 */
class paidMediaUnsupported final : public PaidMedia {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The media is unsupported.
   */
  paidMediaUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 112999974;

  static object_ptr<PaidMedia> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of paid message reaction.
 */
class PaidReactionType: public Object {
 public:
  static jclass Class;

  static object_ptr<PaidReactionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A paid reaction on behalf of the current user.
 */
class paidReactionTypeRegular final : public PaidReactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A paid reaction on behalf of the current user.
   */
  paidReactionTypeRegular();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1199187333;

  static object_ptr<PaidReactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An anonymous paid reaction.
 */
class paidReactionTypeAnonymous final : public PaidReactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An anonymous paid reaction.
   */
  paidReactionTypeAnonymous();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 47892621;

  static object_ptr<PaidReactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A paid reaction on behalf of an owned chat.
 */
class paidReactionTypeChat final : public PaidReactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * A paid reaction on behalf of an owned chat.
   */
  paidReactionTypeChat();

  /**
   * A paid reaction on behalf of an owned chat.
   *
   * \param[in] chat_id_ Identifier of the chat.
   */
  explicit paidReactionTypeChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -675782044;

  static object_ptr<PaidReactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Contains information about a user who added paid reactions.
 */
class paidReactor final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Number of Telegram Stars added.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// True, if the reactor is one of the most active reactors; may be false if the reactor is the current user.
  bool is_top_;
  static jfieldID is_top_fieldID;
  /// True, if the paid reaction was added by the current user.
  bool is_me_;
  static jfieldID is_me_fieldID;
  /// True, if the reactor is anonymous.
  bool is_anonymous_;
  static jfieldID is_anonymous_fieldID;

  /**
   * Contains information about a user who added paid reactions.
   */
  paidReactor();

  /**
   * Contains information about a user who added paid reactions.
   *
   * \param[in] sender_id_ Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user.
   * \param[in] star_count_ Number of Telegram Stars added.
   * \param[in] is_top_ True, if the reactor is one of the most active reactors; may be false if the reactor is the current user.
   * \param[in] is_me_ True, if the paid reaction was added by the current user.
   * \param[in] is_anonymous_ True, if the reactor is anonymous.
   */
  paidReactor(object_ptr<MessageSender> &&sender_id_, int53 star_count_, bool is_top_, bool is_me_, bool is_anonymous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -748917113;

  static object_ptr<paidReactor> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a passkey.
 */
class passkey final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the passkey.
  string id_;
  static jfieldID id_fieldID;
  /// Name of the passkey.
  string name_;
  static jfieldID name_fieldID;
  /// Point in time (Unix timestamp) when the passkey was added.
  int32 addition_date_;
  static jfieldID addition_date_fieldID;
  /// Point in time (Unix timestamp) when the passkey was used last time; 0 if never.
  int32 last_usage_date_;
  static jfieldID last_usage_date_fieldID;
  /// Identifier of the custom emoji that is used as the icon of the software, which created the passkey; 0 if unknown.
  int64 software_icon_custom_emoji_id_;
  static jfieldID software_icon_custom_emoji_id_fieldID;

  /**
   * Describes a passkey.
   */
  passkey();

  /**
   * Describes a passkey.
   *
   * \param[in] id_ Unique identifier of the passkey.
   * \param[in] name_ Name of the passkey.
   * \param[in] addition_date_ Point in time (Unix timestamp) when the passkey was added.
   * \param[in] last_usage_date_ Point in time (Unix timestamp) when the passkey was used last time; 0 if never.
   * \param[in] software_icon_custom_emoji_id_ Identifier of the custom emoji that is used as the icon of the software, which created the passkey; 0 if unknown.
   */
  passkey(string const &id_, string const &name_, int32 addition_date_, int32 last_usage_date_, int64 software_icon_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1200601505;

  static object_ptr<passkey> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class passkey;

/**
 * Contains a list of passkeys.
 */
class passkeys final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of passkeys.
  array<object_ptr<passkey>> passkeys_;
  static jfieldID passkeys_fieldID;

  /**
   * Contains a list of passkeys.
   */
  passkeys();

  /**
   * Contains a list of passkeys.
   *
   * \param[in] passkeys_ List of passkeys.
   */
  explicit passkeys(array<object_ptr<passkey>> &&passkeys_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 601084419;

  static object_ptr<passkeys> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class passportRequiredElement;

/**
 * Contains information about a Telegram Passport authorization form that was requested.
 */
class passportAuthorizationForm final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the authorization form.
  int32 id_;
  static jfieldID id_fieldID;
  /// Telegram Passport elements that must be provided to complete the form.
  array<object_ptr<passportRequiredElement>> required_elements_;
  static jfieldID required_elements_fieldID;
  /// URL for the privacy policy of the service; may be empty.
  string privacy_policy_url_;
  static jfieldID privacy_policy_url_fieldID;

  /**
   * Contains information about a Telegram Passport authorization form that was requested.
   */
  passportAuthorizationForm();

  /**
   * Contains information about a Telegram Passport authorization form that was requested.
   *
   * \param[in] id_ Unique identifier of the authorization form.
   * \param[in] required_elements_ Telegram Passport elements that must be provided to complete the form.
   * \param[in] privacy_policy_url_ URL for the privacy policy of the service; may be empty.
   */
  passportAuthorizationForm(int32 id_, array<object_ptr<passportRequiredElement>> &&required_elements_, string const &privacy_policy_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1070673218;

  static object_ptr<passportAuthorizationForm> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class address;

class identityDocument;

class personalDetails;

class personalDocument;

/**
 * This class is an abstract base class.
 * Contains information about a Telegram Passport element.
 */
class PassportElement: public Object {
 public:
  static jclass Class;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's personal details.
 */
class passportElementPersonalDetails final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Personal details of the user.
  object_ptr<personalDetails> personal_details_;
  static jfieldID personal_details_fieldID;

  /**
   * A Telegram Passport element containing the user's personal details.
   */
  passportElementPersonalDetails();

  /**
   * A Telegram Passport element containing the user's personal details.
   *
   * \param[in] personal_details_ Personal details of the user.
   */
  explicit passportElementPersonalDetails(object_ptr<personalDetails> &&personal_details_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1217724035;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's passport.
 */
class passportElementPassport final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Passport.
  object_ptr<identityDocument> passport_;
  static jfieldID passport_fieldID;

  /**
   * A Telegram Passport element containing the user's passport.
   */
  passportElementPassport();

  /**
   * A Telegram Passport element containing the user's passport.
   *
   * \param[in] passport_ Passport.
   */
  explicit passportElementPassport(object_ptr<identityDocument> &&passport_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -263985373;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's driver license.
 */
class passportElementDriverLicense final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Driver license.
  object_ptr<identityDocument> driver_license_;
  static jfieldID driver_license_fieldID;

  /**
   * A Telegram Passport element containing the user's driver license.
   */
  passportElementDriverLicense();

  /**
   * A Telegram Passport element containing the user's driver license.
   *
   * \param[in] driver_license_ Driver license.
   */
  explicit passportElementDriverLicense(object_ptr<identityDocument> &&driver_license_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1643580589;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's identity card.
 */
class passportElementIdentityCard final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identity card.
  object_ptr<identityDocument> identity_card_;
  static jfieldID identity_card_fieldID;

  /**
   * A Telegram Passport element containing the user's identity card.
   */
  passportElementIdentityCard();

  /**
   * A Telegram Passport element containing the user's identity card.
   *
   * \param[in] identity_card_ Identity card.
   */
  explicit passportElementIdentityCard(object_ptr<identityDocument> &&identity_card_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2083775797;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's internal passport.
 */
class passportElementInternalPassport final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Internal passport.
  object_ptr<identityDocument> internal_passport_;
  static jfieldID internal_passport_fieldID;

  /**
   * A Telegram Passport element containing the user's internal passport.
   */
  passportElementInternalPassport();

  /**
   * A Telegram Passport element containing the user's internal passport.
   *
   * \param[in] internal_passport_ Internal passport.
   */
  explicit passportElementInternalPassport(object_ptr<identityDocument> &&internal_passport_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 36220295;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's address.
 */
class passportElementAddress final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Address.
  object_ptr<address> address_;
  static jfieldID address_fieldID;

  /**
   * A Telegram Passport element containing the user's address.
   */
  passportElementAddress();

  /**
   * A Telegram Passport element containing the user's address.
   *
   * \param[in] address_ Address.
   */
  explicit passportElementAddress(object_ptr<address> &&address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -782625232;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's utility bill.
 */
class passportElementUtilityBill final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Utility bill.
  object_ptr<personalDocument> utility_bill_;
  static jfieldID utility_bill_fieldID;

  /**
   * A Telegram Passport element containing the user's utility bill.
   */
  passportElementUtilityBill();

  /**
   * A Telegram Passport element containing the user's utility bill.
   *
   * \param[in] utility_bill_ Utility bill.
   */
  explicit passportElementUtilityBill(object_ptr<personalDocument> &&utility_bill_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -234611246;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's bank statement.
 */
class passportElementBankStatement final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Bank statement.
  object_ptr<personalDocument> bank_statement_;
  static jfieldID bank_statement_fieldID;

  /**
   * A Telegram Passport element containing the user's bank statement.
   */
  passportElementBankStatement();

  /**
   * A Telegram Passport element containing the user's bank statement.
   *
   * \param[in] bank_statement_ Bank statement.
   */
  explicit passportElementBankStatement(object_ptr<personalDocument> &&bank_statement_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -366464408;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's rental agreement.
 */
class passportElementRentalAgreement final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Rental agreement.
  object_ptr<personalDocument> rental_agreement_;
  static jfieldID rental_agreement_fieldID;

  /**
   * A Telegram Passport element containing the user's rental agreement.
   */
  passportElementRentalAgreement();

  /**
   * A Telegram Passport element containing the user's rental agreement.
   *
   * \param[in] rental_agreement_ Rental agreement.
   */
  explicit passportElementRentalAgreement(object_ptr<personalDocument> &&rental_agreement_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -290141400;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's passport registration pages.
 */
class passportElementPassportRegistration final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Passport registration pages.
  object_ptr<personalDocument> passport_registration_;
  static jfieldID passport_registration_fieldID;

  /**
   * A Telegram Passport element containing the user's passport registration pages.
   */
  passportElementPassportRegistration();

  /**
   * A Telegram Passport element containing the user's passport registration pages.
   *
   * \param[in] passport_registration_ Passport registration pages.
   */
  explicit passportElementPassportRegistration(object_ptr<personalDocument> &&passport_registration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 618323071;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's temporary registration.
 */
class passportElementTemporaryRegistration final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Temporary registration.
  object_ptr<personalDocument> temporary_registration_;
  static jfieldID temporary_registration_fieldID;

  /**
   * A Telegram Passport element containing the user's temporary registration.
   */
  passportElementTemporaryRegistration();

  /**
   * A Telegram Passport element containing the user's temporary registration.
   *
   * \param[in] temporary_registration_ Temporary registration.
   */
  explicit passportElementTemporaryRegistration(object_ptr<personalDocument> &&temporary_registration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1237626864;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's phone number.
 */
class passportElementPhoneNumber final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Phone number.
  string phone_number_;
  static jfieldID phone_number_fieldID;

  /**
   * A Telegram Passport element containing the user's phone number.
   */
  passportElementPhoneNumber();

  /**
   * A Telegram Passport element containing the user's phone number.
   *
   * \param[in] phone_number_ Phone number.
   */
  explicit passportElementPhoneNumber(string const &phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1320118375;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's email address.
 */
class passportElementEmailAddress final : public PassportElement {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Email address.
  string email_address_;
  static jfieldID email_address_fieldID;

  /**
   * A Telegram Passport element containing the user's email address.
   */
  passportElementEmailAddress();

  /**
   * A Telegram Passport element containing the user's email address.
   *
   * \param[in] email_address_ Email address.
   */
  explicit passportElementEmailAddress(string const &email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1528129531;

  static object_ptr<PassportElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PassportElementErrorSource;

class PassportElementType;

/**
 * Contains the description of an error in a Telegram Passport element.
 */
class passportElementError final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the Telegram Passport element which has the error.
  object_ptr<PassportElementType> type_;
  static jfieldID type_fieldID;
  /// Error message.
  string message_;
  static jfieldID message_fieldID;
  /// Error source.
  object_ptr<PassportElementErrorSource> source_;
  static jfieldID source_fieldID;

  /**
   * Contains the description of an error in a Telegram Passport element.
   */
  passportElementError();

  /**
   * Contains the description of an error in a Telegram Passport element.
   *
   * \param[in] type_ Type of the Telegram Passport element which has the error.
   * \param[in] message_ Error message.
   * \param[in] source_ Error source.
   */
  passportElementError(object_ptr<PassportElementType> &&type_, string const &message_, object_ptr<PassportElementErrorSource> &&source_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1861902395;

  static object_ptr<passportElementError> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains the description of an error in a Telegram Passport element.
 */
class PassportElementErrorSource: public Object {
 public:
  static jclass Class;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The element contains an error in an unspecified place. The error will be considered resolved when new data is added.
 */
class passportElementErrorSourceUnspecified final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The element contains an error in an unspecified place. The error will be considered resolved when new data is added.
   */
  passportElementErrorSourceUnspecified();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -378320830;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * One of the data fields contains an error. The error will be considered resolved when the value of the field changes.
 */
class passportElementErrorSourceDataField final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Field name.
  string field_name_;
  static jfieldID field_name_fieldID;

  /**
   * One of the data fields contains an error. The error will be considered resolved when the value of the field changes.
   */
  passportElementErrorSourceDataField();

  /**
   * One of the data fields contains an error. The error will be considered resolved when the value of the field changes.
   *
   * \param[in] field_name_ Field name.
   */
  explicit passportElementErrorSourceDataField(string const &field_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -308650776;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The front side of the document contains an error. The error will be considered resolved when the file with the front side changes.
 */
class passportElementErrorSourceFrontSide final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The front side of the document contains an error. The error will be considered resolved when the file with the front side changes.
   */
  passportElementErrorSourceFrontSide();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1895658292;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes.
 */
class passportElementErrorSourceReverseSide final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes.
   */
  passportElementErrorSourceReverseSide();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1918630391;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes.
 */
class passportElementErrorSourceSelfie final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes.
   */
  passportElementErrorSourceSelfie();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -797043672;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * One of files with the translation of the document contains an error. The error will be considered resolved when the file changes.
 */
class passportElementErrorSourceTranslationFile final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Index of a file with the error.
  int32 file_index_;
  static jfieldID file_index_fieldID;

  /**
   * One of files with the translation of the document contains an error. The error will be considered resolved when the file changes.
   */
  passportElementErrorSourceTranslationFile();

  /**
   * One of files with the translation of the document contains an error. The error will be considered resolved when the file changes.
   *
   * \param[in] file_index_ Index of a file with the error.
   */
  explicit passportElementErrorSourceTranslationFile(int32 file_index_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -689621228;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The translation of the document contains an error. The error will be considered resolved when the list of translation files changes.
 */
class passportElementErrorSourceTranslationFiles final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The translation of the document contains an error. The error will be considered resolved when the list of translation files changes.
   */
  passportElementErrorSourceTranslationFiles();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 581280796;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file contains an error. The error will be considered resolved when the file changes.
 */
class passportElementErrorSourceFile final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Index of a file with the error.
  int32 file_index_;
  static jfieldID file_index_fieldID;

  /**
   * The file contains an error. The error will be considered resolved when the file changes.
   */
  passportElementErrorSourceFile();

  /**
   * The file contains an error. The error will be considered resolved when the file changes.
   *
   * \param[in] file_index_ Index of a file with the error.
   */
  explicit passportElementErrorSourceFile(int32 file_index_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2020358960;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of attached files contains an error. The error will be considered resolved when the list of files changes.
 */
class passportElementErrorSourceFiles final : public PassportElementErrorSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The list of attached files contains an error. The error will be considered resolved when the list of files changes.
   */
  passportElementErrorSourceFiles();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1894164178;

  static object_ptr<PassportElementErrorSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains the type of Telegram Passport element.
 */
class PassportElementType: public Object {
 public:
  static jclass Class;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's personal details.
 */
class passportElementTypePersonalDetails final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's personal details.
   */
  passportElementTypePersonalDetails();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1032136365;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's passport.
 */
class passportElementTypePassport final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's passport.
   */
  passportElementTypePassport();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -436360376;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's driver license.
 */
class passportElementTypeDriverLicense final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's driver license.
   */
  passportElementTypeDriverLicense();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1827298379;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's identity card.
 */
class passportElementTypeIdentityCard final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's identity card.
   */
  passportElementTypeIdentityCard();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -502356132;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's internal passport.
 */
class passportElementTypeInternalPassport final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's internal passport.
   */
  passportElementTypeInternalPassport();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -793781959;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's address.
 */
class passportElementTypeAddress final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's address.
   */
  passportElementTypeAddress();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 496327874;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's utility bill.
 */
class passportElementTypeUtilityBill final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's utility bill.
   */
  passportElementTypeUtilityBill();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 627084906;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's bank statement.
 */
class passportElementTypeBankStatement final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's bank statement.
   */
  passportElementTypeBankStatement();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 574095667;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's rental agreement.
 */
class passportElementTypeRentalAgreement final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's rental agreement.
   */
  passportElementTypeRentalAgreement();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2060583280;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the registration page of the user's passport.
 */
class passportElementTypePassportRegistration final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the registration page of the user's passport.
   */
  passportElementTypePassportRegistration();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -159478209;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's temporary registration.
 */
class passportElementTypeTemporaryRegistration final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's temporary registration.
   */
  passportElementTypeTemporaryRegistration();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1092498527;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's phone number.
 */
class passportElementTypePhoneNumber final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's phone number.
   */
  passportElementTypePhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -995361172;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A Telegram Passport element containing the user's email address.
 */
class passportElementTypeEmailAddress final : public PassportElementType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A Telegram Passport element containing the user's email address.
   */
  passportElementTypeEmailAddress();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -79321405;

  static object_ptr<PassportElementType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PassportElement;

/**
 * Contains information about saved Telegram Passport elements.
 */
class passportElements final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Telegram Passport elements.
  array<object_ptr<PassportElement>> elements_;
  static jfieldID elements_fieldID;

  /**
   * Contains information about saved Telegram Passport elements.
   */
  passportElements();

  /**
   * Contains information about saved Telegram Passport elements.
   *
   * \param[in] elements_ Telegram Passport elements.
   */
  explicit passportElements(array<object_ptr<PassportElement>> &&elements_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1264617556;

  static object_ptr<passportElements> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PassportElement;

class passportElementError;

/**
 * Contains information about a Telegram Passport elements and corresponding errors.
 */
class passportElementsWithErrors final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Telegram Passport elements.
  array<object_ptr<PassportElement>> elements_;
  static jfieldID elements_fieldID;
  /// Errors in the elements that are already available.
  array<object_ptr<passportElementError>> errors_;
  static jfieldID errors_fieldID;

  /**
   * Contains information about a Telegram Passport elements and corresponding errors.
   */
  passportElementsWithErrors();

  /**
   * Contains information about a Telegram Passport elements and corresponding errors.
   *
   * \param[in] elements_ Telegram Passport elements.
   * \param[in] errors_ Errors in the elements that are already available.
   */
  passportElementsWithErrors(array<object_ptr<PassportElement>> &&elements_, array<object_ptr<passportElementError>> &&errors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1308923044;

  static object_ptr<passportElementsWithErrors> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class passportSuitableElement;

/**
 * Contains a description of the required Telegram Passport element that was requested by a service.
 */
class passportRequiredElement final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of Telegram Passport elements any of which is enough to provide.
  array<object_ptr<passportSuitableElement>> suitable_elements_;
  static jfieldID suitable_elements_fieldID;

  /**
   * Contains a description of the required Telegram Passport element that was requested by a service.
   */
  passportRequiredElement();

  /**
   * Contains a description of the required Telegram Passport element that was requested by a service.
   *
   * \param[in] suitable_elements_ List of Telegram Passport elements any of which is enough to provide.
   */
  explicit passportRequiredElement(array<object_ptr<passportSuitableElement>> &&suitable_elements_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1983641651;

  static object_ptr<passportRequiredElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PassportElementType;

/**
 * Contains information about a Telegram Passport element that was requested by a service.
 */
class passportSuitableElement final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the element.
  object_ptr<PassportElementType> type_;
  static jfieldID type_fieldID;
  /// True, if a selfie is required with the identity document.
  bool is_selfie_required_;
  static jfieldID is_selfie_required_fieldID;
  /// True, if a certified English translation is required with the document.
  bool is_translation_required_;
  static jfieldID is_translation_required_fieldID;
  /// True, if personal details must include the user's name in the language of their country of residence.
  bool is_native_name_required_;
  static jfieldID is_native_name_required_fieldID;

  /**
   * Contains information about a Telegram Passport element that was requested by a service.
   */
  passportSuitableElement();

  /**
   * Contains information about a Telegram Passport element that was requested by a service.
   *
   * \param[in] type_ Type of the element.
   * \param[in] is_selfie_required_ True, if a selfie is required with the identity document.
   * \param[in] is_translation_required_ True, if a certified English translation is required with the document.
   * \param[in] is_native_name_required_ True, if personal details must include the user's name in the language of their country of residence.
   */
  passportSuitableElement(object_ptr<PassportElementType> &&type_, bool is_selfie_required_, bool is_translation_required_, bool is_native_name_required_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -789019876;

  static object_ptr<passportSuitableElement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class emailAddressAuthenticationCodeInfo;

/**
 * Represents the current state of 2-step verification.
 */
class passwordState final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if a 2-step verification password is set.
  bool has_password_;
  static jfieldID has_password_fieldID;
  /// Hint for the password; may be empty.
  string password_hint_;
  static jfieldID password_hint_fieldID;
  /// True, if a recovery email is set.
  bool has_recovery_email_address_;
  static jfieldID has_recovery_email_address_fieldID;
  /// True, if some Telegram Passport elements were saved.
  bool has_passport_data_;
  static jfieldID has_passport_data_fieldID;
  /// Information about the recovery email address to which the confirmation email was sent; may be null.
  object_ptr<emailAddressAuthenticationCodeInfo> recovery_email_address_code_info_;
  static jfieldID recovery_email_address_code_info_fieldID;
  /// Pattern of the email address set up for logging in.
  string login_email_address_pattern_;
  static jfieldID login_email_address_pattern_fieldID;
  /// If not 0, point in time (Unix timestamp) after which the 2-step verification password can be reset immediately using resetPassword.
  int32 pending_reset_date_;
  static jfieldID pending_reset_date_fieldID;

  /**
   * Represents the current state of 2-step verification.
   */
  passwordState();

  /**
   * Represents the current state of 2-step verification.
   *
   * \param[in] has_password_ True, if a 2-step verification password is set.
   * \param[in] password_hint_ Hint for the password; may be empty.
   * \param[in] has_recovery_email_address_ True, if a recovery email is set.
   * \param[in] has_passport_data_ True, if some Telegram Passport elements were saved.
   * \param[in] recovery_email_address_code_info_ Information about the recovery email address to which the confirmation email was sent; may be null.
   * \param[in] login_email_address_pattern_ Pattern of the email address set up for logging in.
   * \param[in] pending_reset_date_ If not 0, point in time (Unix timestamp) after which the 2-step verification password can be reset immediately using resetPassword.
   */
  passwordState(bool has_password_, string const &password_hint_, bool has_recovery_email_address_, bool has_passport_data_, object_ptr<emailAddressAuthenticationCodeInfo> &&recovery_email_address_code_info_, string const &login_email_address_pattern_, int32 pending_reset_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 483801128;

  static object_ptr<passwordState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PaymentFormType;

class productInfo;

/**
 * Contains information about an invoice payment form.
 */
class paymentForm final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The payment form identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Type of the payment form.
  object_ptr<PaymentFormType> type_;
  static jfieldID type_fieldID;
  /// User identifier of the seller bot.
  int53 seller_bot_user_id_;
  static jfieldID seller_bot_user_id_fieldID;
  /// Information about the product.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;

  /**
   * Contains information about an invoice payment form.
   */
  paymentForm();

  /**
   * Contains information about an invoice payment form.
   *
   * \param[in] id_ The payment form identifier.
   * \param[in] type_ Type of the payment form.
   * \param[in] seller_bot_user_id_ User identifier of the seller bot.
   * \param[in] product_info_ Information about the product.
   */
  paymentForm(int64 id_, object_ptr<PaymentFormType> &&type_, int53 seller_bot_user_id_, object_ptr<productInfo> &&product_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1998651315;

  static object_ptr<paymentForm> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PaymentProvider;

class invoice;

class orderInfo;

class paymentOption;

class savedCredentials;

class starSubscriptionPricing;

/**
 * This class is an abstract base class.
 * Describes type of payment form.
 */
class PaymentFormType: public Object {
 public:
  static jclass Class;

  static object_ptr<PaymentFormType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payment form is for a regular payment.
 */
class paymentFormTypeRegular final : public PaymentFormType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Full information about the invoice.
  object_ptr<invoice> invoice_;
  static jfieldID invoice_fieldID;
  /// User identifier of the payment provider bot.
  int53 payment_provider_user_id_;
  static jfieldID payment_provider_user_id_fieldID;
  /// Information about the payment provider.
  object_ptr<PaymentProvider> payment_provider_;
  static jfieldID payment_provider_fieldID;
  /// The list of additional payment options.
  array<object_ptr<paymentOption>> additional_payment_options_;
  static jfieldID additional_payment_options_fieldID;
  /// Saved server-side order information; may be null.
  object_ptr<orderInfo> saved_order_info_;
  static jfieldID saved_order_info_fieldID;
  /// The list of saved payment credentials.
  array<object_ptr<savedCredentials>> saved_credentials_;
  static jfieldID saved_credentials_fieldID;
  /// True, if the user can choose to save credentials.
  bool can_save_credentials_;
  static jfieldID can_save_credentials_fieldID;
  /// True, if the user will be able to save credentials, if sets up a 2-step verification password.
  bool need_password_;
  static jfieldID need_password_fieldID;

  /**
   * The payment form is for a regular payment.
   */
  paymentFormTypeRegular();

  /**
   * The payment form is for a regular payment.
   *
   * \param[in] invoice_ Full information about the invoice.
   * \param[in] payment_provider_user_id_ User identifier of the payment provider bot.
   * \param[in] payment_provider_ Information about the payment provider.
   * \param[in] additional_payment_options_ The list of additional payment options.
   * \param[in] saved_order_info_ Saved server-side order information; may be null.
   * \param[in] saved_credentials_ The list of saved payment credentials.
   * \param[in] can_save_credentials_ True, if the user can choose to save credentials.
   * \param[in] need_password_ True, if the user will be able to save credentials, if sets up a 2-step verification password.
   */
  paymentFormTypeRegular(object_ptr<invoice> &&invoice_, int53 payment_provider_user_id_, object_ptr<PaymentProvider> &&payment_provider_, array<object_ptr<paymentOption>> &&additional_payment_options_, object_ptr<orderInfo> &&saved_order_info_, array<object_ptr<savedCredentials>> &&saved_credentials_, bool can_save_credentials_, bool need_password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -615089778;

  static object_ptr<PaymentFormType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payment form is for a payment in Telegram Stars.
 */
class paymentFormTypeStars final : public PaymentFormType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that will be paid.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * The payment form is for a payment in Telegram Stars.
   */
  paymentFormTypeStars();

  /**
   * The payment form is for a payment in Telegram Stars.
   *
   * \param[in] star_count_ Number of Telegram Stars that will be paid.
   */
  explicit paymentFormTypeStars(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 90938685;

  static object_ptr<PaymentFormType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payment form is for a payment in Telegram Stars for subscription.
 */
class paymentFormTypeStarSubscription final : public PaymentFormType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about subscription plan.
  object_ptr<starSubscriptionPricing> pricing_;
  static jfieldID pricing_fieldID;

  /**
   * The payment form is for a payment in Telegram Stars for subscription.
   */
  paymentFormTypeStarSubscription();

  /**
   * The payment form is for a payment in Telegram Stars for subscription.
   *
   * \param[in] pricing_ Information about subscription plan.
   */
  explicit paymentFormTypeStarSubscription(object_ptr<starSubscriptionPricing> &&pricing_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 271444827;

  static object_ptr<PaymentFormType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an additional payment option.
 */
class paymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title for the payment option.
  string title_;
  static jfieldID title_fieldID;
  /// Payment form URL to be opened in a web view.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Describes an additional payment option.
   */
  paymentOption();

  /**
   * Describes an additional payment option.
   *
   * \param[in] title_ Title for the payment option.
   * \param[in] url_ Payment form URL to be opened in a web view.
   */
  paymentOption(string const &title_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -294020965;

  static object_ptr<paymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about a payment provider.
 */
class PaymentProvider: public Object {
 public:
  static jclass Class;

  static object_ptr<PaymentProvider> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Smart Glocal payment provider.
 */
class paymentProviderSmartGlocal final : public PaymentProvider {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Public payment token.
  string public_token_;
  static jfieldID public_token_fieldID;
  /// URL for sending card tokenization requests.
  string tokenize_url_;
  static jfieldID tokenize_url_fieldID;

  /**
   * Smart Glocal payment provider.
   */
  paymentProviderSmartGlocal();

  /**
   * Smart Glocal payment provider.
   *
   * \param[in] public_token_ Public payment token.
   * \param[in] tokenize_url_ URL for sending card tokenization requests.
   */
  paymentProviderSmartGlocal(string const &public_token_, string const &tokenize_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1174112396;

  static object_ptr<PaymentProvider> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Stripe payment provider.
 */
class paymentProviderStripe final : public PaymentProvider {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Stripe API publishable key.
  string publishable_key_;
  static jfieldID publishable_key_fieldID;
  /// True, if the user country must be provided.
  bool need_country_;
  static jfieldID need_country_fieldID;
  /// True, if the user ZIP/postal code must be provided.
  bool need_postal_code_;
  static jfieldID need_postal_code_fieldID;
  /// True, if the cardholder name must be provided.
  bool need_cardholder_name_;
  static jfieldID need_cardholder_name_fieldID;

  /**
   * Stripe payment provider.
   */
  paymentProviderStripe();

  /**
   * Stripe payment provider.
   *
   * \param[in] publishable_key_ Stripe API publishable key.
   * \param[in] need_country_ True, if the user country must be provided.
   * \param[in] need_postal_code_ True, if the user ZIP/postal code must be provided.
   * \param[in] need_cardholder_name_ True, if the cardholder name must be provided.
   */
  paymentProviderStripe(string const &publishable_key_, bool need_country_, bool need_postal_code_, bool need_cardholder_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 370467227;

  static object_ptr<PaymentProvider> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some other payment provider, for which a web payment form must be shown.
 */
class paymentProviderOther final : public PaymentProvider {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Payment form URL.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Some other payment provider, for which a web payment form must be shown.
   */
  paymentProviderOther();

  /**
   * Some other payment provider, for which a web payment form must be shown.
   *
   * \param[in] url_ Payment form URL.
   */
  explicit paymentProviderOther(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1336876828;

  static object_ptr<PaymentProvider> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PaymentReceiptType;

class productInfo;

/**
 * Contains information about a successful payment.
 */
class paymentReceipt final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the product.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;
  /// Point in time (Unix timestamp) when the payment was made.
  int32 date_;
  static jfieldID date_fieldID;
  /// User identifier of the seller bot.
  int53 seller_bot_user_id_;
  static jfieldID seller_bot_user_id_fieldID;
  /// Type of the payment receipt.
  object_ptr<PaymentReceiptType> type_;
  static jfieldID type_fieldID;

  /**
   * Contains information about a successful payment.
   */
  paymentReceipt();

  /**
   * Contains information about a successful payment.
   *
   * \param[in] product_info_ Information about the product.
   * \param[in] date_ Point in time (Unix timestamp) when the payment was made.
   * \param[in] seller_bot_user_id_ User identifier of the seller bot.
   * \param[in] type_ Type of the payment receipt.
   */
  paymentReceipt(object_ptr<productInfo> &&product_info_, int32 date_, int53 seller_bot_user_id_, object_ptr<PaymentReceiptType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 758199186;

  static object_ptr<paymentReceipt> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class invoice;

class orderInfo;

class shippingOption;

/**
 * This class is an abstract base class.
 * Describes type of successful payment.
 */
class PaymentReceiptType: public Object {
 public:
  static jclass Class;

  static object_ptr<PaymentReceiptType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payment was done using a third-party payment provider.
 */
class paymentReceiptTypeRegular final : public PaymentReceiptType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the payment provider bot.
  int53 payment_provider_user_id_;
  static jfieldID payment_provider_user_id_fieldID;
  /// Information about the invoice.
  object_ptr<invoice> invoice_;
  static jfieldID invoice_fieldID;
  /// Order information; may be null.
  object_ptr<orderInfo> order_info_;
  static jfieldID order_info_fieldID;
  /// Chosen shipping option; may be null.
  object_ptr<shippingOption> shipping_option_;
  static jfieldID shipping_option_fieldID;
  /// Title of the saved credentials chosen by the buyer.
  string credentials_title_;
  static jfieldID credentials_title_fieldID;
  /// The amount of tip chosen by the buyer in the smallest units of the currency.
  int53 tip_amount_;
  static jfieldID tip_amount_fieldID;

  /**
   * The payment was done using a third-party payment provider.
   */
  paymentReceiptTypeRegular();

  /**
   * The payment was done using a third-party payment provider.
   *
   * \param[in] payment_provider_user_id_ User identifier of the payment provider bot.
   * \param[in] invoice_ Information about the invoice.
   * \param[in] order_info_ Order information; may be null.
   * \param[in] shipping_option_ Chosen shipping option; may be null.
   * \param[in] credentials_title_ Title of the saved credentials chosen by the buyer.
   * \param[in] tip_amount_ The amount of tip chosen by the buyer in the smallest units of the currency.
   */
  paymentReceiptTypeRegular(int53 payment_provider_user_id_, object_ptr<invoice> &&invoice_, object_ptr<orderInfo> &&order_info_, object_ptr<shippingOption> &&shipping_option_, string const &credentials_title_, int53 tip_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1636362826;

  static object_ptr<PaymentReceiptType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The payment was done using Telegram Stars.
 */
class paymentReceiptTypeStars final : public PaymentReceiptType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that were paid.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Unique identifier of the transaction that can be used to dispute it.
  string transaction_id_;
  static jfieldID transaction_id_fieldID;

  /**
   * The payment was done using Telegram Stars.
   */
  paymentReceiptTypeStars();

  /**
   * The payment was done using Telegram Stars.
   *
   * \param[in] star_count_ Number of Telegram Stars that were paid.
   * \param[in] transaction_id_ Unique identifier of the transaction that can be used to dispute it.
   */
  paymentReceiptTypeStars(int53 star_count_, string const &transaction_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 294913868;

  static object_ptr<PaymentReceiptType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains the result of a payment request.
 */
class paymentResult final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the payment request was successful; otherwise, the verification_url will be non-empty.
  bool success_;
  static jfieldID success_fieldID;
  /// URL for additional payment credentials verification.
  string verification_url_;
  static jfieldID verification_url_fieldID;

  /**
   * Contains the result of a payment request.
   */
  paymentResult();

  /**
   * Contains the result of a payment request.
   *
   * \param[in] success_ True, if the payment request was successful; otherwise, the verification_url will be non-empty.
   * \param[in] verification_url_ URL for additional payment credentials verification.
   */
  paymentResult(bool success_, string const &verification_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -804263843;

  static object_ptr<paymentResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class date;

/**
 * Contains the user's personal details.
 */
class personalDetails final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// First name of the user written in English; 1-255 characters.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// Middle name of the user written in English; 0-255 characters.
  string middle_name_;
  static jfieldID middle_name_fieldID;
  /// Last name of the user written in English; 1-255 characters.
  string last_name_;
  static jfieldID last_name_fieldID;
  /// Native first name of the user; 1-255 characters.
  string native_first_name_;
  static jfieldID native_first_name_fieldID;
  /// Native middle name of the user; 0-255 characters.
  string native_middle_name_;
  static jfieldID native_middle_name_fieldID;
  /// Native last name of the user; 1-255 characters.
  string native_last_name_;
  static jfieldID native_last_name_fieldID;
  /// Birthdate of the user.
  object_ptr<date> birthdate_;
  static jfieldID birthdate_fieldID;
  /// Gender of the user, &quot;male&quot; or &quot;female&quot;.
  string gender_;
  static jfieldID gender_fieldID;
  /// A two-letter ISO 3166-1 alpha-2 country code of the user's country.
  string country_code_;
  static jfieldID country_code_fieldID;
  /// A two-letter ISO 3166-1 alpha-2 country code of the user's residence country.
  string residence_country_code_;
  static jfieldID residence_country_code_fieldID;

  /**
   * Contains the user's personal details.
   */
  personalDetails();

  /**
   * Contains the user's personal details.
   *
   * \param[in] first_name_ First name of the user written in English; 1-255 characters.
   * \param[in] middle_name_ Middle name of the user written in English; 0-255 characters.
   * \param[in] last_name_ Last name of the user written in English; 1-255 characters.
   * \param[in] native_first_name_ Native first name of the user; 1-255 characters.
   * \param[in] native_middle_name_ Native middle name of the user; 0-255 characters.
   * \param[in] native_last_name_ Native last name of the user; 1-255 characters.
   * \param[in] birthdate_ Birthdate of the user.
   * \param[in] gender_ Gender of the user, &quot;male&quot; or &quot;female&quot;.
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code of the user's country.
   * \param[in] residence_country_code_ A two-letter ISO 3166-1 alpha-2 country code of the user's residence country.
   */
  personalDetails(string const &first_name_, string const &middle_name_, string const &last_name_, string const &native_first_name_, string const &native_middle_name_, string const &native_last_name_, object_ptr<date> &&birthdate_, string const &gender_, string const &country_code_, string const &residence_country_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1061656137;

  static object_ptr<personalDetails> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class datedFile;

/**
 * A personal document, containing some information about a user.
 */
class personalDocument final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of files containing the pages of the document.
  array<object_ptr<datedFile>> files_;
  static jfieldID files_fieldID;
  /// List of files containing a certified English translation of the document.
  array<object_ptr<datedFile>> translation_;
  static jfieldID translation_fieldID;

  /**
   * A personal document, containing some information about a user.
   */
  personalDocument();

  /**
   * A personal document, containing some information about a user.
   *
   * \param[in] files_ List of files containing the pages of the document.
   * \param[in] translation_ List of files containing a certified English translation of the document.
   */
  personalDocument(array<object_ptr<datedFile>> &&files_, array<object_ptr<datedFile>> &&translation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1011634661;

  static object_ptr<personalDocument> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class FirebaseAuthenticationSettings;

/**
 * Contains settings for the authentication of the user's phone number.
 */
class phoneNumberAuthenticationSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true if the authentication code may be sent via a flash call to the specified phone number.
  bool allow_flash_call_;
  static jfieldID allow_flash_call_fieldID;
  /// Pass true if the authentication code may be sent via a missed call to the specified phone number.
  bool allow_missed_call_;
  static jfieldID allow_missed_call_fieldID;
  /// Pass true if the authenticated phone number is used on the current device.
  bool is_current_phone_number_;
  static jfieldID is_current_phone_number_fieldID;
  /// Pass true if there is a SIM card in the current device, but it is not possible to check whether phone number matches.
  bool has_unknown_phone_number_;
  static jfieldID has_unknown_phone_number_fieldID;
  /// For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services &gt;= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details.
  bool allow_sms_retriever_api_;
  static jfieldID allow_sms_retriever_api_fieldID;
  /// For official Android and iOS applications only; pass null otherwise. Settings for Firebase Authentication.
  object_ptr<FirebaseAuthenticationSettings> firebase_authentication_settings_;
  static jfieldID firebase_authentication_settings_fieldID;
  /// List of up to 20 authentication tokens, recently received in updateOption(&quot;authentication_token&quot;) in previously logged out sessions; for setAuthenticationPhoneNumber only.
  array<string> authentication_tokens_;
  static jfieldID authentication_tokens_fieldID;

  /**
   * Contains settings for the authentication of the user's phone number.
   */
  phoneNumberAuthenticationSettings();

  /**
   * Contains settings for the authentication of the user's phone number.
   *
   * \param[in] allow_flash_call_ Pass true if the authentication code may be sent via a flash call to the specified phone number.
   * \param[in] allow_missed_call_ Pass true if the authentication code may be sent via a missed call to the specified phone number.
   * \param[in] is_current_phone_number_ Pass true if the authenticated phone number is used on the current device.
   * \param[in] has_unknown_phone_number_ Pass true if there is a SIM card in the current device, but it is not possible to check whether phone number matches.
   * \param[in] allow_sms_retriever_api_ For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services &gt;= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details.
   * \param[in] firebase_authentication_settings_ For official Android and iOS applications only; pass null otherwise. Settings for Firebase Authentication.
   * \param[in] authentication_tokens_ List of up to 20 authentication tokens, recently received in updateOption(&quot;authentication_token&quot;) in previously logged out sessions; for setAuthenticationPhoneNumber only.
   */
  phoneNumberAuthenticationSettings(bool allow_flash_call_, bool allow_missed_call_, bool is_current_phone_number_, bool has_unknown_phone_number_, bool allow_sms_retriever_api_, object_ptr<FirebaseAuthenticationSettings> &&firebase_authentication_settings_, array<string> &&authentication_tokens_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1881885547;

  static object_ptr<phoneNumberAuthenticationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of the request for which a code is sent to a phone number.
 */
class PhoneNumberCodeType: public Object {
 public:
  static jclass Class;

  static object_ptr<PhoneNumberCodeType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Checks ownership of a new phone number to change the user's authentication phone number; for official Android and iOS applications only.
 */
class phoneNumberCodeTypeChange final : public PhoneNumberCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Checks ownership of a new phone number to change the user's authentication phone number; for official Android and iOS applications only.
   */
  phoneNumberCodeTypeChange();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 87144986;

  static object_ptr<PhoneNumberCodeType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Verifies ownership of a phone number to be added to the user's Telegram Passport.
 */
class phoneNumberCodeTypeVerify final : public PhoneNumberCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Verifies ownership of a phone number to be added to the user's Telegram Passport.
   */
  phoneNumberCodeTypeVerify();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1029402661;

  static object_ptr<PhoneNumberCodeType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Confirms ownership of a phone number to prevent account deletion while handling links of the type internalLinkTypePhoneNumberConfirmation.
 */
class phoneNumberCodeTypeConfirmOwnership final : public PhoneNumberCodeType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hash value from the link.
  string hash_;
  static jfieldID hash_fieldID;

  /**
   * Confirms ownership of a phone number to prevent account deletion while handling links of the type internalLinkTypePhoneNumberConfirmation.
   */
  phoneNumberCodeTypeConfirmOwnership();

  /**
   * Confirms ownership of a phone number to prevent account deletion while handling links of the type internalLinkTypePhoneNumberConfirmation.
   *
   * \param[in] hash_ Hash value from the link.
   */
  explicit phoneNumberCodeTypeConfirmOwnership(string const &hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -485404696;

  static object_ptr<PhoneNumberCodeType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class countryInfo;

/**
 * Contains information about a phone number.
 */
class phoneNumberInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the country to which the phone number belongs; may be null.
  object_ptr<countryInfo> country_;
  static jfieldID country_fieldID;
  /// The part of the phone number denoting country calling code or its part.
  string country_calling_code_;
  static jfieldID country_calling_code_fieldID;
  /// The phone number without country calling code formatted accordingly to local rules. Expected digits are returned as '-', but even more digits might be entered by the user.
  string formatted_phone_number_;
  static jfieldID formatted_phone_number_fieldID;
  /// True, if the phone number was bought at https://fragment.com and isn't tied to a SIM card. Information about the phone number can be received using getCollectibleItemInfo.
  bool is_anonymous_;
  static jfieldID is_anonymous_fieldID;

  /**
   * Contains information about a phone number.
   */
  phoneNumberInfo();

  /**
   * Contains information about a phone number.
   *
   * \param[in] country_ Information about the country to which the phone number belongs; may be null.
   * \param[in] country_calling_code_ The part of the phone number denoting country calling code or its part.
   * \param[in] formatted_phone_number_ The phone number without country calling code formatted accordingly to local rules. Expected digits are returned as '-', but even more digits might be entered by the user.
   * \param[in] is_anonymous_ True, if the phone number was bought at https://fragment.com and isn't tied to a SIM card. Information about the phone number can be received using getCollectibleItemInfo.
   */
  phoneNumberInfo(object_ptr<countryInfo> &&country_, string const &country_calling_code_, string const &formatted_phone_number_, bool is_anonymous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -758933343;

  static object_ptr<phoneNumberInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class minithumbnail;

class photoSize;

/**
 * Describes a photo.
 */
class photo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets.
  bool has_stickers_;
  static jfieldID has_stickers_fieldID;
  /// Photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Available variants of the photo, in different sizes.
  array<object_ptr<photoSize>> sizes_;
  static jfieldID sizes_fieldID;

  /**
   * Describes a photo.
   */
  photo();

  /**
   * Describes a photo.
   *
   * \param[in] has_stickers_ True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets.
   * \param[in] minithumbnail_ Photo minithumbnail; may be null.
   * \param[in] sizes_ Available variants of the photo, in different sizes.
   */
  photo(bool has_stickers_, object_ptr<minithumbnail> &&minithumbnail_, array<object_ptr<photoSize>> &&sizes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2022871583;

  static object_ptr<photo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Describes an image in JPEG format.
 */
class photoSize final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Image type (see https://core.telegram.org/constructor/photoSize).
  string type_;
  static jfieldID type_fieldID;
  /// Information about the image file.
  object_ptr<file> photo_;
  static jfieldID photo_fieldID;
  /// Image width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Image height.
  int32 height_;
  static jfieldID height_fieldID;
  /// Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes.
  array<int32> progressive_sizes_;
  static jfieldID progressive_sizes_fieldID;

  /**
   * Describes an image in JPEG format.
   */
  photoSize();

  /**
   * Describes an image in JPEG format.
   *
   * \param[in] type_ Image type (see https://core.telegram.org/constructor/photoSize).
   * \param[in] photo_ Information about the image file.
   * \param[in] width_ Image width.
   * \param[in] height_ Image height.
   * \param[in] progressive_sizes_ Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes.
   */
  photoSize(string const &type_, object_ptr<file> &&photo_, int32 width_, int32 height_, array<int32> &&progressive_sizes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1609182352;

  static object_ptr<photoSize> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A point on a Cartesian plane.
 */
class point final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The point's first coordinate.
  double x_;
  static jfieldID x_fieldID;
  /// The point's second coordinate.
  double y_;
  static jfieldID y_fieldID;

  /**
   * A point on a Cartesian plane.
   */
  point();

  /**
   * A point on a Cartesian plane.
   *
   * \param[in] x_ The point's first coordinate.
   * \param[in] y_ The point's second coordinate.
   */
  point(double x_, double y_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 437515705;

  static object_ptr<point> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class PollType;

class PollVoteRestrictionReason;

class formattedText;

class pollOption;

/**
 * Describes a poll.
 */
class poll final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique poll identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Poll question; 1-300 characters; may contain only custom emoji entities.
  object_ptr<formattedText> question_;
  static jfieldID question_fieldID;
  /// List of poll answer options.
  array<object_ptr<pollOption>> options_;
  static jfieldID options_fieldID;
  /// Total number of voters, participating in the poll.
  int32 total_voter_count_;
  static jfieldID total_voter_count_fieldID;
  /// Identifiers of recent voters, if the poll is non-anonymous and poll results are available.
  array<object_ptr<MessageSender>> recent_voter_ids_;
  static jfieldID recent_voter_ids_fieldID;
  /// True, if the current user can get voters in the poll using getPollVoters.
  bool can_get_voters_;
  static jfieldID can_get_voters_fieldID;
  /// True, if the poll is anonymous.
  bool is_anonymous_;
  static jfieldID is_anonymous_fieldID;
  /// True, if multiple answer options can be chosen simultaneously.
  bool allows_multiple_answers_;
  static jfieldID allows_multiple_answers_fieldID;
  /// True, if the poll can be answered multiple times.
  bool allows_revoting_;
  static jfieldID allows_revoting_fieldID;
  /// True, if only the users that are members of the chat for more than a day will be able to vote.
  bool members_only_;
  static jfieldID members_only_fieldID;
  /// The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll.
  array<string> country_codes_;
  static jfieldID country_codes_fieldID;
  /// The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.
  array<int32> option_order_;
  static jfieldID option_order_fieldID;
  /// Type of the poll.
  object_ptr<PollType> type_;
  static jfieldID type_fieldID;
  /// Amount of time the poll will be active after creation, in seconds.
  int32 open_period_;
  static jfieldID open_period_fieldID;
  /// Point in time (Unix timestamp) when the poll will automatically be closed.
  int32 close_date_;
  static jfieldID close_date_fieldID;
  /// True, if the poll is closed.
  bool is_closed_;
  static jfieldID is_closed_fieldID;
  /// The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll.
  object_ptr<PollVoteRestrictionReason> vote_restriction_reason_;
  static jfieldID vote_restriction_reason_fieldID;

  /**
   * Describes a poll.
   */
  poll();

  /**
   * Describes a poll.
   *
   * \param[in] id_ Unique poll identifier.
   * \param[in] question_ Poll question; 1-300 characters; may contain only custom emoji entities.
   * \param[in] options_ List of poll answer options.
   * \param[in] total_voter_count_ Total number of voters, participating in the poll.
   * \param[in] recent_voter_ids_ Identifiers of recent voters, if the poll is non-anonymous and poll results are available.
   * \param[in] can_get_voters_ True, if the current user can get voters in the poll using getPollVoters.
   * \param[in] is_anonymous_ True, if the poll is anonymous.
   * \param[in] allows_multiple_answers_ True, if multiple answer options can be chosen simultaneously.
   * \param[in] allows_revoting_ True, if the poll can be answered multiple times.
   * \param[in] members_only_ True, if only the users that are members of the chat for more than a day will be able to vote.
   * \param[in] country_codes_ The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll.
   * \param[in] option_order_ The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.
   * \param[in] type_ Type of the poll.
   * \param[in] open_period_ Amount of time the poll will be active after creation, in seconds.
   * \param[in] close_date_ Point in time (Unix timestamp) when the poll will automatically be closed.
   * \param[in] is_closed_ True, if the poll is closed.
   * \param[in] vote_restriction_reason_ The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll.
   */
  poll(int64 id_, object_ptr<formattedText> &&question_, array<object_ptr<pollOption>> &&options_, int32 total_voter_count_, array<object_ptr<MessageSender>> &&recent_voter_ids_, bool can_get_voters_, bool is_anonymous_, bool allows_multiple_answers_, bool allows_revoting_, bool members_only_, array<string> &&country_codes_, array<int32> &&option_order_, object_ptr<PollType> &&type_, int32 open_period_, int32 close_date_, bool is_closed_, object_ptr<PollVoteRestrictionReason> &&vote_restriction_reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 438560099;

  static object_ptr<poll> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageContent;

class MessageSender;

class formattedText;

/**
 * Describes one answer option of a poll.
 */
class pollOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the option in the poll; may be empty if yet unassigned.
  string id_;
  static jfieldID id_fieldID;
  /// Option text; 1-100 characters; may contain only custom emoji entities.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Option media; may be null if none. If present, currently, can be only of the types messageAnimation, messageLocation, messagePhoto, messageSticker, messageVenue, or messageVideo without caption.
  object_ptr<MessageContent> media_;
  static jfieldID media_fieldID;
  /// Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
  int32 voter_count_;
  static jfieldID voter_count_fieldID;
  /// The percentage of votes for this option; 0-100.
  int32 vote_percentage_;
  static jfieldID vote_percentage_fieldID;
  /// Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
  array<object_ptr<MessageSender>> recent_voter_ids_;
  static jfieldID recent_voter_ids_fieldID;
  /// True, if the option was chosen by the user.
  bool is_chosen_;
  static jfieldID is_chosen_fieldID;
  /// True, if the option is being chosen by a pending setPollAnswer request.
  bool is_being_chosen_;
  static jfieldID is_being_chosen_fieldID;
  /// Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
  object_ptr<MessageSender> author_;
  static jfieldID author_fieldID;
  /// Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
  int32 addition_date_;
  static jfieldID addition_date_fieldID;

  /**
   * Describes one answer option of a poll.
   */
  pollOption();

  /**
   * Describes one answer option of a poll.
   *
   * \param[in] id_ Unique identifier of the option in the poll; may be empty if yet unassigned.
   * \param[in] text_ Option text; 1-100 characters; may contain only custom emoji entities.
   * \param[in] media_ Option media; may be null if none. If present, currently, can be only of the types messageAnimation, messageLocation, messagePhoto, messageSticker, messageVenue, or messageVideo without caption.
   * \param[in] voter_count_ Number of voters for this option, available only for closed or voted polls, or if the current user is the creator of the poll.
   * \param[in] vote_percentage_ The percentage of votes for this option; 0-100.
   * \param[in] recent_voter_ids_ Identifiers of recent voters for the option, if the poll is non-anonymous and poll results are available.
   * \param[in] is_chosen_ True, if the option was chosen by the user.
   * \param[in] is_being_chosen_ True, if the option is being chosen by a pending setPollAnswer request.
   * \param[in] author_ Identifier of the user or chat who added the option; may be null if the option existed from creation of the poll.
   * \param[in] addition_date_ Point in time (Unix timestamp) when the option was added; 0 if the option existed from creation of the poll.
   */
  pollOption(string const &id_, object_ptr<formattedText> &&text_, object_ptr<MessageContent> &&media_, int32 voter_count_, int32 vote_percentage_, array<object_ptr<MessageSender>> &&recent_voter_ids_, bool is_chosen_, bool is_being_chosen_, object_ptr<MessageSender> &&author_, int32 addition_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 94416337;

  static object_ptr<pollOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains properties of a poll option and describes actions that can be done with the option right now.
 */
class pollOptionProperties final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the option can be deleted using deletePollOption.
  bool can_be_deleted_;
  static jfieldID can_be_deleted_fieldID;
  /// True, if the poll option can be replied in the same chat and forum topic using inputMessageReplyToMessage.
  bool can_be_replied_;
  static jfieldID can_be_replied_fieldID;
  /// True, if the poll option can be replied in another chat or forum topic using inputMessageReplyToExternalMessage.
  bool can_be_replied_in_another_chat_;
  static jfieldID can_be_replied_in_another_chat_fieldID;
  /// True, if a link can be generated for the poll option using getMessageLink.
  bool can_get_link_;
  static jfieldID can_get_link_fieldID;

  /**
   * Contains properties of a poll option and describes actions that can be done with the option right now.
   */
  pollOptionProperties();

  /**
   * Contains properties of a poll option and describes actions that can be done with the option right now.
   *
   * \param[in] can_be_deleted_ True, if the option can be deleted using deletePollOption.
   * \param[in] can_be_replied_ True, if the poll option can be replied in the same chat and forum topic using inputMessageReplyToMessage.
   * \param[in] can_be_replied_in_another_chat_ True, if the poll option can be replied in another chat or forum topic using inputMessageReplyToExternalMessage.
   * \param[in] can_get_link_ True, if a link can be generated for the poll option using getMessageLink.
   */
  pollOptionProperties(bool can_be_deleted_, bool can_be_replied_, bool can_be_replied_in_another_chat_, bool can_get_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -269854419;

  static object_ptr<pollOptionProperties> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageContent;

class formattedText;

/**
 * This class is an abstract base class.
 * Describes the type of poll.
 */
class PollType: public Object {
 public:
  static jclass Class;

  static object_ptr<PollType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A regular poll.
 */
class pollTypeRegular final : public PollType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A regular poll.
   */
  pollTypeRegular();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 823249292;

  static object_ptr<PollType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A poll in quiz mode, which has predefined correct answers.
 */
class pollTypeQuiz final : public PollType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Increasing list of 0-based identifiers of the correct answer options; empty for a yet unanswered poll.
  array<int32> correct_option_ids_;
  static jfieldID correct_option_ids_fieldID;
  /// Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; empty for a yet unanswered poll.
  object_ptr<formattedText> explanation_;
  static jfieldID explanation_fieldID;
  /// Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; may be null if none or the poll is unanswered yet. If present, currently, can be only of the types messageAnimation, messageAudio, messageDocument, messageLocation, messagePhoto, messageVenue, or messageVideo without caption.
  object_ptr<MessageContent> explanation_media_;
  static jfieldID explanation_media_fieldID;

  /**
   * A poll in quiz mode, which has predefined correct answers.
   */
  pollTypeQuiz();

  /**
   * A poll in quiz mode, which has predefined correct answers.
   *
   * \param[in] correct_option_ids_ Increasing list of 0-based identifiers of the correct answer options; empty for a yet unanswered poll.
   * \param[in] explanation_ Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; empty for a yet unanswered poll.
   * \param[in] explanation_media_ Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; may be null if none or the poll is unanswered yet. If present, currently, can be only of the types messageAnimation, messageAudio, messageDocument, messageLocation, messagePhoto, messageVenue, or messageVideo without caption.
   */
  pollTypeQuiz(array<int32> &&correct_option_ids_, object_ptr<formattedText> &&explanation_, object_ptr<MessageContent> &&explanation_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1205882530;

  static object_ptr<PollType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Reason of vote restriction in the poll for the current user.
 */
class PollVoteRestrictionReason: public Object {
 public:
  static jclass Class;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The poll is closed.
 */
class pollVoteRestrictionReasonClosed final : public PollVoteRestrictionReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The poll is closed.
   */
  pollVoteRestrictionReasonClosed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 650593758;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The poll isn't sent yet.
 */
class pollVoteRestrictionReasonYetUnsent final : public PollVoteRestrictionReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The poll isn't sent yet.
   */
  pollVoteRestrictionReasonYetUnsent();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1322383969;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The poll is from a scheduled message.
 */
class pollVoteRestrictionReasonScheduled final : public PollVoteRestrictionReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The poll is from a scheduled message.
   */
  pollVoteRestrictionReasonScheduled();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -693222354;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is from a country, users from which aren't allowed to vote.
 */
class pollVoteRestrictionReasonCountryRestricted final : public PollVoteRestrictionReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Two-letter ISO 3166-1 alpha-2 code of the current user's country.
  string country_code_;
  static jfieldID country_code_fieldID;

  /**
   * The user is from a country, users from which aren't allowed to vote.
   */
  pollVoteRestrictionReasonCountryRestricted();

  /**
   * The user is from a country, users from which aren't allowed to vote.
   *
   * \param[in] country_code_ Two-letter ISO 3166-1 alpha-2 code of the current user's country.
   */
  explicit pollVoteRestrictionReasonCountryRestricted(string const &country_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1009950456;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must be a member of the chat for at least a day to vote.
 */
class pollVoteRestrictionReasonMembershipRequired final : public PollVoteRestrictionReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat which must be joined for at least a day before the user can vote.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The user must be a member of the chat for at least a day to vote.
   */
  pollVoteRestrictionReasonMembershipRequired();

  /**
   * The user must be a member of the chat for at least a day to vote.
   *
   * \param[in] chat_id_ Identifier of the chat which must be joined for at least a day before the user can vote.
   */
  explicit pollVoteRestrictionReasonMembershipRequired(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1231796287;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The poll can't be voted by the user due to some other reason.
 */
class pollVoteRestrictionReasonOther final : public PollVoteRestrictionReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The poll can't be voted by the user due to some other reason.
   */
  pollVoteRestrictionReasonOther();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1479377401;

  static object_ptr<PollVoteRestrictionReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

/**
 * A detailed statistics about poll votes.
 */
class pollVoteStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A graph containing distribution of votes in the poll.
  object_ptr<StatisticalGraph> vote_graph_;
  static jfieldID vote_graph_fieldID;

  /**
   * A detailed statistics about poll votes.
   */
  pollVoteStatistics();

  /**
   * A detailed statistics about poll votes.
   *
   * \param[in] vote_graph_ A graph containing distribution of votes in the poll.
   */
  explicit pollVoteStatistics(object_ptr<StatisticalGraph> &&vote_graph_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 323339087;

  static object_ptr<pollVoteStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Represents a poll voter.
 */
class pollVoter final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The voter identifier.
  object_ptr<MessageSender> voter_id_;
  static jfieldID voter_id_fieldID;
  /// Point in time (Unix timestamp) when the vote was added.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Represents a poll voter.
   */
  pollVoter();

  /**
   * Represents a poll voter.
   *
   * \param[in] voter_id_ The voter identifier.
   * \param[in] date_ Point in time (Unix timestamp) when the vote was added.
   */
  pollVoter(object_ptr<MessageSender> &&voter_id_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1354417305;

  static object_ptr<pollVoter> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class pollVoter;

/**
 * Represents a list of poll voters.
 */
class pollVoters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of poll voters found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of poll voters.
  array<object_ptr<pollVoter>> voters_;
  static jfieldID voters_fieldID;

  /**
   * Represents a list of poll voters.
   */
  pollVoters();

  /**
   * Represents a list of poll voters.
   *
   * \param[in] total_count_ Approximate total number of poll voters found.
   * \param[in] voters_ List of poll voters.
   */
  pollVoters(int32 total_count_, array<object_ptr<pollVoter>> &&voters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1255612789;

  static object_ptr<pollVoters> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a feature available to Premium users.
 */
class PremiumFeature: public Object {
 public:
  static jclass Class;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Increased limits.
 */
class premiumFeatureIncreasedLimits final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Increased limits.
   */
  premiumFeatureIncreasedLimits();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1785455031;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Increased maximum upload file size.
 */
class premiumFeatureIncreasedUploadFileSize final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Increased maximum upload file size.
   */
  premiumFeatureIncreasedUploadFileSize();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1825367155;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Improved download speed.
 */
class premiumFeatureImprovedDownloadSpeed final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Improved download speed.
   */
  premiumFeatureImprovedDownloadSpeed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -267695554;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to convert voice notes to text.
 */
class premiumFeatureVoiceRecognition final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to convert voice notes to text.
   */
  premiumFeatureVoiceRecognition();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1288216542;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Disabled ads.
 */
class premiumFeatureDisabledAds final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Disabled ads.
   */
  premiumFeatureDisabledAds();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2008587702;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to use more reactions.
 */
class premiumFeatureUniqueReactions final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to use more reactions.
   */
  premiumFeatureUniqueReactions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 766750743;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to use premium stickers with unique effects.
 */
class premiumFeatureUniqueStickers final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to use premium stickers with unique effects.
   */
  premiumFeatureUniqueStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2101773312;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to use custom emoji stickers in message texts and captions.
 */
class premiumFeatureCustomEmoji final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to use custom emoji stickers in message texts and captions.
   */
  premiumFeatureCustomEmoji();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1332599628;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Ability to change position of the main chat list, archive and mute all new chats from non-contacts, and completely disable notifications about the user's contacts joined Telegram.
 */
class premiumFeatureAdvancedChatManagement final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Ability to change position of the main chat list, archive and mute all new chats from non-contacts, and completely disable notifications about the user's contacts joined Telegram.
   */
  premiumFeatureAdvancedChatManagement();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 796347674;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A badge in the user's profile.
 */
class premiumFeatureProfileBadge final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A badge in the user's profile.
   */
  premiumFeatureProfileBadge();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 233648322;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to show an emoji status along with the user's name.
 */
class premiumFeatureEmojiStatus final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to show an emoji status along with the user's name.
   */
  premiumFeatureEmojiStatus();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -36516639;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Profile photo animation on message and chat screens.
 */
class premiumFeatureAnimatedProfilePhoto final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Profile photo animation on message and chat screens.
   */
  premiumFeatureAnimatedProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -100741914;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set a custom emoji as a forum topic icon.
 */
class premiumFeatureForumTopicIcon final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set a custom emoji as a forum topic icon.
   */
  premiumFeatureForumTopicIcon();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -823172286;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to set a premium application icons.
 */
class premiumFeatureAppIcons final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to set a premium application icons.
   */
  premiumFeatureAppIcons();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1585050761;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to translate chat messages real-time.
 */
class premiumFeatureRealTimeChatTranslation final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to translate chat messages real-time.
   */
  premiumFeatureRealTimeChatTranslation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1143471488;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Allowed to use many additional features for stories.
 */
class premiumFeatureUpgradedStories final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Allowed to use many additional features for stories.
   */
  premiumFeatureUpgradedStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1878522597;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to boost chats.
 */
class premiumFeatureChatBoost final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to boost chats.
   */
  premiumFeatureChatBoost();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1576574747;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to choose accent color for replies and user profile.
 */
class premiumFeatureAccentColor final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to choose accent color for replies and user profile.
   */
  premiumFeatureAccentColor();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 907724190;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set private chat background for both users.
 */
class premiumFeatureBackgroundForBoth final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set private chat background for both users.
   */
  premiumFeatureBackgroundForBoth();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 575074042;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to use tags in Saved Messages.
 */
class premiumFeatureSavedMessagesTags final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to use tags in Saved Messages.
   */
  premiumFeatureSavedMessagesTags();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1003219334;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to disallow incoming voice and video note messages in private chats using setUserPrivacySettingRules with userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages and to restrict incoming messages from non-contacts using setNewChatPrivacySettings.
 */
class premiumFeatureMessagePrivacy final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to disallow incoming voice and video note messages in private chats using setUserPrivacySettingRules with userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages and to restrict incoming messages from non-contacts using setNewChatPrivacySettings.
   */
  premiumFeatureMessagePrivacy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 802322678;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to view last seen and read times of other users even if they can't view last seen or read time for the current user.
 */
class premiumFeatureLastSeenTimes final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to view last seen and read times of other users even if they can't view last seen or read time for the current user.
   */
  premiumFeatureLastSeenTimes();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -762230129;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to use Business features.
 */
class premiumFeatureBusiness final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to use Business features.
   */
  premiumFeatureBusiness();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1503619324;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to use all available message effects.
 */
class premiumFeatureMessageEffects final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to use all available message effects.
   */
  premiumFeatureMessageEffects();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -723300255;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to create and use checklist messages.
 */
class premiumFeatureChecklists final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to create and use checklist messages.
   */
  premiumFeatureChecklists();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1128709251;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to require a payment for incoming messages in new chats.
 */
class premiumFeaturePaidMessages final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to require a payment for incoming messages in new chats.
   */
  premiumFeaturePaidMessages();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2063708431;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to enable content protection in private chats.
 */
class premiumFeatureProtectPrivateChatContent final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to enable content protection in private chats.
   */
  premiumFeatureProtectPrivateChatContent();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -565938675;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to compose text with AI.
 */
class premiumFeatureTextComposition final : public PremiumFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to compose text with AI.
   */
  premiumFeatureTextComposition();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 210899877;

  static object_ptr<PremiumFeature> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PremiumFeature;

class animation;

/**
 * Describes a promotion animation for a Premium feature.
 */
class premiumFeaturePromotionAnimation final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Premium feature.
  object_ptr<PremiumFeature> feature_;
  static jfieldID feature_fieldID;
  /// Promotion animation for the feature.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;

  /**
   * Describes a promotion animation for a Premium feature.
   */
  premiumFeaturePromotionAnimation();

  /**
   * Describes a promotion animation for a Premium feature.
   *
   * \param[in] feature_ Premium feature.
   * \param[in] animation_ Promotion animation for the feature.
   */
  premiumFeaturePromotionAnimation(object_ptr<PremiumFeature> &&feature_, object_ptr<animation> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1986155748;

  static object_ptr<premiumFeaturePromotionAnimation> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

class PremiumFeature;

class premiumLimit;

/**
 * Contains information about features, available to Premium users.
 */
class premiumFeatures final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of available features.
  array<object_ptr<PremiumFeature>> features_;
  static jfieldID features_fieldID;
  /// The list of limits, increased for Premium users.
  array<object_ptr<premiumLimit>> limits_;
  static jfieldID limits_fieldID;
  /// An internal link to be opened to pay for Telegram Premium if store payment isn't possible; may be null if direct payment isn't available.
  object_ptr<InternalLinkType> payment_link_;
  static jfieldID payment_link_fieldID;

  /**
   * Contains information about features, available to Premium users.
   */
  premiumFeatures();

  /**
   * Contains information about features, available to Premium users.
   *
   * \param[in] features_ The list of available features.
   * \param[in] limits_ The list of limits, increased for Premium users.
   * \param[in] payment_link_ An internal link to be opened to pay for Telegram Premium if store payment isn't possible; may be null if direct payment isn't available.
   */
  premiumFeatures(array<object_ptr<PremiumFeature>> &&features_, array<object_ptr<premiumLimit>> &&limits_, object_ptr<InternalLinkType> &&payment_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1875162172;

  static object_ptr<premiumFeatures> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Contains information about a Telegram Premium gift code.
 */
class premiumGiftCodeInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a chat or a user who created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used.
  object_ptr<MessageSender> creator_id_;
  static jfieldID creator_id_fieldID;
  /// Point in time (Unix timestamp) when the code was created.
  int32 creation_date_;
  static jfieldID creation_date_fieldID;
  /// True, if the gift code was created for a giveaway.
  bool is_from_giveaway_;
  static jfieldID is_from_giveaway_fieldID;
  /// Identifier of the corresponding giveaway message in the creator_id chat; may be 0 or an identifier of a deleted message.
  int53 giveaway_message_id_;
  static jfieldID giveaway_message_id_fieldID;
  /// Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Number of days the Telegram Premium subscription will be active after code activation.
  int32 day_count_;
  static jfieldID day_count_fieldID;
  /// Identifier of a user for which the code was created; 0 if none.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Point in time (Unix timestamp) when the code was activated; 0 if none.
  int32 use_date_;
  static jfieldID use_date_fieldID;

  /**
   * Contains information about a Telegram Premium gift code.
   */
  premiumGiftCodeInfo();

  /**
   * Contains information about a Telegram Premium gift code.
   *
   * \param[in] creator_id_ Identifier of a chat or a user who created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used.
   * \param[in] creation_date_ Point in time (Unix timestamp) when the code was created.
   * \param[in] is_from_giveaway_ True, if the gift code was created for a giveaway.
   * \param[in] giveaway_message_id_ Identifier of the corresponding giveaway message in the creator_id chat; may be 0 or an identifier of a deleted message.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
   * \param[in] day_count_ Number of days the Telegram Premium subscription will be active after code activation.
   * \param[in] user_id_ Identifier of a user for which the code was created; 0 if none.
   * \param[in] use_date_ Point in time (Unix timestamp) when the code was activated; 0 if none.
   */
  premiumGiftCodeInfo(object_ptr<MessageSender> &&creator_id_, int32 creation_date_, bool is_from_giveaway_, int53 giveaway_message_id_, int32 month_count_, int32 day_count_, int53 user_id_, int32 use_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -262674203;

  static object_ptr<premiumGiftCodeInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars.
 */
class premiumGiftPaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code for the payment.
  string currency_;
  static jfieldID currency_fieldID;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// The discount associated with this option, as a percentage.
  int32 discount_percentage_;
  static jfieldID discount_percentage_fieldID;
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Identifier of the store product associated with the option.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// A sticker to be shown along with the option; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars.
   */
  premiumGiftPaymentOption();

  /**
   * Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars.
   *
   * \param[in] currency_ ISO 4217 currency code for the payment.
   * \param[in] amount_ The amount to pay, in the smallest units of the currency.
   * \param[in] star_count_ The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible.
   * \param[in] discount_percentage_ The discount associated with this option, as a percentage.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active.
   * \param[in] store_product_id_ Identifier of the store product associated with the option.
   * \param[in] sticker_ A sticker to be shown along with the option; may be null if unknown.
   */
  premiumGiftPaymentOption(string const &currency_, int53 amount_, int53 star_count_, int32 discount_percentage_, int32 month_count_, string const &store_product_id_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -338085027;

  static object_ptr<premiumGiftPaymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class premiumGiftPaymentOption;

/**
 * Contains a list of options for gifting Telegram Premium to a user.
 */
class premiumGiftPaymentOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of options sorted by Telegram Premium subscription duration.
  array<object_ptr<premiumGiftPaymentOption>> options_;
  static jfieldID options_fieldID;

  /**
   * Contains a list of options for gifting Telegram Premium to a user.
   */
  premiumGiftPaymentOptions();

  /**
   * Contains a list of options for gifting Telegram Premium to a user.
   *
   * \param[in] options_ The list of options sorted by Telegram Premium subscription duration.
   */
  explicit premiumGiftPaymentOptions(array<object_ptr<premiumGiftPaymentOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1347543032;

  static object_ptr<premiumGiftPaymentOptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an option for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments.
 */
class premiumGiveawayPaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code for Telegram Premium gift code payment.
  string currency_;
  static jfieldID currency_fieldID;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of users which will be able to activate the gift codes.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Identifier of the store product associated with the option; may be empty if none.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// Number of times the store product must be paid.
  int32 store_product_quantity_;
  static jfieldID store_product_quantity_fieldID;

  /**
   * Describes an option for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments.
   */
  premiumGiveawayPaymentOption();

  /**
   * Describes an option for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments.
   *
   * \param[in] currency_ ISO 4217 currency code for Telegram Premium gift code payment.
   * \param[in] amount_ The amount to pay, in the smallest units of the currency.
   * \param[in] winner_count_ Number of users which will be able to activate the gift codes.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active.
   * \param[in] store_product_id_ Identifier of the store product associated with the option; may be empty if none.
   * \param[in] store_product_quantity_ Number of times the store product must be paid.
   */
  premiumGiveawayPaymentOption(string const &currency_, int53 amount_, int32 winner_count_, int32 month_count_, string const &store_product_id_, int32 store_product_quantity_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1099221896;

  static object_ptr<premiumGiveawayPaymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class premiumGiveawayPaymentOption;

/**
 * Contains a list of options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members.
 */
class premiumGiveawayPaymentOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of options.
  array<object_ptr<premiumGiveawayPaymentOption>> options_;
  static jfieldID options_fieldID;

  /**
   * Contains a list of options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members.
   */
  premiumGiveawayPaymentOptions();

  /**
   * Contains a list of options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members.
   *
   * \param[in] options_ The list of options.
   */
  explicit premiumGiveawayPaymentOptions(array<object_ptr<premiumGiveawayPaymentOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1587397823;

  static object_ptr<premiumGiveawayPaymentOptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PremiumLimitType;

/**
 * Contains information about a limit, increased for Premium users.
 */
class premiumLimit final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The type of the limit.
  object_ptr<PremiumLimitType> type_;
  static jfieldID type_fieldID;
  /// Default value of the limit.
  int32 default_value_;
  static jfieldID default_value_fieldID;
  /// Value of the limit for Premium users.
  int32 premium_value_;
  static jfieldID premium_value_fieldID;

  /**
   * Contains information about a limit, increased for Premium users.
   */
  premiumLimit();

  /**
   * Contains information about a limit, increased for Premium users.
   *
   * \param[in] type_ The type of the limit.
   * \param[in] default_value_ Default value of the limit.
   * \param[in] premium_value_ Value of the limit for Premium users.
   */
  premiumLimit(object_ptr<PremiumLimitType> &&type_, int32 default_value_, int32 premium_value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2127786726;

  static object_ptr<premiumLimit> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of limit, increased for Premium users.
 */
class PremiumLimitType: public Object {
 public:
  static jclass Class;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of joined supergroups and channels.
 */
class premiumLimitTypeSupergroupCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of joined supergroups and channels.
   */
  premiumLimitTypeSupergroupCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -247467131;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of pinned chats in the main chat list.
 */
class premiumLimitTypePinnedChatCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of pinned chats in the main chat list.
   */
  premiumLimitTypePinnedChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -998947871;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of created public chats.
 */
class premiumLimitTypeCreatedPublicChatCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of created public chats.
   */
  premiumLimitTypeCreatedPublicChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 446086841;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of saved animations.
 */
class premiumLimitTypeSavedAnimationCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of saved animations.
   */
  premiumLimitTypeSavedAnimationCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -19759735;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of favorite stickers.
 */
class premiumLimitTypeFavoriteStickerCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of favorite stickers.
   */
  premiumLimitTypeFavoriteStickerCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 639754787;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of chat folders.
 */
class premiumLimitTypeChatFolderCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of chat folders.
   */
  premiumLimitTypeChatFolderCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 377489774;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of pinned and always included, or always excluded chats in a chat folder.
 */
class premiumLimitTypeChatFolderChosenChatCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of pinned and always included, or always excluded chats in a chat folder.
   */
  premiumLimitTypeChatFolderChosenChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1691435861;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of pinned chats in the archive chat list.
 */
class premiumLimitTypePinnedArchivedChatCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of pinned chats in the archive chat list.
   */
  premiumLimitTypePinnedArchivedChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1485515276;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of pinned Saved Messages topics.
 */
class premiumLimitTypePinnedSavedMessagesTopicCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of pinned Saved Messages topics.
   */
  premiumLimitTypePinnedSavedMessagesTopicCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1544854305;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum length of sent media caption.
 */
class premiumLimitTypeCaptionLength final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum length of sent media caption.
   */
  premiumLimitTypeCaptionLength();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 293984314;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum length of the user's bio.
 */
class premiumLimitTypeBioLength final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum length of the user's bio.
   */
  premiumLimitTypeBioLength();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1146976765;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of invite links for a chat folder.
 */
class premiumLimitTypeChatFolderInviteLinkCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of invite links for a chat folder.
   */
  premiumLimitTypeChatFolderInviteLinkCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -128702950;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of added shareable chat folders.
 */
class premiumLimitTypeShareableChatFolderCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of added shareable chat folders.
   */
  premiumLimitTypeShareableChatFolderCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1612625095;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of active stories.
 */
class premiumLimitTypeActiveStoryCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of active stories.
   */
  premiumLimitTypeActiveStoryCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1926486372;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of stories posted per week.
 */
class premiumLimitTypeWeeklyPostedStoryCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of stories posted per week.
   */
  premiumLimitTypeWeeklyPostedStoryCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -506354313;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of stories posted per month.
 */
class premiumLimitTypeMonthlyPostedStoryCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of stories posted per month.
   */
  premiumLimitTypeMonthlyPostedStoryCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 26329490;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum length of captions of posted stories.
 */
class premiumLimitTypeStoryCaptionLength final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum length of captions of posted stories.
   */
  premiumLimitTypeStoryCaptionLength();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1093324030;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of suggested reaction areas on a story.
 */
class premiumLimitTypeStorySuggestedReactionAreaCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of suggested reaction areas on a story.
   */
  premiumLimitTypeStorySuggestedReactionAreaCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1170032633;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of received similar chats.
 */
class premiumLimitTypeSimilarChatCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of received similar chats.
   */
  premiumLimitTypeSimilarChatCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1563549935;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of owned bots.
 */
class premiumLimitTypeOwnedBotCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of owned bots.
   */
  premiumLimitTypeOwnedBotCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -595906175;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The maximum number of added text composition styles.
 */
class premiumLimitTypeCustomTextCompositionStyleCount final : public PremiumLimitType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The maximum number of added text composition styles.
   */
  premiumLimitTypeCustomTextCompositionStyleCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -652894162;

  static object_ptr<PremiumLimitType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

/**
 * Describes an option for buying Telegram Premium to a user.
 */
class premiumPaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code for Telegram Premium subscription payment.
  string currency_;
  static jfieldID currency_fieldID;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// The discount associated with this option, as a percentage.
  int32 discount_percentage_;
  static jfieldID discount_percentage_fieldID;
  /// Number of months the Telegram Premium subscription will be active. Use getPremiumInfoSticker to get the sticker to be used as representation of the Telegram Premium subscription.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Identifier of the store product associated with the option.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available.
  object_ptr<InternalLinkType> payment_link_;
  static jfieldID payment_link_fieldID;

  /**
   * Describes an option for buying Telegram Premium to a user.
   */
  premiumPaymentOption();

  /**
   * Describes an option for buying Telegram Premium to a user.
   *
   * \param[in] currency_ ISO 4217 currency code for Telegram Premium subscription payment.
   * \param[in] amount_ The amount to pay, in the smallest units of the currency.
   * \param[in] discount_percentage_ The discount associated with this option, as a percentage.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active. Use getPremiumInfoSticker to get the sticker to be used as representation of the Telegram Premium subscription.
   * \param[in] store_product_id_ Identifier of the store product associated with the option.
   * \param[in] payment_link_ An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available.
   */
  premiumPaymentOption(string const &currency_, int53 amount_, int32 discount_percentage_, int32 month_count_, string const &store_product_id_, object_ptr<InternalLinkType> &&payment_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1945346126;

  static object_ptr<premiumPaymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BusinessFeature;

class PremiumFeature;

class PremiumLimitType;

class PremiumStoryFeature;

/**
 * This class is an abstract base class.
 * Describes a source from which the Premium features screen is opened.
 */
class PremiumSource: public Object {
 public:
  static jclass Class;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A limit was exceeded.
 */
class premiumSourceLimitExceeded final : public PremiumSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the exceeded limit.
  object_ptr<PremiumLimitType> limit_type_;
  static jfieldID limit_type_fieldID;

  /**
   * A limit was exceeded.
   */
  premiumSourceLimitExceeded();

  /**
   * A limit was exceeded.
   *
   * \param[in] limit_type_ Type of the exceeded limit.
   */
  explicit premiumSourceLimitExceeded(object_ptr<PremiumLimitType> &&limit_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2052159742;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user tried to use a Premium feature.
 */
class premiumSourceFeature final : public PremiumSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The used feature.
  object_ptr<PremiumFeature> feature_;
  static jfieldID feature_fieldID;

  /**
   * A user tried to use a Premium feature.
   */
  premiumSourceFeature();

  /**
   * A user tried to use a Premium feature.
   *
   * \param[in] feature_ The used feature.
   */
  explicit premiumSourceFeature(object_ptr<PremiumFeature> &&feature_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 445813541;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user tried to use a Business feature.
 */
class premiumSourceBusinessFeature final : public PremiumSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The used feature; pass null if none specific feature was used.
  object_ptr<BusinessFeature> feature_;
  static jfieldID feature_fieldID;

  /**
   * A user tried to use a Business feature.
   */
  premiumSourceBusinessFeature();

  /**
   * A user tried to use a Business feature.
   *
   * \param[in] feature_ The used feature; pass null if none specific feature was used.
   */
  explicit premiumSourceBusinessFeature(object_ptr<BusinessFeature> &&feature_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1492946340;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user tried to use a Premium story feature.
 */
class premiumSourceStoryFeature final : public PremiumSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The used feature.
  object_ptr<PremiumStoryFeature> feature_;
  static jfieldID feature_fieldID;

  /**
   * A user tried to use a Premium story feature.
   */
  premiumSourceStoryFeature();

  /**
   * A user tried to use a Premium story feature.
   *
   * \param[in] feature_ The used feature.
   */
  explicit premiumSourceStoryFeature(object_ptr<PremiumStoryFeature> &&feature_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1030737556;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user opened an internal link of the type internalLinkTypePremiumFeaturesPage.
 */
class premiumSourceLink final : public PremiumSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The referrer from the link.
  string referrer_;
  static jfieldID referrer_fieldID;

  /**
   * A user opened an internal link of the type internalLinkTypePremiumFeaturesPage.
   */
  premiumSourceLink();

  /**
   * A user opened an internal link of the type internalLinkTypePremiumFeaturesPage.
   *
   * \param[in] referrer_ The referrer from the link.
   */
  explicit premiumSourceLink(string const &referrer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2135071132;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user opened the Premium features screen from settings.
 */
class premiumSourceSettings final : public PremiumSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A user opened the Premium features screen from settings.
   */
  premiumSourceSettings();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -285702859;

  static object_ptr<PremiumSource> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class businessFeaturePromotionAnimation;

class formattedText;

class premiumFeaturePromotionAnimation;

class premiumStatePaymentOption;

/**
 * Contains state of Telegram Premium subscription and promotion videos for Premium features.
 */
class premiumState final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription.
  object_ptr<formattedText> state_;
  static jfieldID state_fieldID;
  /// The list of available options for buying Telegram Premium.
  array<object_ptr<premiumStatePaymentOption>> payment_options_;
  static jfieldID payment_options_fieldID;
  /// The list of available promotion animations for Premium features.
  array<object_ptr<premiumFeaturePromotionAnimation>> animations_;
  static jfieldID animations_fieldID;
  /// The list of available promotion animations for Business features.
  array<object_ptr<businessFeaturePromotionAnimation>> business_animations_;
  static jfieldID business_animations_fieldID;

  /**
   * Contains state of Telegram Premium subscription and promotion videos for Premium features.
   */
  premiumState();

  /**
   * Contains state of Telegram Premium subscription and promotion videos for Premium features.
   *
   * \param[in] state_ Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription.
   * \param[in] payment_options_ The list of available options for buying Telegram Premium.
   * \param[in] animations_ The list of available promotion animations for Premium features.
   * \param[in] business_animations_ The list of available promotion animations for Business features.
   */
  premiumState(object_ptr<formattedText> &&state_, array<object_ptr<premiumStatePaymentOption>> &&payment_options_, array<object_ptr<premiumFeaturePromotionAnimation>> &&animations_, array<object_ptr<businessFeaturePromotionAnimation>> &&business_animations_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1772082178;

  static object_ptr<premiumState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class premiumPaymentOption;

/**
 * Describes an option for buying or upgrading Telegram Premium for self.
 */
class premiumStatePaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the payment option.
  object_ptr<premiumPaymentOption> payment_option_;
  static jfieldID payment_option_fieldID;
  /// True, if this is the currently used Telegram Premium subscription option.
  bool is_current_;
  static jfieldID is_current_fieldID;
  /// True, if the payment option can be used to upgrade the existing Telegram Premium subscription.
  bool is_upgrade_;
  static jfieldID is_upgrade_fieldID;
  /// Identifier of the last in-store transaction for the currently used option.
  string last_transaction_id_;
  static jfieldID last_transaction_id_fieldID;

  /**
   * Describes an option for buying or upgrading Telegram Premium for self.
   */
  premiumStatePaymentOption();

  /**
   * Describes an option for buying or upgrading Telegram Premium for self.
   *
   * \param[in] payment_option_ Information about the payment option.
   * \param[in] is_current_ True, if this is the currently used Telegram Premium subscription option.
   * \param[in] is_upgrade_ True, if the payment option can be used to upgrade the existing Telegram Premium subscription.
   * \param[in] last_transaction_id_ Identifier of the last in-store transaction for the currently used option.
   */
  premiumStatePaymentOption(object_ptr<premiumPaymentOption> &&payment_option_, bool is_current_, bool is_upgrade_, string const &last_transaction_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2097591673;

  static object_ptr<premiumStatePaymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a story feature available to Premium users.
 */
class PremiumStoryFeature: public Object {
 public:
  static jclass Class;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Stories of the current user are displayed before stories of non-Premium contacts, supergroups, and channels.
 */
class premiumStoryFeaturePriorityOrder final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Stories of the current user are displayed before stories of non-Premium contacts, supergroups, and channels.
   */
  premiumStoryFeaturePriorityOrder();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1880001849;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to hide the fact that the user viewed other's stories.
 */
class premiumStoryFeatureStealthMode final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to hide the fact that the user viewed other's stories.
   */
  premiumStoryFeatureStealthMode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1194605988;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to check who opened the current user's stories after they expire.
 */
class premiumStoryFeaturePermanentViewsHistory final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to check who opened the current user's stories after they expire.
   */
  premiumStoryFeaturePermanentViewsHistory();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1029683296;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to set custom expiration duration for stories.
 */
class premiumStoryFeatureCustomExpirationDuration final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to set custom expiration duration for stories.
   */
  premiumStoryFeatureCustomExpirationDuration();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -593229162;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to save other's unprotected stories.
 */
class premiumStoryFeatureSaveStories final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to save other's unprotected stories.
   */
  premiumStoryFeatureSaveStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1501286467;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to use links and formatting in story caption, and use inputStoryAreaTypeLink areas.
 */
class premiumStoryFeatureLinksAndFormatting final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to use links and formatting in story caption, and use inputStoryAreaTypeLink areas.
   */
  premiumStoryFeatureLinksAndFormatting();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -622623753;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The ability to choose better quality for viewed stories.
 */
class premiumStoryFeatureVideoQuality final : public PremiumStoryFeature {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The ability to choose better quality for viewed stories.
   */
  premiumStoryFeatureVideoQuality();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1162887511;

  static object_ptr<PremiumStoryFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class GiveawayPrize;

/**
 * Describes a prepaid giveaway.
 */
class prepaidGiveaway final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the prepaid giveaway.
  int64 id_;
  static jfieldID id_fieldID;
  /// Number of users which will receive giveaway prize.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Prize of the giveaway.
  object_ptr<GiveawayPrize> prize_;
  static jfieldID prize_fieldID;
  /// The number of boosts received by the chat from the giveaway; for Telegram Star giveaways only.
  int32 boost_count_;
  static jfieldID boost_count_fieldID;
  /// Point in time (Unix timestamp) when the giveaway was paid.
  int32 payment_date_;
  static jfieldID payment_date_fieldID;

  /**
   * Describes a prepaid giveaway.
   */
  prepaidGiveaway();

  /**
   * Describes a prepaid giveaway.
   *
   * \param[in] id_ Unique identifier of the prepaid giveaway.
   * \param[in] winner_count_ Number of users which will receive giveaway prize.
   * \param[in] prize_ Prize of the giveaway.
   * \param[in] boost_count_ The number of boosts received by the chat from the giveaway; for Telegram Star giveaways only.
   * \param[in] payment_date_ Point in time (Unix timestamp) when the giveaway was paid.
   */
  prepaidGiveaway(int64 id_, int32 winner_count_, object_ptr<GiveawayPrize> &&prize_, int32 boost_count_, int32 payment_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -277859441;

  static object_ptr<prepaidGiveaway> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InlineQueryResult;

class targetChatTypes;

/**
 * Represents a ready to send inline message. Use sendInlineQueryResultMessage to send the message.
 */
class preparedInlineMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the inline query to pass to sendInlineQueryResultMessage.
  int64 inline_query_id_;
  static jfieldID inline_query_id_fieldID;
  /// Resulted inline message of the query.
  object_ptr<InlineQueryResult> result_;
  static jfieldID result_fieldID;
  /// Types of the chats to which the message can be sent.
  object_ptr<targetChatTypes> chat_types_;
  static jfieldID chat_types_fieldID;

  /**
   * Represents a ready to send inline message. Use sendInlineQueryResultMessage to send the message.
   */
  preparedInlineMessage();

  /**
   * Represents a ready to send inline message. Use sendInlineQueryResultMessage to send the message.
   *
   * \param[in] inline_query_id_ Unique identifier of the inline query to pass to sendInlineQueryResultMessage.
   * \param[in] result_ Resulted inline message of the query.
   * \param[in] chat_types_ Types of the chats to which the message can be sent.
   */
  preparedInlineMessage(int64 inline_query_id_, object_ptr<InlineQueryResult> &&result_, object_ptr<targetChatTypes> &&chat_types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1808892734;

  static object_ptr<preparedInlineMessage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an inline message that can be sent via the bot.
 */
class preparedInlineMessageId final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the message.
  string id_;
  static jfieldID id_fieldID;
  /// Point in time (Unix timestamp) when the message can't be used anymore.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;

  /**
   * Represents an inline message that can be sent via the bot.
   */
  preparedInlineMessageId();

  /**
   * Represents an inline message that can be sent via the bot.
   *
   * \param[in] id_ Unique identifier for the message.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the message can't be used anymore.
   */
  preparedInlineMessageId(string const &id_, int32 expiration_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 940415972;

  static object_ptr<preparedInlineMessageId> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class photo;

/**
 * Contains information about a product that can be paid with invoice.
 */
class productInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Product title.
  string title_;
  static jfieldID title_fieldID;
  /// Product description.
  object_ptr<formattedText> description_;
  static jfieldID description_fieldID;
  /// Product photo; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * Contains information about a product that can be paid with invoice.
   */
  productInfo();

  /**
   * Contains information about a product that can be paid with invoice.
   *
   * \param[in] title_ Product title.
   * \param[in] description_ Product description.
   * \param[in] photo_ Product photo; may be null.
   */
  productInfo(string const &title_, object_ptr<formattedText> &&description_, object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2015069020;

  static object_ptr<productInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class profileAccentColors;

/**
 * Contains information about supported accent color for user profile photo background.
 */
class profileAccentColor final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Profile accent color identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// Accent colors expected to be used in light themes.
  object_ptr<profileAccentColors> light_theme_colors_;
  static jfieldID light_theme_colors_fieldID;
  /// Accent colors expected to be used in dark themes.
  object_ptr<profileAccentColors> dark_theme_colors_;
  static jfieldID dark_theme_colors_fieldID;
  /// The minimum chat boost level required to use the color in a supergroup chat.
  int32 min_supergroup_chat_boost_level_;
  static jfieldID min_supergroup_chat_boost_level_fieldID;
  /// The minimum chat boost level required to use the color in a channel chat.
  int32 min_channel_chat_boost_level_;
  static jfieldID min_channel_chat_boost_level_fieldID;

  /**
   * Contains information about supported accent color for user profile photo background.
   */
  profileAccentColor();

  /**
   * Contains information about supported accent color for user profile photo background.
   *
   * \param[in] id_ Profile accent color identifier.
   * \param[in] light_theme_colors_ Accent colors expected to be used in light themes.
   * \param[in] dark_theme_colors_ Accent colors expected to be used in dark themes.
   * \param[in] min_supergroup_chat_boost_level_ The minimum chat boost level required to use the color in a supergroup chat.
   * \param[in] min_channel_chat_boost_level_ The minimum chat boost level required to use the color in a channel chat.
   */
  profileAccentColor(int32 id_, object_ptr<profileAccentColors> &&light_theme_colors_, object_ptr<profileAccentColors> &&dark_theme_colors_, int32 min_supergroup_chat_boost_level_, int32 min_channel_chat_boost_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 557679253;

  static object_ptr<profileAccentColor> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about supported accent colors for user profile photo background in RGB format.
 */
class profileAccentColors final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of 1-2 colors in RGB format, describing the colors, as expected to be shown in the color palette settings.
  array<int32> palette_colors_;
  static jfieldID palette_colors_fieldID;
  /// The list of 1-2 colors in RGB format, describing the colors, as expected to be used for the profile photo background.
  array<int32> background_colors_;
  static jfieldID background_colors_fieldID;
  /// The list of 2 colors in RGB format, describing the colors of the gradient to be used for the unread active story indicator around profile photo.
  array<int32> story_colors_;
  static jfieldID story_colors_fieldID;

  /**
   * Contains information about supported accent colors for user profile photo background in RGB format.
   */
  profileAccentColors();

  /**
   * Contains information about supported accent colors for user profile photo background in RGB format.
   *
   * \param[in] palette_colors_ The list of 1-2 colors in RGB format, describing the colors, as expected to be shown in the color palette settings.
   * \param[in] background_colors_ The list of 1-2 colors in RGB format, describing the colors, as expected to be used for the profile photo background.
   * \param[in] story_colors_ The list of 2 colors in RGB format, describing the colors of the gradient to be used for the unread active story indicator around profile photo.
   */
  profileAccentColors(array<int32> &&palette_colors_, array<int32> &&background_colors_, array<int32> &&story_colors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -596042431;

  static object_ptr<profileAccentColors> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

/**
 * Describes a user profile photo.
 */
class profilePhoto final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos.
  int64 id_;
  static jfieldID id_fieldID;
  /// A small (160x160) user profile photo. The file can be downloaded only before the photo is changed.
  object_ptr<file> small_;
  static jfieldID small_fieldID;
  /// A big (640x640) user profile photo. The file can be downloaded only before the photo is changed.
  object_ptr<file> big_;
  static jfieldID big_fieldID;
  /// User profile photo minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// True, if the photo has animated variant.
  bool has_animation_;
  static jfieldID has_animation_fieldID;
  /// True, if the photo is visible only for the current user.
  bool is_personal_;
  static jfieldID is_personal_fieldID;

  /**
   * Describes a user profile photo.
   */
  profilePhoto();

  /**
   * Describes a user profile photo.
   *
   * \param[in] id_ Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos.
   * \param[in] small_ A small (160x160) user profile photo. The file can be downloaded only before the photo is changed.
   * \param[in] big_ A big (640x640) user profile photo. The file can be downloaded only before the photo is changed.
   * \param[in] minithumbnail_ User profile photo minithumbnail; may be null.
   * \param[in] has_animation_ True, if the photo has animated variant.
   * \param[in] is_personal_ True, if the photo is visible only for the current user.
   */
  profilePhoto(int64 id_, object_ptr<file> &&small_, object_ptr<file> &&big_, object_ptr<minithumbnail> &&minithumbnail_, bool has_animation_, bool is_personal_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1025754018;

  static object_ptr<profilePhoto> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a tab shown in a user or a chat profile.
 */
class ProfileTab: public Object {
 public:
  static jclass Class;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with stories posted by the user or the channel chat and saved to profile.
 */
class profileTabPosts final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with stories posted by the user or the channel chat and saved to profile.
   */
  profileTabPosts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1181952362;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with gifts received by the user or the channel chat.
 */
class profileTabGifts final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with gifts received by the user or the channel chat.
   */
  profileTabGifts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1296815210;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with photos and videos posted by the channel.
 */
class profileTabMedia final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with photos and videos posted by the channel.
   */
  profileTabMedia();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1925597525;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with documents posted by the channel.
 */
class profileTabFiles final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with documents posted by the channel.
   */
  profileTabFiles();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1422681088;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with messages posted by the channel and containing links.
 */
class profileTabLinks final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with messages posted by the channel and containing links.
   */
  profileTabLinks();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -748329831;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with audio messages posted by the channel.
 */
class profileTabMusic final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with audio messages posted by the channel.
   */
  profileTabMusic();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1624780178;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with voice notes posted by the channel.
 */
class profileTabVoice final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with voice notes posted by the channel.
   */
  profileTabVoice();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -461960914;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A tab with animations posted by the channel.
 */
class profileTabGifs final : public ProfileTab {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A tab with animations posted by the channel.
   */
  profileTabGifs();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1564412267;

  static object_ptr<ProfileTab> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ProxyType;

/**
 * Describes a proxy server.
 */
class proxy final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Proxy server domain or IP address.
  string server_;
  static jfieldID server_fieldID;
  /// Proxy server port.
  int32 port_;
  static jfieldID port_fieldID;
  /// Type of the proxy.
  object_ptr<ProxyType> type_;
  static jfieldID type_fieldID;

  /**
   * Describes a proxy server.
   */
  proxy();

  /**
   * Describes a proxy server.
   *
   * \param[in] server_ Proxy server domain or IP address.
   * \param[in] port_ Proxy server port.
   * \param[in] type_ Type of the proxy.
   */
  proxy(string const &server_, int32 port_, object_ptr<ProxyType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1636386947;

  static object_ptr<proxy> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the type of proxy server.
 */
class ProxyType: public Object {
 public:
  static jclass Class;

  static object_ptr<ProxyType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A SOCKS5 proxy server.
 */
class proxyTypeSocks5 final : public ProxyType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username for logging in; may be empty.
  string username_;
  static jfieldID username_fieldID;
  /// Password for logging in; may be empty.
  string password_;
  static jfieldID password_fieldID;

  /**
   * A SOCKS5 proxy server.
   */
  proxyTypeSocks5();

  /**
   * A SOCKS5 proxy server.
   *
   * \param[in] username_ Username for logging in; may be empty.
   * \param[in] password_ Password for logging in; may be empty.
   */
  proxyTypeSocks5(string const &username_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -890027341;

  static object_ptr<ProxyType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A HTTP transparent proxy server.
 */
class proxyTypeHttp final : public ProxyType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username for logging in; may be empty.
  string username_;
  static jfieldID username_fieldID;
  /// Password for logging in; may be empty.
  string password_;
  static jfieldID password_fieldID;
  /// Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method.
  bool http_only_;
  static jfieldID http_only_fieldID;

  /**
   * A HTTP transparent proxy server.
   */
  proxyTypeHttp();

  /**
   * A HTTP transparent proxy server.
   *
   * \param[in] username_ Username for logging in; may be empty.
   * \param[in] password_ Password for logging in; may be empty.
   * \param[in] http_only_ Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method.
   */
  proxyTypeHttp(string const &username_, string const &password_, bool http_only_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1547188361;

  static object_ptr<ProxyType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An MTProto proxy server.
 */
class proxyTypeMtproto final : public ProxyType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The proxy's secret in hexadecimal encoding.
  string secret_;
  static jfieldID secret_fieldID;

  /**
   * An MTProto proxy server.
   */
  proxyTypeMtproto();

  /**
   * An MTProto proxy server.
   *
   * \param[in] secret_ The proxy's secret in hexadecimal encoding.
   */
  explicit proxyTypeMtproto(string const &secret_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1964826627;

  static object_ptr<ProxyType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of public chat.
 */
class PublicChatType: public Object {
 public:
  static jclass Class;

  static object_ptr<PublicChatType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is public, because it has an active username.
 */
class publicChatTypeHasUsername final : public PublicChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat is public, because it has an active username.
   */
  publicChatTypeHasUsername();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 350789758;

  static object_ptr<PublicChatType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat is public, because it is a location-based supergroup.
 */
class publicChatTypeIsLocationBased final : public PublicChatType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat is public, because it is a location-based supergroup.
   */
  publicChatTypeIsLocationBased();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1183735952;

  static object_ptr<PublicChatType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class message;

class story;

/**
 * This class is an abstract base class.
 * Describes a public forward or repost of a story.
 */
class PublicForward: public Object {
 public:
  static jclass Class;

  static object_ptr<PublicForward> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a public forward as a message.
 */
class publicForwardMessage final : public PublicForward {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * Contains a public forward as a message.
   */
  publicForwardMessage();

  /**
   * Contains a public forward as a message.
   *
   * \param[in] message_ Information about the message.
   */
  explicit publicForwardMessage(object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 51885010;

  static object_ptr<PublicForward> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a public repost to a story.
 */
class publicForwardStory final : public PublicForward {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the story.
  object_ptr<story> story_;
  static jfieldID story_fieldID;

  /**
   * Contains a public repost to a story.
   */
  publicForwardStory();

  /**
   * Contains a public repost to a story.
   *
   * \param[in] story_ Information about the story.
   */
  explicit publicForwardStory(object_ptr<story> &&story_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2145330863;

  static object_ptr<PublicForward> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class PublicForward;

/**
 * Represents a list of public forwards and reposts as a story of a message or a story.
 */
class publicForwards final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of messages and stories found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of found public forwards and reposts.
  array<object_ptr<PublicForward>> forwards_;
  static jfieldID forwards_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of public forwards and reposts as a story of a message or a story.
   */
  publicForwards();

  /**
   * Represents a list of public forwards and reposts as a story of a message or a story.
   *
   * \param[in] total_count_ Approximate total number of messages and stories found.
   * \param[in] forwards_ List of found public forwards and reposts.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  publicForwards(int32 total_count_, array<object_ptr<PublicForward>> &&forwards_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2011272719;

  static object_ptr<publicForwards> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about public post search limits.
 */
class publicPostSearchLimits final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of queries that can be sent daily for free.
  int32 daily_free_query_count_;
  static jfieldID daily_free_query_count_fieldID;
  /// Number of remaining free queries today.
  int32 remaining_free_query_count_;
  static jfieldID remaining_free_query_count_fieldID;
  /// Amount of time till the next free query can be sent; 0 if it can be sent now.
  int32 next_free_query_in_;
  static jfieldID next_free_query_in_fieldID;
  /// Number of Telegram Stars that must be paid for each non-free query.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// True, if the search for the specified query isn't charged.
  bool is_current_query_free_;
  static jfieldID is_current_query_free_fieldID;

  /**
   * Contains information about public post search limits.
   */
  publicPostSearchLimits();

  /**
   * Contains information about public post search limits.
   *
   * \param[in] daily_free_query_count_ Number of queries that can be sent daily for free.
   * \param[in] remaining_free_query_count_ Number of remaining free queries today.
   * \param[in] next_free_query_in_ Amount of time till the next free query can be sent; 0 if it can be sent now.
   * \param[in] star_count_ Number of Telegram Stars that must be paid for each non-free query.
   * \param[in] is_current_query_free_ True, if the search for the specified query isn't charged.
   */
  publicPostSearchLimits(int32 daily_free_query_count_, int32 remaining_free_query_count_, int32 next_free_query_in_, int53 star_count_, bool is_current_query_free_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 42358064;

  static object_ptr<publicPostSearchLimits> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class GiveawayPrize;

class animation;

class audio;

class document;

class photo;

class sticker;

class video;

class videoNote;

class voiceNote;

/**
 * This class is an abstract base class.
 * Contains content of a push message notification.
 */
class PushMessageContent: public Object {
 public:
  static jclass Class;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A general message with hidden content.
 */
class pushMessageContentHidden final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A general message with hidden content.
   */
  pushMessageContentHidden();

  /**
   * A general message with hidden content.
   *
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  explicit pushMessageContentHidden(bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -316950436;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An animation message (GIF-style).
 */
class pushMessageContentAnimation final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;
  /// Animation caption.
  string caption_;
  static jfieldID caption_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * An animation message (GIF-style).
   */
  pushMessageContentAnimation();

  /**
   * An animation message (GIF-style).
   *
   * \param[in] animation_ Message content; may be null.
   * \param[in] caption_ Animation caption.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentAnimation(object_ptr<animation> &&animation_, string const &caption_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1034215396;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An audio message.
 */
class pushMessageContentAudio final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<audio> audio_;
  static jfieldID audio_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * An audio message.
   */
  pushMessageContentAudio();

  /**
   * An audio message.
   *
   * \param[in] audio_ Message content; may be null.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentAudio(object_ptr<audio> &&audio_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 381581426;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a user contact.
 */
class pushMessageContentContact final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Contact's name.
  string name_;
  static jfieldID name_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a user contact.
   */
  pushMessageContentContact();

  /**
   * A message with a user contact.
   *
   * \param[in] name_ Contact's name.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentContact(string const &name_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -12219820;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A contact has registered with Telegram.
 */
class pushMessageContentContactRegistered final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the user joined Telegram as a Telegram Premium account.
  bool as_premium_account_;
  static jfieldID as_premium_account_fieldID;

  /**
   * A contact has registered with Telegram.
   */
  pushMessageContentContactRegistered();

  /**
   * A contact has registered with Telegram.
   *
   * \param[in] as_premium_account_ True, if the user joined Telegram as a Telegram Premium account.
   */
  explicit pushMessageContentContactRegistered(bool as_premium_account_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1233778465;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A document message (a general file).
 */
class pushMessageContentDocument final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<document> document_;
  static jfieldID document_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A document message (a general file).
   */
  pushMessageContentDocument();

  /**
   * A document message (a general file).
   *
   * \param[in] document_ Message content; may be null.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentDocument(object_ptr<document> &&document_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -458379775;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a game.
 */
class pushMessageContentGame final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Game title, empty for pinned game message.
  string title_;
  static jfieldID title_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a game.
   */
  pushMessageContentGame();

  /**
   * A message with a game.
   *
   * \param[in] title_ Game title, empty for pinned game message.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentGame(string const &title_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -515131109;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new high score was achieved in a game.
 */
class pushMessageContentGameScore final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Game title, empty for pinned message.
  string title_;
  static jfieldID title_fieldID;
  /// New score, 0 for pinned message.
  int32 score_;
  static jfieldID score_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A new high score was achieved in a game.
   */
  pushMessageContentGameScore();

  /**
   * A new high score was achieved in a game.
   *
   * \param[in] title_ Game title, empty for pinned message.
   * \param[in] score_ New score, 0 for pinned message.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentGameScore(string const &title_, int32 score_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 901303688;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with an invoice from a bot.
 */
class pushMessageContentInvoice final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Product price.
  string price_;
  static jfieldID price_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with an invoice from a bot.
   */
  pushMessageContentInvoice();

  /**
   * A message with an invoice from a bot.
   *
   * \param[in] price_ Product price.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentInvoice(string const &price_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1731687492;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a location.
 */
class pushMessageContentLocation final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the location is live.
  bool is_live_;
  static jfieldID is_live_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a location.
   */
  pushMessageContentLocation();

  /**
   * A message with a location.
   *
   * \param[in] is_live_ True, if the location is live.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentLocation(bool is_live_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1288005709;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with paid media.
 */
class pushMessageContentPaidMedia final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars needed to buy access to the media in the message; 0 for pinned message.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with paid media.
   */
  pushMessageContentPaidMedia();

  /**
   * A message with paid media.
   *
   * \param[in] star_count_ Number of Telegram Stars needed to buy access to the media in the message; 0 for pinned message.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentPaidMedia(int53 star_count_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1252595894;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo message.
 */
class pushMessageContentPhoto final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Photo caption.
  string caption_;
  static jfieldID caption_fieldID;
  /// True, if the photo is secret.
  bool is_secret_;
  static jfieldID is_secret_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A photo message.
   */
  pushMessageContentPhoto();

  /**
   * A photo message.
   *
   * \param[in] photo_ Message content; may be null.
   * \param[in] caption_ Photo caption.
   * \param[in] is_secret_ True, if the photo is secret.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentPhoto(object_ptr<photo> &&photo_, string const &caption_, bool is_secret_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 140631122;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a poll.
 */
class pushMessageContentPoll final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Poll question.
  string question_;
  static jfieldID question_fieldID;
  /// True, if the poll is regular and not in quiz mode.
  bool is_regular_;
  static jfieldID is_regular_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a poll.
   */
  pushMessageContentPoll();

  /**
   * A message with a poll.
   *
   * \param[in] question_ Poll question.
   * \param[in] is_regular_ True, if the poll is regular and not in quiz mode.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentPoll(string const &question_, bool is_regular_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -44403654;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a Telegram Premium gift code created for the user.
 */
class pushMessageContentPremiumGiftCode final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of months the Telegram Premium subscription will be active after code activation.
  int32 month_count_;
  static jfieldID month_count_fieldID;

  /**
   * A message with a Telegram Premium gift code created for the user.
   */
  pushMessageContentPremiumGiftCode();

  /**
   * A message with a Telegram Premium gift code created for the user.
   *
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active after code activation.
   */
  explicit pushMessageContentPremiumGiftCode(int32 month_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 413224997;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a giveaway.
 */
class pushMessageContentGiveaway final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of users which will receive giveaway prizes; 0 for pinned message.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Prize of the giveaway; may be null for pinned message.
  object_ptr<GiveawayPrize> prize_;
  static jfieldID prize_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a giveaway.
   */
  pushMessageContentGiveaway();

  /**
   * A message with a giveaway.
   *
   * \param[in] winner_count_ Number of users which will receive giveaway prizes; 0 for pinned message.
   * \param[in] prize_ Prize of the giveaway; may be null for pinned message.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentGiveaway(int32 winner_count_, object_ptr<GiveawayPrize> &&prize_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -700547186;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a gift.
 */
class pushMessageContentGift final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars that sender paid for the gift.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// True, if the message is about prepaid upgrade of the gift by another user instead of actual receiving of a new gift.
  bool is_prepaid_upgrade_;
  static jfieldID is_prepaid_upgrade_fieldID;

  /**
   * A message with a gift.
   */
  pushMessageContentGift();

  /**
   * A message with a gift.
   *
   * \param[in] star_count_ Number of Telegram Stars that sender paid for the gift.
   * \param[in] is_prepaid_upgrade_ True, if the message is about prepaid upgrade of the gift by another user instead of actual receiving of a new gift.
   */
  pushMessageContentGift(int53 star_count_, bool is_prepaid_upgrade_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1721859295;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with an upgraded gift.
 */
class pushMessageContentUpgradedGift final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the gift was obtained by upgrading of a previously received gift; otherwise, if is_prepaid_upgrade == false, then this is a transferred or resold gift.
  bool is_upgrade_;
  static jfieldID is_upgrade_fieldID;
  /// True, if the message is about completion of prepaid upgrade of the gift instead of actual receiving of a new gift.
  bool is_prepaid_upgrade_;
  static jfieldID is_prepaid_upgrade_fieldID;

  /**
   * A message with an upgraded gift.
   */
  pushMessageContentUpgradedGift();

  /**
   * A message with an upgraded gift.
   *
   * \param[in] is_upgrade_ True, if the gift was obtained by upgrading of a previously received gift; otherwise, if is_prepaid_upgrade == false, then this is a transferred or resold gift.
   * \param[in] is_prepaid_upgrade_ True, if the message is about completion of prepaid upgrade of the gift instead of actual receiving of a new gift.
   */
  pushMessageContentUpgradedGift(bool is_upgrade_, bool is_prepaid_upgrade_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1287092226;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A screenshot of a message in the chat has been taken.
 */
class pushMessageContentScreenshotTaken final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A screenshot of a message in the chat has been taken.
   */
  pushMessageContentScreenshotTaken();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 214245369;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a sticker.
 */
class pushMessageContentSticker final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// Emoji corresponding to the sticker; may be empty.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a sticker.
   */
  pushMessageContentSticker();

  /**
   * A message with a sticker.
   *
   * \param[in] sticker_ Message content; may be null.
   * \param[in] emoji_ Emoji corresponding to the sticker; may be empty.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentSticker(object_ptr<sticker> &&sticker_, string const &emoji_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1553513939;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a story.
 */
class pushMessageContentStory final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the user was mentioned in the story.
  bool is_mention_;
  static jfieldID is_mention_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a story.
   */
  pushMessageContentStory();

  /**
   * A message with a story.
   *
   * \param[in] is_mention_ True, if the user was mentioned in the story.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentStory(bool is_mention_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 599622223;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A text message.
 */
class pushMessageContentText final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message text.
  string text_;
  static jfieldID text_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A text message.
   */
  pushMessageContentText();

  /**
   * A text message.
   *
   * \param[in] text_ Message text.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentText(string const &text_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 274587305;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a checklist.
 */
class pushMessageContentChecklist final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Checklist title.
  string title_;
  static jfieldID title_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A message with a checklist.
   */
  pushMessageContentChecklist();

  /**
   * A message with a checklist.
   *
   * \param[in] title_ Checklist title.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentChecklist(string const &title_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 212274252;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video message.
 */
class pushMessageContentVideo final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<video> video_;
  static jfieldID video_fieldID;
  /// Video caption.
  string caption_;
  static jfieldID caption_fieldID;
  /// True, if the video is secret.
  bool is_secret_;
  static jfieldID is_secret_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A video message.
   */
  pushMessageContentVideo();

  /**
   * A video message.
   *
   * \param[in] video_ Message content; may be null.
   * \param[in] caption_ Video caption.
   * \param[in] is_secret_ True, if the video is secret.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentVideo(object_ptr<video> &&video_, string const &caption_, bool is_secret_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 310038831;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video note message.
 */
class pushMessageContentVideoNote final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<videoNote> video_note_;
  static jfieldID video_note_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A video note message.
   */
  pushMessageContentVideoNote();

  /**
   * A video note message.
   *
   * \param[in] video_note_ Message content; may be null.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentVideoNote(object_ptr<videoNote> &&video_note_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1122764417;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A voice note message.
 */
class pushMessageContentVoiceNote final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message content; may be null.
  object_ptr<voiceNote> voice_note_;
  static jfieldID voice_note_fieldID;
  /// True, if the message is a pinned message with the specified content.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * A voice note message.
   */
  pushMessageContentVoiceNote();

  /**
   * A voice note message.
   *
   * \param[in] voice_note_ Message content; may be null.
   * \param[in] is_pinned_ True, if the message is a pinned message with the specified content.
   */
  pushMessageContentVoiceNote(object_ptr<voiceNote> &&voice_note_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 88910987;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A newly created basic group.
 */
class pushMessageContentBasicGroupChatCreate final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A newly created basic group.
   */
  pushMessageContentBasicGroupChatCreate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2114855172;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video chat or live stream was started.
 */
class pushMessageContentVideoChatStarted final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A video chat or live stream was started.
   */
  pushMessageContentVideoChatStarted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -566547393;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video chat or live stream has ended.
 */
class pushMessageContentVideoChatEnded final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A video chat or live stream has ended.
   */
  pushMessageContentVideoChatEnded();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1250265885;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An invitation of participants to a video chat or live stream.
 */
class pushMessageContentInviteVideoChatParticipants final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the current user was invited to the video chat or the live stream.
  bool is_current_user_;
  static jfieldID is_current_user_fieldID;

  /**
   * An invitation of participants to a video chat or live stream.
   */
  pushMessageContentInviteVideoChatParticipants();

  /**
   * An invitation of participants to a video chat or live stream.
   *
   * \param[in] is_current_user_ True, if the current user was invited to the video chat or the live stream.
   */
  explicit pushMessageContentInviteVideoChatParticipants(bool is_current_user_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 517620365;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New chat members were invited to a group.
 */
class pushMessageContentChatAddMembers final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the added member.
  string member_name_;
  static jfieldID member_name_fieldID;
  /// True, if the current user was added to the group.
  bool is_current_user_;
  static jfieldID is_current_user_fieldID;
  /// True, if the user has returned to the group themselves.
  bool is_returned_;
  static jfieldID is_returned_fieldID;

  /**
   * New chat members were invited to a group.
   */
  pushMessageContentChatAddMembers();

  /**
   * New chat members were invited to a group.
   *
   * \param[in] member_name_ Name of the added member.
   * \param[in] is_current_user_ True, if the current user was added to the group.
   * \param[in] is_returned_ True, if the user has returned to the group themselves.
   */
  pushMessageContentChatAddMembers(string const &member_name_, bool is_current_user_, bool is_returned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1087145158;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat photo was edited.
 */
class pushMessageContentChatChangePhoto final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A chat photo was edited.
   */
  pushMessageContentChatChangePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1114222051;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat title was edited.
 */
class pushMessageContentChatChangeTitle final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New chat title.
  string title_;
  static jfieldID title_fieldID;

  /**
   * A chat title was edited.
   */
  pushMessageContentChatChangeTitle();

  /**
   * A chat title was edited.
   *
   * \param[in] title_ New chat title.
   */
  explicit pushMessageContentChatChangeTitle(string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1964902749;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat background was edited.
 */
class pushMessageContentChatSetBackground final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the set background is the same as the background of the current user.
  bool is_same_;
  static jfieldID is_same_fieldID;

  /**
   * A chat background was edited.
   */
  pushMessageContentChatSetBackground();

  /**
   * A chat background was edited.
   *
   * \param[in] is_same_ True, if the set background is the same as the background of the current user.
   */
  explicit pushMessageContentChatSetBackground(bool is_same_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1490331933;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat theme was edited.
 */
class pushMessageContentChatSetTheme final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If non-empty, human-readable name of the new theme. Otherwise, the chat theme was reset to the default one.
  string name_;
  static jfieldID name_fieldID;

  /**
   * A chat theme was edited.
   */
  pushMessageContentChatSetTheme();

  /**
   * A chat theme was edited.
   *
   * \param[in] name_ If non-empty, human-readable name of the new theme. Otherwise, the chat theme was reset to the default one.
   */
  explicit pushMessageContentChatSetTheme(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1605251024;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat member was deleted.
 */
class pushMessageContentChatDeleteMember final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the deleted member.
  string member_name_;
  static jfieldID member_name_fieldID;
  /// True, if the current user was deleted from the group.
  bool is_current_user_;
  static jfieldID is_current_user_fieldID;
  /// True, if the user has left the group themselves.
  bool is_left_;
  static jfieldID is_left_fieldID;

  /**
   * A chat member was deleted.
   */
  pushMessageContentChatDeleteMember();

  /**
   * A chat member was deleted.
   *
   * \param[in] member_name_ Name of the deleted member.
   * \param[in] is_current_user_ True, if the current user was deleted from the group.
   * \param[in] is_left_ True, if the user has left the group themselves.
   */
  pushMessageContentChatDeleteMember(string const &member_name_, bool is_current_user_, bool is_left_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 598714783;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member joined the chat via an invite link.
 */
class pushMessageContentChatJoinByLink final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A new member joined the chat via an invite link.
   */
  pushMessageContentChatJoinByLink();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1553719113;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new member was accepted to the chat by an administrator.
 */
class pushMessageContentChatJoinByRequest final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A new member was accepted to the chat by an administrator.
   */
  pushMessageContentChatJoinByRequest();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -205823627;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new recurring payment was made by the current user.
 */
class pushMessageContentRecurringPayment final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The paid amount.
  string amount_;
  static jfieldID amount_fieldID;

  /**
   * A new recurring payment was made by the current user.
   */
  pushMessageContentRecurringPayment();

  /**
   * A new recurring payment was made by the current user.
   *
   * \param[in] amount_ The paid amount.
   */
  explicit pushMessageContentRecurringPayment(string const &amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1619211802;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A profile photo was suggested to the user.
 */
class pushMessageContentSuggestProfilePhoto final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A profile photo was suggested to the user.
   */
  pushMessageContentSuggestProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2104225963;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A birthdate was suggested to be set.
 */
class pushMessageContentSuggestBirthdate final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A birthdate was suggested to be set.
   */
  pushMessageContentSuggestBirthdate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -899891750;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user in the chat came within proximity alert range from the current user.
 */
class pushMessageContentProximityAlertTriggered final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The distance to the user.
  int32 distance_;
  static jfieldID distance_fieldID;

  /**
   * A user in the chat came within proximity alert range from the current user.
   */
  pushMessageContentProximityAlertTriggered();

  /**
   * A user in the chat came within proximity alert range from the current user.
   *
   * \param[in] distance_ The distance to the user.
   */
  explicit pushMessageContentProximityAlertTriggered(int32 distance_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -264601594;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some tasks were added to a checklist.
 */
class pushMessageContentChecklistTasksAdded final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of added tasks.
  int32 task_count_;
  static jfieldID task_count_fieldID;

  /**
   * Some tasks were added to a checklist.
   */
  pushMessageContentChecklistTasksAdded();

  /**
   * Some tasks were added to a checklist.
   *
   * \param[in] task_count_ Number of added tasks.
   */
  explicit pushMessageContentChecklistTasksAdded(int32 task_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2141595022;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some tasks from a checklist were marked as done or not done.
 */
class pushMessageContentChecklistTasksDone final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of changed tasks.
  int32 task_count_;
  static jfieldID task_count_fieldID;

  /**
   * Some tasks from a checklist were marked as done or not done.
   */
  pushMessageContentChecklistTasksDone();

  /**
   * Some tasks from a checklist were marked as done or not done.
   *
   * \param[in] task_count_ Number of changed tasks.
   */
  explicit pushMessageContentChecklistTasksDone(int32 task_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1187614554;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An option was added to a poll.
 */
class pushMessageContentPollOptionAdded final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the option.
  string text_;
  static jfieldID text_fieldID;

  /**
   * An option was added to a poll.
   */
  pushMessageContentPollOptionAdded();

  /**
   * An option was added to a poll.
   *
   * \param[in] text_ Text of the option.
   */
  explicit pushMessageContentPollOptionAdded(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -86122207;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forwarded messages.
 */
class pushMessageContentMessageForwards final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of forwarded messages.
  int32 total_count_;
  static jfieldID total_count_fieldID;

  /**
   * A forwarded messages.
   */
  pushMessageContentMessageForwards();

  /**
   * A forwarded messages.
   *
   * \param[in] total_count_ Number of forwarded messages.
   */
  explicit pushMessageContentMessageForwards(int32 total_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1913083876;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A media album.
 */
class pushMessageContentMediaAlbum final : public PushMessageContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of messages in the album.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// True, if the album has at least one photo.
  bool has_photos_;
  static jfieldID has_photos_fieldID;
  /// True, if the album has at least one video file.
  bool has_videos_;
  static jfieldID has_videos_fieldID;
  /// True, if the album has at least one audio file.
  bool has_audios_;
  static jfieldID has_audios_fieldID;
  /// True, if the album has at least one document.
  bool has_documents_;
  static jfieldID has_documents_fieldID;

  /**
   * A media album.
   */
  pushMessageContentMediaAlbum();

  /**
   * A media album.
   *
   * \param[in] total_count_ Number of messages in the album.
   * \param[in] has_photos_ True, if the album has at least one photo.
   * \param[in] has_videos_ True, if the album has at least one video file.
   * \param[in] has_audios_ True, if the album has at least one audio file.
   * \param[in] has_documents_ True, if the album has at least one document.
   */
  pushMessageContentMediaAlbum(int32 total_count_, bool has_photos_, bool has_videos_, bool has_audios_, bool has_documents_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -748426897;

  static object_ptr<PushMessageContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification.
 */
class pushReceiverId final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The globally unique identifier of push notification subscription.
  int64 id_;
  static jfieldID id_fieldID;

  /**
   * Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification.
   */
  pushReceiverId();

  /**
   * Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification.
   *
   * \param[in] id_ The globally unique identifier of push notification subscription.
   */
  explicit pushReceiverId(int64 id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 371056428;

  static object_ptr<pushReceiverId> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageContent;

class MessageSendingState;

class ReplyMarkup;

/**
 * Describes a message that can be used for quick reply.
 */
class quickReplyMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique message identifier among all quick replies.
  int53 id_;
  static jfieldID id_fieldID;
  /// The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
  object_ptr<MessageSendingState> sending_state_;
  static jfieldID sending_state_fieldID;
  /// True, if the message can be edited.
  bool can_be_edited_;
  static jfieldID can_be_edited_fieldID;
  /// The identifier of the quick reply message to which the message replies; 0 if none.
  int53 reply_to_message_id_;
  static jfieldID reply_to_message_id_fieldID;
  /// If non-zero, the user identifier of the bot through which this message was sent.
  int53 via_bot_user_id_;
  static jfieldID via_bot_user_id_fieldID;
  /// Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.
  int64 media_album_id_;
  static jfieldID media_album_id_fieldID;
  /// Content of the message.
  object_ptr<MessageContent> content_;
  static jfieldID content_fieldID;
  /// Inline keyboard reply markup for the message; may be null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Describes a message that can be used for quick reply.
   */
  quickReplyMessage();

  /**
   * Describes a message that can be used for quick reply.
   *
   * \param[in] id_ Unique message identifier among all quick replies.
   * \param[in] sending_state_ The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent.
   * \param[in] can_be_edited_ True, if the message can be edited.
   * \param[in] reply_to_message_id_ The identifier of the quick reply message to which the message replies; 0 if none.
   * \param[in] via_bot_user_id_ If non-zero, the user identifier of the bot through which this message was sent.
   * \param[in] media_album_id_ Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums.
   * \param[in] content_ Content of the message.
   * \param[in] reply_markup_ Inline keyboard reply markup for the message; may be null if none.
   */
  quickReplyMessage(int53 id_, object_ptr<MessageSendingState> &&sending_state_, bool can_be_edited_, int53 reply_to_message_id_, int53 via_bot_user_id_, int64 media_album_id_, object_ptr<MessageContent> &&content_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1090965757;

  static object_ptr<quickReplyMessage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class quickReplyMessage;

/**
 * Contains a list of quick reply messages.
 */
class quickReplyMessages final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of quick reply messages; messages may be null.
  array<object_ptr<quickReplyMessage>> messages_;
  static jfieldID messages_fieldID;

  /**
   * Contains a list of quick reply messages.
   */
  quickReplyMessages();

  /**
   * Contains a list of quick reply messages.
   *
   * \param[in] messages_ List of quick reply messages; messages may be null.
   */
  explicit quickReplyMessages(array<object_ptr<quickReplyMessage>> &&messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 743214375;

  static object_ptr<quickReplyMessages> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class quickReplyMessage;

/**
 * Describes a shortcut that can be used for a quick reply.
 */
class quickReplyShortcut final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique shortcut identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// The name of the shortcut that can be used to use the shortcut.
  string name_;
  static jfieldID name_fieldID;
  /// The first shortcut message.
  object_ptr<quickReplyMessage> first_message_;
  static jfieldID first_message_fieldID;
  /// The total number of messages in the shortcut.
  int32 message_count_;
  static jfieldID message_count_fieldID;

  /**
   * Describes a shortcut that can be used for a quick reply.
   */
  quickReplyShortcut();

  /**
   * Describes a shortcut that can be used for a quick reply.
   *
   * \param[in] id_ Unique shortcut identifier.
   * \param[in] name_ The name of the shortcut that can be used to use the shortcut.
   * \param[in] first_message_ The first shortcut message.
   * \param[in] message_count_ The total number of messages in the shortcut.
   */
  quickReplyShortcut(int32 id_, string const &name_, object_ptr<quickReplyMessage> &&first_message_, int32 message_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1107453291;

  static object_ptr<quickReplyShortcut> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionNotificationSource;

/**
 * Contains information about notification settings for reactions and poll votes.
 */
class reactionNotificationSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Source of message reactions for which notifications are shown.
  object_ptr<ReactionNotificationSource> message_reaction_source_;
  static jfieldID message_reaction_source_fieldID;
  /// Source of story reactions for which notifications are shown.
  object_ptr<ReactionNotificationSource> story_reaction_source_;
  static jfieldID story_reaction_source_fieldID;
  /// Source of poll votes for which notifications are shown.
  object_ptr<ReactionNotificationSource> poll_vote_source_;
  static jfieldID poll_vote_source_fieldID;
  /// Identifier of the notification sound to be played; 0 if sound is disabled; pass -1 to use the app-dependent default sound.
  int64 sound_id_;
  static jfieldID sound_id_fieldID;
  /// True, if reaction sender and emoji must be displayed in notifications.
  bool show_preview_;
  static jfieldID show_preview_fieldID;

  /**
   * Contains information about notification settings for reactions and poll votes.
   */
  reactionNotificationSettings();

  /**
   * Contains information about notification settings for reactions and poll votes.
   *
   * \param[in] message_reaction_source_ Source of message reactions for which notifications are shown.
   * \param[in] story_reaction_source_ Source of story reactions for which notifications are shown.
   * \param[in] poll_vote_source_ Source of poll votes for which notifications are shown.
   * \param[in] sound_id_ Identifier of the notification sound to be played; 0 if sound is disabled; pass -1 to use the app-dependent default sound.
   * \param[in] show_preview_ True, if reaction sender and emoji must be displayed in notifications.
   */
  reactionNotificationSettings(object_ptr<ReactionNotificationSource> &&message_reaction_source_, object_ptr<ReactionNotificationSource> &&story_reaction_source_, object_ptr<ReactionNotificationSource> &&poll_vote_source_, int64 sound_id_, bool show_preview_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2074932258;

  static object_ptr<reactionNotificationSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes sources of reactions for which notifications will be shown.
 */
class ReactionNotificationSource: public Object {
 public:
  static jclass Class;

  static object_ptr<ReactionNotificationSource> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notifications for reactions are disabled.
 */
class reactionNotificationSourceNone final : public ReactionNotificationSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Notifications for reactions are disabled.
   */
  reactionNotificationSourceNone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 366374940;

  static object_ptr<ReactionNotificationSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notifications for reactions are shown only for reactions from contacts.
 */
class reactionNotificationSourceContacts final : public ReactionNotificationSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Notifications for reactions are shown only for reactions from contacts.
   */
  reactionNotificationSourceContacts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 555501621;

  static object_ptr<ReactionNotificationSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notifications for reactions are shown for all reactions.
 */
class reactionNotificationSourceAll final : public ReactionNotificationSource {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Notifications for reactions are shown for all reactions.
   */
  reactionNotificationSourceAll();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1241689234;

  static object_ptr<ReactionNotificationSource> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of message reaction.
 */
class ReactionType: public Object {
 public:
  static jclass Class;

  static object_ptr<ReactionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A reaction with an emoji.
 */
class reactionTypeEmoji final : public ReactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text representation of the reaction.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * A reaction with an emoji.
   */
  reactionTypeEmoji();

  /**
   * A reaction with an emoji.
   *
   * \param[in] emoji_ Text representation of the reaction.
   */
  explicit reactionTypeEmoji(string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1942084920;

  static object_ptr<ReactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A reaction with a custom emoji.
 */
class reactionTypeCustomEmoji final : public ReactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the custom emoji.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * A reaction with a custom emoji.
   */
  reactionTypeCustomEmoji();

  /**
   * A reaction with a custom emoji.
   *
   * \param[in] custom_emoji_id_ Unique identifier of the custom emoji.
   */
  explicit reactionTypeCustomEmoji(int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -989117709;

  static object_ptr<ReactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The paid reaction in a channel chat.
 */
class reactionTypePaid final : public ReactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The paid reaction in a channel chat.
   */
  reactionTypePaid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 436294381;

  static object_ptr<ReactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes why the current user can't add reactions to the message, despite some other users can.
 */
class ReactionUnavailabilityReason: public Object {
 public:
  static jclass Class;

  static object_ptr<ReactionUnavailabilityReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is an anonymous administrator in the supergroup, but isn't a creator of it, so they can't vote on behalf of the supergroup.
 */
class reactionUnavailabilityReasonAnonymousAdministrator final : public ReactionUnavailabilityReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is an anonymous administrator in the supergroup, but isn't a creator of it, so they can't vote on behalf of the supergroup.
   */
  reactionUnavailabilityReasonAnonymousAdministrator();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -499612677;

  static object_ptr<ReactionUnavailabilityReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user isn't a member of the supergroup and can't send messages and reactions there without joining.
 */
class reactionUnavailabilityReasonGuest final : public ReactionUnavailabilityReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user isn't a member of the supergroup and can't send messages and reactions there without joining.
   */
  reactionUnavailabilityReasonGuest();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1357861444;

  static object_ptr<ReactionUnavailabilityReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is restricted in the chat.
 */
class reactionUnavailabilityReasonRestricted final : public ReactionUnavailabilityReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user is restricted in the chat.
   */
  reactionUnavailabilityReasonRestricted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1836882716;

  static object_ptr<ReactionUnavailabilityReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains privacy settings for message read date in private chats. Read dates are always shown to the users that can see online status of the current user regardless of this setting.
 */
class readDatePrivacySettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if message read date is shown to other users in private chats. If false and the current user isn't a Telegram Premium user, then they will not be able to see other's message read date.
  bool show_read_date_;
  static jfieldID show_read_date_fieldID;

  /**
   * Contains privacy settings for message read date in private chats. Read dates are always shown to the users that can see online status of the current user regardless of this setting.
   */
  readDatePrivacySettings();

  /**
   * Contains privacy settings for message read date in private chats. Read dates are always shown to the users that can see online status of the current user regardless of this setting.
   *
   * \param[in] show_read_date_ True, if message read date is shown to other users in private chats. If false and the current user isn't a Telegram Premium user, then they will not be able to see other's message read date.
   */
  explicit readDatePrivacySettings(bool show_read_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1654842920;

  static object_ptr<readDatePrivacySettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class SentGift;

class formattedText;

/**
 * Represents a gift received by a user or a chat.
 */
class receivedGift final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the received gift for the current user; only for the receiver of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// Identifier of a user or a chat that sent the gift; may be null if unknown.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
  int32 unique_gift_number_;
  static jfieldID unique_gift_number_fieldID;
  /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
  bool is_private_;
  static jfieldID is_private_fieldID;
  /// True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
  bool is_saved_;
  static jfieldID is_saved_fieldID;
  /// True, if the gift is pinned to the top of the chat's profile page.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;
  /// True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.
  bool can_be_upgraded_;
  static jfieldID can_be_upgraded_fieldID;
  /// True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
  bool can_be_transferred_;
  static jfieldID can_be_transferred_fieldID;
  /// True, if the gift was refunded and isn't available anymore.
  bool was_refunded_;
  static jfieldID was_refunded_fieldID;
  /// Point in time (Unix timestamp) when the gift was sent.
  int32 date_;
  static jfieldID date_fieldID;
  /// The gift.
  object_ptr<SentGift> gift_;
  static jfieldID gift_fieldID;
  /// Identifiers of collections to which the gift is added; only for the receiver of the gift.
  array<int32> collection_ids_;
  static jfieldID collection_ids_fieldID;
  /// Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
  int53 sell_star_count_;
  static jfieldID sell_star_count_fieldID;
  /// Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
  int53 prepaid_upgrade_star_count_;
  static jfieldID prepaid_upgrade_star_count_fieldID;
  /// True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
  bool is_upgrade_separate_;
  static jfieldID is_upgrade_separate_fieldID;
  /// Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
  int53 transfer_star_count_;
  static jfieldID transfer_star_count_fieldID;
  /// Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift.
  int53 drop_original_details_star_count_;
  static jfieldID drop_original_details_star_count_fieldID;
  /// Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
  int32 next_transfer_date_;
  static jfieldID next_transfer_date_fieldID;
  /// Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift.
  int32 next_resale_date_;
  static jfieldID next_resale_date_fieldID;
  /// Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift.
  int32 export_date_;
  static jfieldID export_date_fieldID;
  /// If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
  string prepaid_upgrade_hash_;
  static jfieldID prepaid_upgrade_hash_fieldID;
  /// Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift.
  int32 craft_date_;
  static jfieldID craft_date_fieldID;

  /**
   * Represents a gift received by a user or a chat.
   */
  receivedGift();

  /**
   * Represents a gift received by a user or a chat.
   *
   * \param[in] received_gift_id_ Unique identifier of the received gift for the current user; only for the receiver of the gift.
   * \param[in] sender_id_ Identifier of a user or a chat that sent the gift; may be null if unknown.
   * \param[in] text_ Message added to the gift.
   * \param[in] unique_gift_number_ Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
   * \param[in] is_private_ True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them.
   * \param[in] is_saved_ True, if the gift is displayed on the chat's profile page; only for the receiver of the gift.
   * \param[in] is_pinned_ True, if the gift is pinned to the top of the chat's profile page.
   * \param[in] can_be_upgraded_ True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.
   * \param[in] can_be_transferred_ True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift.
   * \param[in] was_refunded_ True, if the gift was refunded and isn't available anymore.
   * \param[in] date_ Point in time (Unix timestamp) when the gift was sent.
   * \param[in] gift_ The gift.
   * \param[in] collection_ids_ Identifiers of collections to which the gift is added; only for the receiver of the gift.
   * \param[in] sell_star_count_ Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user.
   * \param[in] prepaid_upgrade_star_count_ Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
   * \param[in] is_upgrade_separate_ True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
   * \param[in] transfer_star_count_ Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.
   * \param[in] drop_original_details_star_count_ Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift.
   * \param[in] next_transfer_date_ Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift.
   * \param[in] next_resale_date_ Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift.
   * \param[in] export_date_ Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift.
   * \param[in] prepaid_upgrade_hash_ If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
   * \param[in] craft_date_ Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift.
   */
  receivedGift(string const &received_gift_id_, object_ptr<MessageSender> &&sender_id_, object_ptr<formattedText> &&text_, int32 unique_gift_number_, bool is_private_, bool is_saved_, bool is_pinned_, bool can_be_upgraded_, bool can_be_transferred_, bool was_refunded_, int32 date_, object_ptr<SentGift> &&gift_, array<int32> &&collection_ids_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, bool is_upgrade_separate_, int53 transfer_star_count_, int53 drop_original_details_star_count_, int32 next_transfer_date_, int32 next_resale_date_, int32 export_date_, string const &prepaid_upgrade_hash_, int32 craft_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -389770324;

  static object_ptr<receivedGift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class receivedGift;

/**
 * Represents a list of gifts received by a user or a chat.
 */
class receivedGifts final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The total number of received gifts.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of gifts.
  array<object_ptr<receivedGift>> gifts_;
  static jfieldID gifts_fieldID;
  /// True, if notifications about new gifts of the owner are enabled.
  bool are_notifications_enabled_;
  static jfieldID are_notifications_enabled_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of gifts received by a user or a chat.
   */
  receivedGifts();

  /**
   * Represents a list of gifts received by a user or a chat.
   *
   * \param[in] total_count_ The total number of received gifts.
   * \param[in] gifts_ The list of gifts.
   * \param[in] are_notifications_enabled_ True, if notifications about new gifts of the owner are enabled.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  receivedGifts(int32 total_count_, array<object_ptr<receivedGift>> &&gifts_, bool are_notifications_enabled_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1237114400;

  static object_ptr<receivedGifts> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatFolder;

/**
 * Describes a recommended chat folder.
 */
class recommendedChatFolder final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat folder.
  object_ptr<chatFolder> folder_;
  static jfieldID folder_fieldID;
  /// Chat folder description.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Describes a recommended chat folder.
   */
  recommendedChatFolder();

  /**
   * Describes a recommended chat folder.
   *
   * \param[in] folder_ The chat folder.
   * \param[in] description_ Chat folder description.
   */
  recommendedChatFolder(object_ptr<chatFolder> &&folder_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2116569930;

  static object_ptr<recommendedChatFolder> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class recommendedChatFolder;

/**
 * Contains a list of recommended chat folders.
 */
class recommendedChatFolders final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of recommended chat folders.
  array<object_ptr<recommendedChatFolder>> chat_folders_;
  static jfieldID chat_folders_fieldID;

  /**
   * Contains a list of recommended chat folders.
   */
  recommendedChatFolders();

  /**
   * Contains a list of recommended chat folders.
   *
   * \param[in] chat_folders_ List of recommended chat folders.
   */
  explicit recommendedChatFolders(array<object_ptr<recommendedChatFolder>> &&chat_folders_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -739217656;

  static object_ptr<recommendedChatFolders> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about the current recovery email address.
 */
class recoveryEmailAddress final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recovery email address.
  string recovery_email_address_;
  static jfieldID recovery_email_address_fieldID;

  /**
   * Contains information about the current recovery email address.
   */
  recoveryEmailAddress();

  /**
   * Contains information about the current recovery email address.
   *
   * \param[in] recovery_email_address_ Recovery email address.
   */
  explicit recoveryEmailAddress(string const &recovery_email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1290526187;

  static object_ptr<recoveryEmailAddress> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a remote file.
 */
class remoteFile final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the identifier starts with &quot;<a href="http://">http://</a>&quot; or &quot;<a href="https://">https://</a>&quot;, it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile/addFileToDownloads is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and &quot;\#url\#&quot; as the conversion string. Application must generate the file by downloading it to the specified location.
  string id_;
  static jfieldID id_fieldID;
  /// Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time.
  string unique_id_;
  static jfieldID unique_id_fieldID;
  /// True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
  bool is_uploading_active_;
  static jfieldID is_uploading_active_fieldID;
  /// True, if a remote copy is fully available.
  bool is_uploading_completed_;
  static jfieldID is_uploading_completed_fieldID;
  /// Size of the remote available part of the file, in bytes; 0 if unknown.
  int53 uploaded_size_;
  static jfieldID uploaded_size_fieldID;

  /**
   * Represents a remote file.
   */
  remoteFile();

  /**
   * Represents a remote file.
   *
   * \param[in] id_ Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the identifier starts with &quot;<a href="http://">http://</a>&quot; or &quot;<a href="https://">https://</a>&quot;, it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile/addFileToDownloads is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and &quot;\#url\#&quot; as the conversion string. Application must generate the file by downloading it to the specified location.
   * \param[in] unique_id_ Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time.
   * \param[in] is_uploading_active_ True, if the file is currently being uploaded (or a remote copy is being generated by some other means).
   * \param[in] is_uploading_completed_ True, if a remote copy is fully available.
   * \param[in] uploaded_size_ Size of the remote available part of the file, in bytes; 0 if unknown.
   */
  remoteFile(string const &id_, string const &unique_id_, bool is_uploading_active_, bool is_uploading_completed_, int53 uploaded_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 747731030;

  static object_ptr<remoteFile> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class inlineKeyboardButton;

class keyboardButton;

/**
 * This class is an abstract base class.
 * Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots.
 */
class ReplyMarkup: public Object {
 public:
  static jclass Class;

  static object_ptr<ReplyMarkup> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, updateChatReplyMarkup with reply_markup_message == null will be sent.
 */
class replyMarkupRemoveKeyboard final : public ReplyMarkup {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the keyboard is removed only for the mentioned users or the target user of a reply.
  bool is_personal_;
  static jfieldID is_personal_fieldID;

  /**
   * Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, updateChatReplyMarkup with reply_markup_message == null will be sent.
   */
  replyMarkupRemoveKeyboard();

  /**
   * Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, updateChatReplyMarkup with reply_markup_message == null will be sent.
   *
   * \param[in] is_personal_ True, if the keyboard is removed only for the mentioned users or the target user of a reply.
   */
  explicit replyMarkupRemoveKeyboard(bool is_personal_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -691252879;

  static object_ptr<ReplyMarkup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Instructs application to force a reply to this message.
 */
class replyMarkupForceReply final : public ReplyMarkup {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply.
  bool is_personal_;
  static jfieldID is_personal_fieldID;
  /// If non-empty, the placeholder to be shown in the input field when the reply is active; 0-64 characters.
  string input_field_placeholder_;
  static jfieldID input_field_placeholder_fieldID;

  /**
   * Instructs application to force a reply to this message.
   */
  replyMarkupForceReply();

  /**
   * Instructs application to force a reply to this message.
   *
   * \param[in] is_personal_ True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply.
   * \param[in] input_field_placeholder_ If non-empty, the placeholder to be shown in the input field when the reply is active; 0-64 characters.
   */
  replyMarkupForceReply(bool is_personal_, string const &input_field_placeholder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1101461919;

  static object_ptr<ReplyMarkup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a custom keyboard layout to quickly reply to bots.
 */
class replyMarkupShowKeyboard final : public ReplyMarkup {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of rows of bot keyboard buttons.
  array<array<object_ptr<keyboardButton>>> rows_;
  static jfieldID rows_fieldID;
  /// True, if the keyboard is expected to always be shown when the ordinary keyboard is hidden.
  bool is_persistent_;
  static jfieldID is_persistent_fieldID;
  /// True, if the application needs to resize the keyboard vertically.
  bool resize_keyboard_;
  static jfieldID resize_keyboard_fieldID;
  /// True, if the application needs to hide the keyboard after use.
  bool one_time_;
  static jfieldID one_time_fieldID;
  /// True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply.
  bool is_personal_;
  static jfieldID is_personal_fieldID;
  /// If non-empty, the placeholder to be shown in the input field when the keyboard is active; 0-64 characters.
  string input_field_placeholder_;
  static jfieldID input_field_placeholder_fieldID;

  /**
   * Contains a custom keyboard layout to quickly reply to bots.
   */
  replyMarkupShowKeyboard();

  /**
   * Contains a custom keyboard layout to quickly reply to bots.
   *
   * \param[in] rows_ A list of rows of bot keyboard buttons.
   * \param[in] is_persistent_ True, if the keyboard is expected to always be shown when the ordinary keyboard is hidden.
   * \param[in] resize_keyboard_ True, if the application needs to resize the keyboard vertically.
   * \param[in] one_time_ True, if the application needs to hide the keyboard after use.
   * \param[in] is_personal_ True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply.
   * \param[in] input_field_placeholder_ If non-empty, the placeholder to be shown in the input field when the keyboard is active; 0-64 characters.
   */
  replyMarkupShowKeyboard(array<array<object_ptr<keyboardButton>>> &&rows_, bool is_persistent_, bool resize_keyboard_, bool one_time_, bool is_personal_, string const &input_field_placeholder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -791495984;

  static object_ptr<ReplyMarkup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains an inline keyboard layout.
 */
class replyMarkupInlineKeyboard final : public ReplyMarkup {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of rows of inline keyboard buttons.
  array<array<object_ptr<inlineKeyboardButton>>> rows_;
  static jfieldID rows_fieldID;

  /**
   * Contains an inline keyboard layout.
   */
  replyMarkupInlineKeyboard();

  /**
   * Contains an inline keyboard layout.
   *
   * \param[in] rows_ A list of rows of inline keyboard buttons.
   */
  explicit replyMarkupInlineKeyboard(array<array<object_ptr<inlineKeyboardButton>>> &&rows_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -619317658;

  static object_ptr<ReplyMarkup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class reportOption;

/**
 * This class is an abstract base class.
 * Describes result of chat report.
 */
class ReportChatResult: public Object {
 public:
  static jclass Class;

  static object_ptr<ReportChatResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat was reported successfully.
 */
class reportChatResultOk final : public ReportChatResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat was reported successfully.
   */
  reportChatResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1209685373;

  static object_ptr<ReportChatResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must choose an option to report the chat and repeat request with the chosen option.
 */
class reportChatResultOptionRequired final : public ReportChatResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title for the option choice.
  string title_;
  static jfieldID title_fieldID;
  /// List of available options.
  array<object_ptr<reportOption>> options_;
  static jfieldID options_fieldID;

  /**
   * The user must choose an option to report the chat and repeat request with the chosen option.
   */
  reportChatResultOptionRequired();

  /**
   * The user must choose an option to report the chat and repeat request with the chosen option.
   *
   * \param[in] title_ Title for the option choice.
   * \param[in] options_ List of available options.
   */
  reportChatResultOptionRequired(string const &title_, array<object_ptr<reportOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -881375669;

  static object_ptr<ReportChatResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must add additional text details to the report.
 */
class reportChatResultTextRequired final : public ReportChatResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Option identifier for the next reportChat request.
  bytes option_id_;
  static jfieldID option_id_fieldID;
  /// True, if the user can skip text adding.
  bool is_optional_;
  static jfieldID is_optional_fieldID;

  /**
   * The user must add additional text details to the report.
   */
  reportChatResultTextRequired();

  /**
   * The user must add additional text details to the report.
   *
   * \param[in] option_id_ Option identifier for the next reportChat request.
   * \param[in] is_optional_ True, if the user can skip text adding.
   */
  reportChatResultTextRequired(bytes const &option_id_, bool is_optional_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1949552447;

  static object_ptr<ReportChatResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must choose messages to report and repeat the reportChat request with the chosen messages.
 */
class reportChatResultMessagesRequired final : public ReportChatResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user must choose messages to report and repeat the reportChat request with the chosen messages.
   */
  reportChatResultMessagesRequired();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 106043280;

  static object_ptr<ReportChatResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an option to report an entity to Telegram.
 */
class reportOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the option.
  bytes id_;
  static jfieldID id_fieldID;
  /// Text of the option.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Describes an option to report an entity to Telegram.
   */
  reportOption();

  /**
   * Describes an option to report an entity to Telegram.
   *
   * \param[in] id_ Unique identifier of the option.
   * \param[in] text_ Text of the option.
   */
  reportOption(bytes const &id_, string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1106390048;

  static object_ptr<reportOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the reason why a chat is reported.
 */
class ReportReason: public Object {
 public:
  static jclass Class;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat contains spam messages.
 */
class reportReasonSpam final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat contains spam messages.
   */
  reportReasonSpam();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1207032897;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat promotes violence.
 */
class reportReasonViolence final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat promotes violence.
   */
  reportReasonViolence();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2038679353;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat contains pornographic messages.
 */
class reportReasonPornography final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat contains pornographic messages.
   */
  reportReasonPornography();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1306467575;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat has child abuse related content.
 */
class reportReasonChildAbuse final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat has child abuse related content.
   */
  reportReasonChildAbuse();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 761086718;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat contains copyrighted content.
 */
class reportReasonCopyright final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat contains copyrighted content.
   */
  reportReasonCopyright();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1474441135;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The location-based chat is unrelated to its stated location.
 */
class reportReasonUnrelatedLocation final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The location-based chat is unrelated to its stated location.
   */
  reportReasonUnrelatedLocation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 87562288;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat represents a fake account.
 */
class reportReasonFake final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat represents a fake account.
   */
  reportReasonFake();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 352862176;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat has illegal drugs related content.
 */
class reportReasonIllegalDrugs final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat has illegal drugs related content.
   */
  reportReasonIllegalDrugs();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -61599200;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat contains messages with personal details.
 */
class reportReasonPersonalDetails final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The chat contains messages with personal details.
   */
  reportReasonPersonalDetails();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1588882414;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A custom reason provided by the user.
 */
class reportReasonCustom final : public ReportReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A custom reason provided by the user.
   */
  reportReasonCustom();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1380459917;

  static object_ptr<ReportReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class reportOption;

/**
 * This class is an abstract base class.
 * Describes result of sponsored message or chat report.
 */
class ReportSponsoredResult: public Object {
 public:
  static jclass Class;

  static object_ptr<ReportSponsoredResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message was reported successfully.
 */
class reportSponsoredResultOk final : public ReportSponsoredResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The message was reported successfully.
   */
  reportSponsoredResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -128473456;

  static object_ptr<ReportSponsoredResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sponsored message is too old or not found.
 */
class reportSponsoredResultFailed final : public ReportSponsoredResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sponsored message is too old or not found.
   */
  reportSponsoredResultFailed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1231714278;

  static object_ptr<ReportSponsoredResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must choose an option to report the message and repeat request with the chosen option.
 */
class reportSponsoredResultOptionRequired final : public ReportSponsoredResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title for the option choice.
  string title_;
  static jfieldID title_fieldID;
  /// List of available options.
  array<object_ptr<reportOption>> options_;
  static jfieldID options_fieldID;

  /**
   * The user must choose an option to report the message and repeat request with the chosen option.
   */
  reportSponsoredResultOptionRequired();

  /**
   * The user must choose an option to report the message and repeat request with the chosen option.
   *
   * \param[in] title_ Title for the option choice.
   * \param[in] options_ List of available options.
   */
  reportSponsoredResultOptionRequired(string const &title_, array<object_ptr<reportOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1646687318;

  static object_ptr<ReportSponsoredResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Sponsored messages were hidden for the user in all chats.
 */
class reportSponsoredResultAdsHidden final : public ReportSponsoredResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Sponsored messages were hidden for the user in all chats.
   */
  reportSponsoredResultAdsHidden();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -372279531;

  static object_ptr<ReportSponsoredResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user asked to hide sponsored messages, but Telegram Premium is required for this.
 */
class reportSponsoredResultPremiumRequired final : public ReportSponsoredResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user asked to hide sponsored messages, but Telegram Premium is required for this.
   */
  reportSponsoredResultPremiumRequired();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -55411887;

  static object_ptr<ReportSponsoredResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class reportOption;

/**
 * This class is an abstract base class.
 * Describes result of story report.
 */
class ReportStoryResult: public Object {
 public:
  static jclass Class;

  static object_ptr<ReportStoryResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The story was reported successfully.
 */
class reportStoryResultOk final : public ReportStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The story was reported successfully.
   */
  reportStoryResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1405328461;

  static object_ptr<ReportStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must choose an option to report the story and repeat request with the chosen option.
 */
class reportStoryResultOptionRequired final : public ReportStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title for the option choice.
  string title_;
  static jfieldID title_fieldID;
  /// List of available options.
  array<object_ptr<reportOption>> options_;
  static jfieldID options_fieldID;

  /**
   * The user must choose an option to report the story and repeat request with the chosen option.
   */
  reportStoryResultOptionRequired();

  /**
   * The user must choose an option to report the story and repeat request with the chosen option.
   *
   * \param[in] title_ Title for the option choice.
   * \param[in] options_ List of available options.
   */
  reportStoryResultOptionRequired(string const &title_, array<object_ptr<reportOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1632974839;

  static object_ptr<ReportStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user must add additional text details to the report.
 */
class reportStoryResultTextRequired final : public ReportStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Option identifier for the next reportStory request.
  bytes option_id_;
  static jfieldID option_id_fieldID;
  /// True, if the user can skip text adding.
  bool is_optional_;
  static jfieldID is_optional_fieldID;

  /**
   * The user must add additional text details to the report.
   */
  reportStoryResultTextRequired();

  /**
   * The user must add additional text details to the report.
   *
   * \param[in] option_id_ Option identifier for the next reportStory request.
   * \param[in] is_optional_ True, if the user can skip text adding.
   */
  reportStoryResultTextRequired(bytes const &option_id_, bool is_optional_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 334339473;

  static object_ptr<ReportStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the reason why a code needs to be re-sent.
 */
class ResendCodeReason: public Object {
 public:
  static jclass Class;

  static object_ptr<ResendCodeReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user requested to resend the code.
 */
class resendCodeReasonUserRequest final : public ResendCodeReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user requested to resend the code.
   */
  resendCodeReasonUserRequest();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -441923456;

  static object_ptr<ResendCodeReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The code is re-sent, because device verification has failed.
 */
class resendCodeReasonVerificationFailed final : public ResendCodeReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Cause of the verification failure, for example, &quot;PLAY_SERVICES_NOT_AVAILABLE&quot;, &quot;APNS_RECEIVE_TIMEOUT&quot;, or &quot;APNS_INIT_FAILED&quot;.
  string error_message_;
  static jfieldID error_message_fieldID;

  /**
   * The code is re-sent, because device verification has failed.
   */
  resendCodeReasonVerificationFailed();

  /**
   * The code is re-sent, because device verification has failed.
   *
   * \param[in] error_message_ Cause of the verification failure, for example, &quot;PLAY_SERVICES_NOT_AVAILABLE&quot;, &quot;APNS_RECEIVE_TIMEOUT&quot;, or &quot;APNS_INIT_FAILED&quot;.
   */
  explicit resendCodeReasonVerificationFailed(string const &error_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 529870273;

  static object_ptr<ResendCodeReason> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents result of 2-step verification password reset.
 */
class ResetPasswordResult: public Object {
 public:
  static jclass Class;

  static object_ptr<ResetPasswordResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The password was reset.
 */
class resetPasswordResultOk final : public ResetPasswordResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The password was reset.
   */
  resetPasswordResultOk();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1397267463;

  static object_ptr<ResetPasswordResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The password reset request is pending.
 */
class resetPasswordResultPending final : public ResetPasswordResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) after which the password can be reset immediately using resetPassword.
  int32 pending_reset_date_;
  static jfieldID pending_reset_date_fieldID;

  /**
   * The password reset request is pending.
   */
  resetPasswordResultPending();

  /**
   * The password reset request is pending.
   *
   * \param[in] pending_reset_date_ Point in time (Unix timestamp) after which the password can be reset immediately using resetPassword.
   */
  explicit resetPasswordResultPending(int32 pending_reset_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1193925721;

  static object_ptr<ResetPasswordResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The password reset request was declined.
 */
class resetPasswordResultDeclined final : public ResetPasswordResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the password reset can be retried.
  int32 retry_date_;
  static jfieldID retry_date_fieldID;

  /**
   * The password reset request was declined.
   */
  resetPasswordResultDeclined();

  /**
   * The password reset request was declined.
   *
   * \param[in] retry_date_ Point in time (Unix timestamp) when the password reset can be retried.
   */
  explicit resetPasswordResultDeclined(int32 retry_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1202200373;

  static object_ptr<ResetPasswordResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about restrictions that must be applied to a chat or a message.
 */
class restrictionInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway.
  string restriction_reason_;
  static jfieldID restriction_reason_fieldID;
  /// True, if media content of the messages must be hidden with 18+ spoiler. Use value of the option &quot;can_ignore_sensitive_content_restrictions&quot; to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option &quot;ignore_sensitive_content_restrictions&quot; to true if the user passes age verification.
  bool has_sensitive_content_;
  static jfieldID has_sensitive_content_fieldID;

  /**
   * Contains information about restrictions that must be applied to a chat or a message.
   */
  restrictionInfo();

  /**
   * Contains information about restrictions that must be applied to a chat or a message.
   *
   * \param[in] restriction_reason_ A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway.
   * \param[in] has_sensitive_content_ True, if media content of the messages must be hidden with 18+ spoiler. Use value of the option &quot;can_ignore_sensitive_content_restrictions&quot; to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option &quot;ignore_sensitive_content_restrictions&quot; to true if the user passes age verification.
   */
  restrictionInfo(string const &restriction_reason_, bool has_sensitive_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1980541683;

  static object_ptr<restrictionInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes state of a revenue withdrawal.
 */
class RevenueWithdrawalState: public Object {
 public:
  static jclass Class;

  static object_ptr<RevenueWithdrawalState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Withdrawal is pending.
 */
class revenueWithdrawalStatePending final : public RevenueWithdrawalState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Withdrawal is pending.
   */
  revenueWithdrawalStatePending();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1563512741;

  static object_ptr<RevenueWithdrawalState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Withdrawal succeeded.
 */
class revenueWithdrawalStateSucceeded final : public RevenueWithdrawalState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the withdrawal was completed.
  int32 date_;
  static jfieldID date_fieldID;
  /// The URL where the withdrawal transaction can be viewed.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Withdrawal succeeded.
   */
  revenueWithdrawalStateSucceeded();

  /**
   * Withdrawal succeeded.
   *
   * \param[in] date_ Point in time (Unix timestamp) when the withdrawal was completed.
   * \param[in] url_ The URL where the withdrawal transaction can be viewed.
   */
  revenueWithdrawalStateSucceeded(int32 date_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 265375242;

  static object_ptr<RevenueWithdrawalState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Withdrawal failed.
 */
class revenueWithdrawalStateFailed final : public RevenueWithdrawalState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Withdrawal failed.
   */
  revenueWithdrawalStateFailed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -12504951;

  static object_ptr<RevenueWithdrawalState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class RichText;

class document;

/**
 * This class is an abstract base class.
 * Describes a formatted text object.
 */
class RichText: public Object {
 public:
  static jclass Class;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A plain text.
 */
class richTextPlain final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  string text_;
  static jfieldID text_fieldID;

  /**
   * A plain text.
   */
  richTextPlain();

  /**
   * A plain text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextPlain(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 482617702;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bold rich text.
 */
class richTextBold final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A bold rich text.
   */
  richTextBold();

  /**
   * A bold rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextBold(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1670844268;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An italicized rich text.
 */
class richTextItalic final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * An italicized rich text.
   */
  richTextItalic();

  /**
   * An italicized rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextItalic(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1853354047;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An underlined rich text.
 */
class richTextUnderline final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * An underlined rich text.
   */
  richTextUnderline();

  /**
   * An underlined rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextUnderline(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -536019572;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A strikethrough rich text.
 */
class richTextStrikethrough final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A strikethrough rich text.
   */
  richTextStrikethrough();

  /**
   * A strikethrough rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextStrikethrough(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 723413585;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A fixed-width rich text.
 */
class richTextFixed final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A fixed-width rich text.
   */
  richTextFixed();

  /**
   * A fixed-width rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextFixed(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1271496249;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rich text URL link.
 */
class richTextUrl final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// URL.
  string url_;
  static jfieldID url_fieldID;
  /// True, if the URL has cached instant view server-side.
  bool is_cached_;
  static jfieldID is_cached_fieldID;

  /**
   * A rich text URL link.
   */
  richTextUrl();

  /**
   * A rich text URL link.
   *
   * \param[in] text_ Text.
   * \param[in] url_ URL.
   * \param[in] is_cached_ True, if the URL has cached instant view server-side.
   */
  richTextUrl(object_ptr<RichText> &&text_, string const &url_, bool is_cached_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 83939092;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rich text email link.
 */
class richTextEmailAddress final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// Email address.
  string email_address_;
  static jfieldID email_address_fieldID;

  /**
   * A rich text email link.
   */
  richTextEmailAddress();

  /**
   * A rich text email link.
   *
   * \param[in] text_ Text.
   * \param[in] email_address_ Email address.
   */
  richTextEmailAddress(object_ptr<RichText> &&text_, string const &email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 40018679;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A subscript rich text.
 */
class richTextSubscript final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A subscript rich text.
   */
  richTextSubscript();

  /**
   * A subscript rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextSubscript(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -868197812;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A superscript rich text.
 */
class richTextSuperscript final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A superscript rich text.
   */
  richTextSuperscript();

  /**
   * A superscript rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextSuperscript(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -382241437;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A marked rich text.
 */
class richTextMarked final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;

  /**
   * A marked rich text.
   */
  richTextMarked();

  /**
   * A marked rich text.
   *
   * \param[in] text_ Text.
   */
  explicit richTextMarked(object_ptr<RichText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1271999614;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rich text phone number.
 */
class richTextPhoneNumber final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// Phone number.
  string phone_number_;
  static jfieldID phone_number_fieldID;

  /**
   * A rich text phone number.
   */
  richTextPhoneNumber();

  /**
   * A rich text phone number.
   *
   * \param[in] text_ Text.
   * \param[in] phone_number_ Phone number.
   */
  richTextPhoneNumber(object_ptr<RichText> &&text_, string const &phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 128521539;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A small image inside the text.
 */
class richTextIcon final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The image represented as a document. The image can be in GIF, JPEG or PNG format.
  object_ptr<document> document_;
  static jfieldID document_fieldID;
  /// Width of a bounding box in which the image must be shown; 0 if unknown.
  int32 width_;
  static jfieldID width_fieldID;
  /// Height of a bounding box in which the image must be shown; 0 if unknown.
  int32 height_;
  static jfieldID height_fieldID;

  /**
   * A small image inside the text.
   */
  richTextIcon();

  /**
   * A small image inside the text.
   *
   * \param[in] document_ The image represented as a document. The image can be in GIF, JPEG or PNG format.
   * \param[in] width_ Width of a bounding box in which the image must be shown; 0 if unknown.
   * \param[in] height_ Height of a bounding box in which the image must be shown; 0 if unknown.
   */
  richTextIcon(object_ptr<document> &&document_, int32 width_, int32 height_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1480316158;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A reference to a richTexts object on the same page.
 */
class richTextReference final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// The name of a richTextAnchor object, which is the first element of the target richTexts object.
  string anchor_name_;
  static jfieldID anchor_name_fieldID;
  /// An HTTP URL, opening the reference.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A reference to a richTexts object on the same page.
   */
  richTextReference();

  /**
   * A reference to a richTexts object on the same page.
   *
   * \param[in] text_ The text.
   * \param[in] anchor_name_ The name of a richTextAnchor object, which is the first element of the target richTexts object.
   * \param[in] url_ An HTTP URL, opening the reference.
   */
  richTextReference(object_ptr<RichText> &&text_, string const &anchor_name_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1147530634;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An anchor.
 */
class richTextAnchor final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Anchor name.
  string name_;
  static jfieldID name_fieldID;

  /**
   * An anchor.
   */
  richTextAnchor();

  /**
   * An anchor.
   *
   * \param[in] name_ Anchor name.
   */
  explicit richTextAnchor(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1316950068;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A link to an anchor on the same page.
 */
class richTextAnchorLink final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link text.
  object_ptr<RichText> text_;
  static jfieldID text_fieldID;
  /// The anchor name. If the name is empty, the link must bring back to top.
  string anchor_name_;
  static jfieldID anchor_name_fieldID;
  /// An HTTP URL, opening the anchor.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A link to an anchor on the same page.
   */
  richTextAnchorLink();

  /**
   * A link to an anchor on the same page.
   *
   * \param[in] text_ The link text.
   * \param[in] anchor_name_ The anchor name. If the name is empty, the link must bring back to top.
   * \param[in] url_ An HTTP URL, opening the anchor.
   */
  richTextAnchorLink(object_ptr<RichText> &&text_, string const &anchor_name_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1541418282;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A concatenation of rich texts.
 */
class richTexts final : public RichText {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Texts.
  array<object_ptr<RichText>> texts_;
  static jfieldID texts_fieldID;

  /**
   * A concatenation of rich texts.
   */
  richTexts();

  /**
   * A concatenation of rich texts.
   *
   * \param[in] texts_ Texts.
   */
  explicit richTexts(array<object_ptr<RichText>> &&texts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1647457821;

  static object_ptr<RichText> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents an RTMP URL.
 */
class rtmpUrl final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The URL.
  string url_;
  static jfieldID url_fieldID;
  /// Stream key.
  string stream_key_;
  static jfieldID stream_key_fieldID;

  /**
   * Represents an RTMP URL.
   */
  rtmpUrl();

  /**
   * Represents an RTMP URL.
   *
   * \param[in] url_ The URL.
   * \param[in] stream_key_ Stream key.
   */
  rtmpUrl(string const &url_, string const &stream_key_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1009302613;

  static object_ptr<rtmpUrl> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about saved payment credentials.
 */
class savedCredentials final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the saved credentials.
  string id_;
  static jfieldID id_fieldID;
  /// Title of the saved credentials.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Contains information about saved payment credentials.
   */
  savedCredentials();

  /**
   * Contains information about saved payment credentials.
   *
   * \param[in] id_ Unique identifier of the saved credentials.
   * \param[in] title_ Title of the saved credentials.
   */
  savedCredentials(string const &id_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -370273060;

  static object_ptr<savedCredentials> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

/**
 * Represents a tag used in Saved Messages or a Saved Messages topic.
 */
class savedMessagesTag final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The tag.
  object_ptr<ReactionType> tag_;
  static jfieldID tag_fieldID;
  /// Label of the tag; 0-12 characters. Always empty if the tag is returned for a Saved Messages topic.
  string label_;
  static jfieldID label_fieldID;
  /// Number of times the tag was used; may be 0 if the tag has non-empty label.
  int32 count_;
  static jfieldID count_fieldID;

  /**
   * Represents a tag used in Saved Messages or a Saved Messages topic.
   */
  savedMessagesTag();

  /**
   * Represents a tag used in Saved Messages or a Saved Messages topic.
   *
   * \param[in] tag_ The tag.
   * \param[in] label_ Label of the tag; 0-12 characters. Always empty if the tag is returned for a Saved Messages topic.
   * \param[in] count_ Number of times the tag was used; may be 0 if the tag has non-empty label.
   */
  savedMessagesTag(object_ptr<ReactionType> &&tag_, string const &label_, int32 count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1785183329;

  static object_ptr<savedMessagesTag> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class savedMessagesTag;

/**
 * Contains a list of tags used in Saved Messages.
 */
class savedMessagesTags final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of tags.
  array<object_ptr<savedMessagesTag>> tags_;
  static jfieldID tags_fieldID;

  /**
   * Contains a list of tags used in Saved Messages.
   */
  savedMessagesTags();

  /**
   * Contains a list of tags used in Saved Messages.
   *
   * \param[in] tags_ List of tags.
   */
  explicit savedMessagesTags(array<object_ptr<savedMessagesTag>> &&tags_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1749291430;

  static object_ptr<savedMessagesTags> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SavedMessagesTopicType;

class draftMessage;

class message;

/**
 * Contains information about a Saved Messages topic.
 */
class savedMessagesTopic final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique topic identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// Type of the topic.
  object_ptr<SavedMessagesTopicType> type_;
  static jfieldID type_fieldID;
  /// True, if the topic is pinned.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;
  /// A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order.
  int64 order_;
  static jfieldID order_fieldID;
  /// Last message in the topic; may be null if none or unknown.
  object_ptr<message> last_message_;
  static jfieldID last_message_fieldID;
  /// A draft of a message in the topic; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;

  /**
   * Contains information about a Saved Messages topic.
   */
  savedMessagesTopic();

  /**
   * Contains information about a Saved Messages topic.
   *
   * \param[in] id_ Unique topic identifier.
   * \param[in] type_ Type of the topic.
   * \param[in] is_pinned_ True, if the topic is pinned.
   * \param[in] order_ A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order.
   * \param[in] last_message_ Last message in the topic; may be null if none or unknown.
   * \param[in] draft_message_ A draft of a message in the topic; may be null if none.
   */
  savedMessagesTopic(int53 id_, object_ptr<SavedMessagesTopicType> &&type_, bool is_pinned_, int64 order_, object_ptr<message> &&last_message_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -760684124;

  static object_ptr<savedMessagesTopic> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of Saved Messages topic.
 */
class SavedMessagesTopicType: public Object {
 public:
  static jclass Class;

  static object_ptr<SavedMessagesTopicType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Topic containing messages sent by the current user of forwarded from an unknown chat.
 */
class savedMessagesTopicTypeMyNotes final : public SavedMessagesTopicType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Topic containing messages sent by the current user of forwarded from an unknown chat.
   */
  savedMessagesTopicTypeMyNotes();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1282784779;

  static object_ptr<SavedMessagesTopicType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Topic containing messages forwarded from a user with hidden privacy.
 */
class savedMessagesTopicTypeAuthorHidden final : public SavedMessagesTopicType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Topic containing messages forwarded from a user with hidden privacy.
   */
  savedMessagesTopicTypeAuthorHidden();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1882997141;

  static object_ptr<SavedMessagesTopicType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Topic containing messages forwarded from a specific chat.
 */
class savedMessagesTopicTypeSavedFromChat final : public SavedMessagesTopicType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Topic containing messages forwarded from a specific chat.
   */
  savedMessagesTopicTypeSavedFromChat();

  /**
   * Topic containing messages forwarded from a specific chat.
   *
   * \param[in] chat_id_ Identifier of the chat.
   */
  explicit savedMessagesTopicTypeSavedFromChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1723880104;

  static object_ptr<SavedMessagesTopicType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains autosave settings for an autosave settings scope.
 */
class scopeAutosaveSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if photo autosave is enabled.
  bool autosave_photos_;
  static jfieldID autosave_photos_fieldID;
  /// True, if video autosave is enabled.
  bool autosave_videos_;
  static jfieldID autosave_videos_fieldID;
  /// The maximum size of a video file to be autosaved, in bytes; 512 KB - 4000 MB.
  int53 max_video_file_size_;
  static jfieldID max_video_file_size_fieldID;

  /**
   * Contains autosave settings for an autosave settings scope.
   */
  scopeAutosaveSettings();

  /**
   * Contains autosave settings for an autosave settings scope.
   *
   * \param[in] autosave_photos_ True, if photo autosave is enabled.
   * \param[in] autosave_videos_ True, if video autosave is enabled.
   * \param[in] max_video_file_size_ The maximum size of a video file to be autosaved, in bytes; 512 KB - 4000 MB.
   */
  scopeAutosaveSettings(bool autosave_photos_, bool autosave_videos_, int53 max_video_file_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1546821427;

  static object_ptr<scopeAutosaveSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about notification settings for several chats.
 */
class scopeNotificationSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Time left before notifications will be unmuted, in seconds.
  int32 mute_for_;
  static jfieldID mute_for_fieldID;
  /// Identifier of the notification sound to be played; 0 if sound is disabled; pass -1 to use the app-dependent default sound.
  int64 sound_id_;
  static jfieldID sound_id_fieldID;
  /// True, if message content must be displayed in notifications.
  bool show_preview_;
  static jfieldID show_preview_fieldID;
  /// If true, story notifications are received only for the first 5 chats from topChatCategoryUsers regardless of the value of mute_stories.
  bool use_default_mute_stories_;
  static jfieldID use_default_mute_stories_fieldID;
  /// True, if story notifications are disabled.
  bool mute_stories_;
  static jfieldID mute_stories_fieldID;
  /// Identifier of the notification sound to be played for stories; 0 if sound is disabled; pass -1 to use the app-dependent default sound.
  int64 story_sound_id_;
  static jfieldID story_sound_id_fieldID;
  /// True, if the chat that posted a story must be displayed in notifications.
  bool show_story_poster_;
  static jfieldID show_story_poster_fieldID;
  /// True, if notifications for incoming pinned messages will be created as for an ordinary unread message.
  bool disable_pinned_message_notifications_;
  static jfieldID disable_pinned_message_notifications_fieldID;
  /// True, if notifications for messages with mentions will be created as for an ordinary unread message.
  bool disable_mention_notifications_;
  static jfieldID disable_mention_notifications_fieldID;

  /**
   * Contains information about notification settings for several chats.
   */
  scopeNotificationSettings();

  /**
   * Contains information about notification settings for several chats.
   *
   * \param[in] mute_for_ Time left before notifications will be unmuted, in seconds.
   * \param[in] sound_id_ Identifier of the notification sound to be played; 0 if sound is disabled; pass -1 to use the app-dependent default sound.
   * \param[in] show_preview_ True, if message content must be displayed in notifications.
   * \param[in] use_default_mute_stories_ If true, story notifications are received only for the first 5 chats from topChatCategoryUsers regardless of the value of mute_stories.
   * \param[in] mute_stories_ True, if story notifications are disabled.
   * \param[in] story_sound_id_ Identifier of the notification sound to be played for stories; 0 if sound is disabled; pass -1 to use the app-dependent default sound.
   * \param[in] show_story_poster_ True, if the chat that posted a story must be displayed in notifications.
   * \param[in] disable_pinned_message_notifications_ True, if notifications for incoming pinned messages will be created as for an ordinary unread message.
   * \param[in] disable_mention_notifications_ True, if notifications for messages with mentions will be created as for an ordinary unread message.
   */
  scopeNotificationSettings(int32 mute_for_, int64 sound_id_, bool show_preview_, bool use_default_mute_stories_, bool mute_stories_, int64 story_sound_id_, bool show_story_poster_, bool disable_pinned_message_notifications_, bool disable_mention_notifications_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 88369150;

  static object_ptr<scopeNotificationSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents a filter for type of the chats in which to search messages.
 */
class SearchMessagesChatTypeFilter: public Object {
 public:
  static jclass Class;

  static object_ptr<SearchMessagesChatTypeFilter> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages in private chats.
 */
class searchMessagesChatTypeFilterPrivate final : public SearchMessagesChatTypeFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages in private chats.
   */
  searchMessagesChatTypeFilterPrivate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1169248975;

  static object_ptr<SearchMessagesChatTypeFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages in basic group and supergroup chats.
 */
class searchMessagesChatTypeFilterGroup final : public SearchMessagesChatTypeFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages in basic group and supergroup chats.
   */
  searchMessagesChatTypeFilterGroup();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2059426022;

  static object_ptr<SearchMessagesChatTypeFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages in channel chats.
 */
class searchMessagesChatTypeFilterChannel final : public SearchMessagesChatTypeFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages in channel chats.
   */
  searchMessagesChatTypeFilterChannel();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -773540139;

  static object_ptr<SearchMessagesChatTypeFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents a filter for message search results.
 */
class SearchMessagesFilter: public Object {
 public:
  static jclass Class;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns all found messages, no filter is applied.
 */
class searchMessagesFilterEmpty final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns all found messages, no filter is applied.
   */
  searchMessagesFilterEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -869395657;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only animation messages.
 */
class searchMessagesFilterAnimation final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only animation messages.
   */
  searchMessagesFilterAnimation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -155713339;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only audio messages.
 */
class searchMessagesFilterAudio final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only audio messages.
   */
  searchMessagesFilterAudio();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 867505275;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only document messages.
 */
class searchMessagesFilterDocument final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only document messages.
   */
  searchMessagesFilterDocument();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1526331215;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only photo messages.
 */
class searchMessagesFilterPhoto final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only photo messages.
   */
  searchMessagesFilterPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 925932293;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only poll messages.
 */
class searchMessagesFilterPoll final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only poll messages.
   */
  searchMessagesFilterPoll();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -891598785;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only video messages.
 */
class searchMessagesFilterVideo final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only video messages.
   */
  searchMessagesFilterVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 115538222;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only voice note messages.
 */
class searchMessagesFilterVoiceNote final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only voice note messages.
   */
  searchMessagesFilterVoiceNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1841439357;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only photo and video messages.
 */
class searchMessagesFilterPhotoAndVideo final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only photo and video messages.
   */
  searchMessagesFilterPhotoAndVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1352130963;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages containing URLs.
 */
class searchMessagesFilterUrl final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages containing URLs.
   */
  searchMessagesFilterUrl();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1828724341;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages containing chat photos.
 */
class searchMessagesFilterChatPhoto final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages containing chat photos.
   */
  searchMessagesFilterChatPhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1247751329;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only video note messages.
 */
class searchMessagesFilterVideoNote final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only video note messages.
   */
  searchMessagesFilterVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 564323321;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only voice and video note messages.
 */
class searchMessagesFilterVoiceAndVideoNote final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only voice and video note messages.
   */
  searchMessagesFilterVoiceAndVideoNote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 664174819;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages with mentions of the current user, or messages that are replies to their messages.
 */
class searchMessagesFilterMention final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages with mentions of the current user, or messages that are replies to their messages.
   */
  searchMessagesFilterMention();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2001258652;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query or by the sending user.
 */
class searchMessagesFilterUnreadMention final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query or by the sending user.
   */
  searchMessagesFilterUnreadMention();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -95769149;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages with unread reactions for the current user. When using this filter the results can't be additionally filtered by a query or by the sending user.
 */
class searchMessagesFilterUnreadReaction final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages with unread reactions for the current user. When using this filter the results can't be additionally filtered by a query or by the sending user.
   */
  searchMessagesFilterUnreadReaction();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1379651328;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only messages with unread poll votes for the current user. When using this filter the results can't be additionally filtered by a query or by the sending user.
 */
class searchMessagesFilterUnreadPollVote final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only messages with unread poll votes for the current user. When using this filter the results can't be additionally filtered by a query or by the sending user.
   */
  searchMessagesFilterUnreadPollVote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -161318950;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only failed to send messages. This filter can be used only if the message database is used.
 */
class searchMessagesFilterFailedToSend final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only failed to send messages. This filter can be used only if the message database is used.
   */
  searchMessagesFilterFailedToSend();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -596322564;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns only pinned messages.
 */
class searchMessagesFilterPinned final : public SearchMessagesFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns only pinned messages.
   */
  searchMessagesFilterPinned();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 371805512;

  static object_ptr<SearchMessagesFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a value representing a number of seconds.
 */
class seconds final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of seconds.
  double seconds_;
  static jfieldID seconds_fieldID;

  /**
   * Contains a value representing a number of seconds.
   */
  seconds();

  /**
   * Contains a value representing a number of seconds.
   *
   * \param[in] seconds_ Number of seconds.
   */
  explicit seconds(double seconds_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 959899022;

  static object_ptr<seconds> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SecretChatState;

/**
 * Represents a secret chat.
 */
class secretChat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Secret chat identifier.
  int32 id_;
  static jfieldID id_fieldID;
  /// Identifier of the chat partner.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// State of the secret chat.
  object_ptr<SecretChatState> state_;
  static jfieldID state_fieldID;
  /// True, if the chat was created by the current user; false otherwise.
  bool is_outbound_;
  static jfieldID is_outbound_fieldID;
  /// Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers.
  bytes key_hash_;
  static jfieldID key_hash_fieldID;
  /// Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer &gt;= 101, files bigger than 2000MB are supported if the layer &gt;= 143, spoiler and custom emoji text entities are supported if the layer &gt;= 144.
  int32 layer_;
  static jfieldID layer_fieldID;

  /**
   * Represents a secret chat.
   */
  secretChat();

  /**
   * Represents a secret chat.
   *
   * \param[in] id_ Secret chat identifier.
   * \param[in] user_id_ Identifier of the chat partner.
   * \param[in] state_ State of the secret chat.
   * \param[in] is_outbound_ True, if the chat was created by the current user; false otherwise.
   * \param[in] key_hash_ Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers.
   * \param[in] layer_ Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer &gt;= 101, files bigger than 2000MB are supported if the layer &gt;= 143, spoiler and custom emoji text entities are supported if the layer &gt;= 144.
   */
  secretChat(int32 id_, int53 user_id_, object_ptr<SecretChatState> &&state_, bool is_outbound_, bytes const &key_hash_, int32 layer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -676918325;

  static object_ptr<secretChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the current secret chat state.
 */
class SecretChatState: public Object {
 public:
  static jclass Class;

  static object_ptr<SecretChatState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The secret chat is not yet created; waiting for the other user to get online.
 */
class secretChatStatePending final : public SecretChatState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The secret chat is not yet created; waiting for the other user to get online.
   */
  secretChatStatePending();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1637050756;

  static object_ptr<SecretChatState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The secret chat is ready to use.
 */
class secretChatStateReady final : public SecretChatState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The secret chat is ready to use.
   */
  secretChatStateReady();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1611352087;

  static object_ptr<SecretChatState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The secret chat is closed.
 */
class secretChatStateClosed final : public SecretChatState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The secret chat is closed.
   */
  secretChatStateClosed();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1945106707;

  static object_ptr<SecretChatState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class gift;

class upgradedGift;

/**
 * This class is an abstract base class.
 * Represents content of a gift received by a user or a channel chat.
 */
class SentGift: public Object {
 public:
  static jclass Class;

  static object_ptr<SentGift> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Regular gift.
 */
class sentGiftRegular final : public SentGift {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;

  /**
   * Regular gift.
   */
  sentGiftRegular();

  /**
   * Regular gift.
   *
   * \param[in] gift_ The gift.
   */
  explicit sentGiftRegular(object_ptr<gift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 594062617;

  static object_ptr<SentGift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Upgraded gift.
 */
class sentGiftUpgraded final : public SentGift {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * Upgraded gift.
   */
  sentGiftUpgraded();

  /**
   * Upgraded gift.
   *
   * \param[in] gift_ The gift.
   */
  explicit sentGiftUpgraded(object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 627524736;

  static object_ptr<SentGift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SessionType;

/**
 * Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.
 */
class session final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Session identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// True, if this session is the current session.
  bool is_current_;
  static jfieldID is_current_fieldID;
  /// True, if a 2-step verification password is needed to complete authorization of the session.
  bool is_password_pending_;
  static jfieldID is_password_pending_fieldID;
  /// True, if the session wasn't confirmed from another session.
  bool is_unconfirmed_;
  static jfieldID is_unconfirmed_fieldID;
  /// True, if incoming secret chats can be accepted by the session.
  bool can_accept_secret_chats_;
  static jfieldID can_accept_secret_chats_fieldID;
  /// True, if incoming calls can be accepted by the session.
  bool can_accept_calls_;
  static jfieldID can_accept_calls_fieldID;
  /// Session type based on the system and application version, which can be used to display a corresponding icon.
  object_ptr<SessionType> type_;
  static jfieldID type_fieldID;
  /// Telegram API identifier, as provided by the application.
  int32 api_id_;
  static jfieldID api_id_fieldID;
  /// Name of the application, as provided by the application.
  string application_name_;
  static jfieldID application_name_fieldID;
  /// The version of the application, as provided by the application.
  string application_version_;
  static jfieldID application_version_fieldID;
  /// True, if the application is an official application or uses the api_id of an official application.
  bool is_official_application_;
  static jfieldID is_official_application_fieldID;
  /// Model of the device the application has been run or is running on, as provided by the application.
  string device_model_;
  static jfieldID device_model_fieldID;
  /// Operating system the application has been run or is running on, as provided by the application.
  string platform_;
  static jfieldID platform_fieldID;
  /// Version of the operating system the application has been run or is running on, as provided by the application.
  string system_version_;
  static jfieldID system_version_fieldID;
  /// Point in time (Unix timestamp) when the user has logged in.
  int32 log_in_date_;
  static jfieldID log_in_date_fieldID;
  /// Point in time (Unix timestamp) when the session was last used.
  int32 last_active_date_;
  static jfieldID last_active_date_fieldID;
  /// IP address from which the session was created, in human-readable format.
  string ip_address_;
  static jfieldID ip_address_fieldID;
  /// A human-readable description of the location from which the session was created, based on the IP address.
  string location_;
  static jfieldID location_fieldID;

  /**
   * Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.
   */
  session();

  /**
   * Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.
   *
   * \param[in] id_ Session identifier.
   * \param[in] is_current_ True, if this session is the current session.
   * \param[in] is_password_pending_ True, if a 2-step verification password is needed to complete authorization of the session.
   * \param[in] is_unconfirmed_ True, if the session wasn't confirmed from another session.
   * \param[in] can_accept_secret_chats_ True, if incoming secret chats can be accepted by the session.
   * \param[in] can_accept_calls_ True, if incoming calls can be accepted by the session.
   * \param[in] type_ Session type based on the system and application version, which can be used to display a corresponding icon.
   * \param[in] api_id_ Telegram API identifier, as provided by the application.
   * \param[in] application_name_ Name of the application, as provided by the application.
   * \param[in] application_version_ The version of the application, as provided by the application.
   * \param[in] is_official_application_ True, if the application is an official application or uses the api_id of an official application.
   * \param[in] device_model_ Model of the device the application has been run or is running on, as provided by the application.
   * \param[in] platform_ Operating system the application has been run or is running on, as provided by the application.
   * \param[in] system_version_ Version of the operating system the application has been run or is running on, as provided by the application.
   * \param[in] log_in_date_ Point in time (Unix timestamp) when the user has logged in.
   * \param[in] last_active_date_ Point in time (Unix timestamp) when the session was last used.
   * \param[in] ip_address_ IP address from which the session was created, in human-readable format.
   * \param[in] location_ A human-readable description of the location from which the session was created, based on the IP address.
   */
  session(int64 id_, bool is_current_, bool is_password_pending_, bool is_unconfirmed_, bool can_accept_secret_chats_, bool can_accept_calls_, object_ptr<SessionType> &&type_, int32 api_id_, string const &application_name_, string const &application_version_, bool is_official_application_, string const &device_model_, string const &platform_, string const &system_version_, int32 log_in_date_, int32 last_active_date_, string const &ip_address_, string const &location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 158702140;

  static object_ptr<session> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the type of session.
 */
class SessionType: public Object {
 public:
  static jclass Class;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on an Android device.
 */
class sessionTypeAndroid final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on an Android device.
   */
  sessionTypeAndroid();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2071764840;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on a generic Apple device.
 */
class sessionTypeApple final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on a generic Apple device.
   */
  sessionTypeApple();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1818635701;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Brave browser.
 */
class sessionTypeBrave final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Brave browser.
   */
  sessionTypeBrave();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1216812563;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Chrome browser.
 */
class sessionTypeChrome final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Chrome browser.
   */
  sessionTypeChrome();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1573464425;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Edge browser.
 */
class sessionTypeEdge final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Edge browser.
   */
  sessionTypeEdge();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -538916005;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Firefox browser.
 */
class sessionTypeFirefox final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Firefox browser.
   */
  sessionTypeFirefox();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2122579364;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on an iPad device.
 */
class sessionTypeIpad final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on an iPad device.
   */
  sessionTypeIpad();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1294647023;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on an iPhone device.
 */
class sessionTypeIphone final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on an iPhone device.
   */
  sessionTypeIphone();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 97616573;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on a Linux device.
 */
class sessionTypeLinux final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on a Linux device.
   */
  sessionTypeLinux();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1487422871;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on a Mac device.
 */
class sessionTypeMac final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on a Mac device.
   */
  sessionTypeMac();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -612250975;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Opera browser.
 */
class sessionTypeOpera final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Opera browser.
   */
  sessionTypeOpera();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1463673734;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Safari browser.
 */
class sessionTypeSafari final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Safari browser.
   */
  sessionTypeSafari();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 710646873;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on an Ubuntu device.
 */
class sessionTypeUbuntu final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on an Ubuntu device.
   */
  sessionTypeUbuntu();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1569680069;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on an unknown type of device.
 */
class sessionTypeUnknown final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on an unknown type of device.
   */
  sessionTypeUnknown();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 233926704;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on the Vivaldi browser.
 */
class sessionTypeVivaldi final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on the Vivaldi browser.
   */
  sessionTypeVivaldi();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1120503279;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on a Windows device.
 */
class sessionTypeWindows final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on a Windows device.
   */
  sessionTypeWindows();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1676512600;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The session is running on an Xbox console.
 */
class sessionTypeXbox final : public SessionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The session is running on an Xbox console.
   */
  sessionTypeXbox();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1856216492;

  static object_ptr<SessionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class session;

/**
 * Contains a list of sessions.
 */
class sessions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of sessions.
  array<object_ptr<session>> sessions_;
  static jfieldID sessions_fieldID;
  /// Number of days of inactivity before sessions will automatically be terminated; 1-366 days.
  int32 inactive_session_ttl_days_;
  static jfieldID inactive_session_ttl_days_fieldID;

  /**
   * Contains a list of sessions.
   */
  sessions();

  /**
   * Contains a list of sessions.
   *
   * \param[in] sessions_ List of sessions.
   * \param[in] inactive_session_ttl_days_ Number of days of inactivity before sessions will automatically be terminated; 1-366 days.
   */
  sessions(array<object_ptr<session>> &&sessions_, int32 inactive_session_ttl_days_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 842912274;

  static object_ptr<sessions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a section of the application settings.
 */
class SettingsSection: public Object {
 public:
  static jclass Class;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The appearance section.
 */
class settingsSectionAppearance final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;themes&quot;, &quot;themes/edit&quot;, &quot;themes/create&quot;, &quot;wallpapers&quot;, &quot;wallpapers/edit&quot;, &quot;wallpapers/set&quot;, &quot;wallpapers/choose-photo&quot;, &quot;your-color/profile&quot;, &quot;your-color/profile/add-icons&quot;, &quot;your-color/profile/use-gift&quot;, &quot;your-color/profile/reset&quot;, &quot;your-color/name&quot;, &quot;your-color/name/add-icons&quot;, &quot;your-color/name/use-gift&quot;, &quot;night-mode&quot;, &quot;auto-night-mode&quot;, &quot;text-size&quot;, &quot;text-size/use-system&quot;, &quot;message-corners&quot;, &quot;animations&quot;, &quot;stickers-and-emoji&quot;, &quot;stickers-and-emoji/edit&quot;, &quot;stickers-and-emoji/trending&quot;, &quot;stickers-and-emoji/archived&quot;, &quot;stickers-and-emoji/archived/edit&quot;, &quot;stickers-and-emoji/emoji&quot;, &quot;stickers-and-emoji/emoji/edit&quot;, &quot;stickers-and-emoji/emoji/archived&quot;, &quot;stickers-and-emoji/emoji/archived/edit&quot;, &quot;stickers-and-emoji/emoji/suggest&quot;, &quot;stickers-and-emoji/emoji/quick-reaction&quot;, &quot;stickers-and-emoji/emoji/quick-reaction/choose&quot;, &quot;stickers-and-emoji/suggest-by-emoji&quot;, &quot;stickers-and-emoji/large-emoji&quot;, &quot;stickers-and-emoji/dynamic-order&quot;, &quot;stickers-and-emoji/emoji/show-more&quot;, &quot;app-icon&quot;, &quot;tap-for-next-media&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The appearance section.
   */
  settingsSectionAppearance();

  /**
   * The appearance section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;themes&quot;, &quot;themes/edit&quot;, &quot;themes/create&quot;, &quot;wallpapers&quot;, &quot;wallpapers/edit&quot;, &quot;wallpapers/set&quot;, &quot;wallpapers/choose-photo&quot;, &quot;your-color/profile&quot;, &quot;your-color/profile/add-icons&quot;, &quot;your-color/profile/use-gift&quot;, &quot;your-color/profile/reset&quot;, &quot;your-color/name&quot;, &quot;your-color/name/add-icons&quot;, &quot;your-color/name/use-gift&quot;, &quot;night-mode&quot;, &quot;auto-night-mode&quot;, &quot;text-size&quot;, &quot;text-size/use-system&quot;, &quot;message-corners&quot;, &quot;animations&quot;, &quot;stickers-and-emoji&quot;, &quot;stickers-and-emoji/edit&quot;, &quot;stickers-and-emoji/trending&quot;, &quot;stickers-and-emoji/archived&quot;, &quot;stickers-and-emoji/archived/edit&quot;, &quot;stickers-and-emoji/emoji&quot;, &quot;stickers-and-emoji/emoji/edit&quot;, &quot;stickers-and-emoji/emoji/archived&quot;, &quot;stickers-and-emoji/emoji/archived/edit&quot;, &quot;stickers-and-emoji/emoji/suggest&quot;, &quot;stickers-and-emoji/emoji/quick-reaction&quot;, &quot;stickers-and-emoji/emoji/quick-reaction/choose&quot;, &quot;stickers-and-emoji/suggest-by-emoji&quot;, &quot;stickers-and-emoji/large-emoji&quot;, &quot;stickers-and-emoji/dynamic-order&quot;, &quot;stickers-and-emoji/emoji/show-more&quot;, &quot;app-icon&quot;, &quot;tap-for-next-media&quot;.
   */
  explicit settingsSectionAppearance(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 946479657;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The &quot;Ask a question&quot; section.
 */
class settingsSectionAskQuestion final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The &quot;Ask a question&quot; section.
   */
  settingsSectionAskQuestion();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -977295684;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The &quot;Telegram Business&quot; section.
 */
class settingsSectionBusiness final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;do-not-hide-ads&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The &quot;Telegram Business&quot; section.
   */
  settingsSectionBusiness();

  /**
   * The &quot;Telegram Business&quot; section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;do-not-hide-ads&quot;.
   */
  explicit settingsSectionBusiness(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2035727714;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat folder settings section.
 */
class settingsSectionChatFolders final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;edit&quot;, &quot;create&quot;, &quot;add-recommended&quot;, &quot;show-tags&quot;, &quot;tab-view&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The chat folder settings section.
   */
  settingsSectionChatFolders();

  /**
   * The chat folder settings section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;edit&quot;, &quot;create&quot;, &quot;add-recommended&quot;, &quot;show-tags&quot;, &quot;tab-view&quot;.
   */
  explicit settingsSectionChatFolders(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1689092795;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The data and storage settings section.
 */
class settingsSectionDataAndStorage final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;storage&quot;, &quot;storage/edit&quot;, &quot;storage/auto-remove&quot;, &quot;storage/clear-cache&quot;, &quot;storage/max-cache&quot;, &quot;usage&quot;, &quot;usage/mobile&quot;, &quot;usage/wifi&quot;, &quot;usage/reset&quot;, &quot;usage/roaming&quot;, &quot;auto-download/mobile&quot;, &quot;auto-download/mobile/enable&quot;, &quot;auto-download/mobile/usage&quot;, &quot;auto-download/mobile/photos&quot;, &quot;auto-download/mobile/stories&quot;, &quot;auto-download/mobile/videos&quot;, &quot;auto-download/mobile/files&quot;, &quot;auto-download/wifi&quot;, &quot;auto-download/wifi/enable&quot;, &quot;auto-download/wifi/usage&quot;, &quot;auto-download/wifi/photos&quot;, &quot;auto-download/wifi/stories&quot;, &quot;auto-download/wifi/videos&quot;, &quot;auto-download/wifi/files&quot;, &quot;auto-download/roaming&quot;, &quot;auto-download/roaming/enable&quot;, &quot;auto-download/roaming/usage&quot;, &quot;auto-download/roaming/photos&quot;, &quot;auto-download/roaming/stories&quot;, &quot;auto-download/roaming/videos&quot;, &quot;auto-download/roaming/files&quot;, &quot;auto-download/reset&quot;, &quot;save-to-photos/chats&quot;, &quot;save-to-photos/chats/max-video-size&quot;, &quot;save-to-photos/chats/add-exception&quot;, &quot;save-to-photos/chats/delete-all&quot;, &quot;save-to-photos/groups&quot;, &quot;save-to-photos/groups/max-video-size&quot;, &quot;save-to-photos/groups/add-exception&quot;, &quot;save-to-photos/groups/delete-all&quot;, &quot;save-to-photos/channels&quot;, &quot;save-to-photos/channels/max-video-size&quot;, &quot;save-to-photos/channels/add-exception&quot;, &quot;save-to-photos/channels/delete-all&quot;, &quot;less-data-calls&quot;, &quot;open-links&quot;, &quot;share-sheet&quot;, &quot;share-sheet/suggested-chats&quot;, &quot;share-sheet/suggest-by&quot;, &quot;share-sheet/reset&quot;, &quot;saved-edited-photos&quot;, &quot;pause-music&quot;, &quot;raise-to-listen&quot;, &quot;raise-to-speak&quot;, &quot;show-18-content&quot;, &quot;proxy&quot;, &quot;proxy/edit&quot;, &quot;proxy/use-proxy&quot;, &quot;proxy/add-proxy&quot;, &quot;proxy/share-list&quot;, &quot;proxy/use-for-calls&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The data and storage settings section.
   */
  settingsSectionDataAndStorage();

  /**
   * The data and storage settings section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;storage&quot;, &quot;storage/edit&quot;, &quot;storage/auto-remove&quot;, &quot;storage/clear-cache&quot;, &quot;storage/max-cache&quot;, &quot;usage&quot;, &quot;usage/mobile&quot;, &quot;usage/wifi&quot;, &quot;usage/reset&quot;, &quot;usage/roaming&quot;, &quot;auto-download/mobile&quot;, &quot;auto-download/mobile/enable&quot;, &quot;auto-download/mobile/usage&quot;, &quot;auto-download/mobile/photos&quot;, &quot;auto-download/mobile/stories&quot;, &quot;auto-download/mobile/videos&quot;, &quot;auto-download/mobile/files&quot;, &quot;auto-download/wifi&quot;, &quot;auto-download/wifi/enable&quot;, &quot;auto-download/wifi/usage&quot;, &quot;auto-download/wifi/photos&quot;, &quot;auto-download/wifi/stories&quot;, &quot;auto-download/wifi/videos&quot;, &quot;auto-download/wifi/files&quot;, &quot;auto-download/roaming&quot;, &quot;auto-download/roaming/enable&quot;, &quot;auto-download/roaming/usage&quot;, &quot;auto-download/roaming/photos&quot;, &quot;auto-download/roaming/stories&quot;, &quot;auto-download/roaming/videos&quot;, &quot;auto-download/roaming/files&quot;, &quot;auto-download/reset&quot;, &quot;save-to-photos/chats&quot;, &quot;save-to-photos/chats/max-video-size&quot;, &quot;save-to-photos/chats/add-exception&quot;, &quot;save-to-photos/chats/delete-all&quot;, &quot;save-to-photos/groups&quot;, &quot;save-to-photos/groups/max-video-size&quot;, &quot;save-to-photos/groups/add-exception&quot;, &quot;save-to-photos/groups/delete-all&quot;, &quot;save-to-photos/channels&quot;, &quot;save-to-photos/channels/max-video-size&quot;, &quot;save-to-photos/channels/add-exception&quot;, &quot;save-to-photos/channels/delete-all&quot;, &quot;less-data-calls&quot;, &quot;open-links&quot;, &quot;share-sheet&quot;, &quot;share-sheet/suggested-chats&quot;, &quot;share-sheet/suggest-by&quot;, &quot;share-sheet/reset&quot;, &quot;saved-edited-photos&quot;, &quot;pause-music&quot;, &quot;raise-to-listen&quot;, &quot;raise-to-speak&quot;, &quot;show-18-content&quot;, &quot;proxy&quot;, &quot;proxy/edit&quot;, &quot;proxy/use-proxy&quot;, &quot;proxy/add-proxy&quot;, &quot;proxy/share-list&quot;, &quot;proxy/use-for-calls&quot;.
   */
  explicit settingsSectionDataAndStorage(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -677345873;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Devices section.
 */
class settingsSectionDevices final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;edit&quot;, &quot;link-desktop&quot;, &quot;terminate-sessions&quot;, &quot;auto-terminate&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The Devices section.
   */
  settingsSectionDevices();

  /**
   * The Devices section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;edit&quot;, &quot;link-desktop&quot;, &quot;terminate-sessions&quot;, &quot;auto-terminate&quot;.
   */
  explicit settingsSectionDevices(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1987641411;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The profile edit section.
 */
class settingsSectionEditProfile final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;set-photo&quot;, &quot;first-name&quot;, &quot;last-name&quot;, &quot;emoji-status&quot;, &quot;bio&quot;, &quot;birthday&quot;, &quot;change-number&quot;, &quot;username&quot;, &quot;your-color&quot;, &quot;channel&quot;, &quot;add-account&quot;, &quot;log-out&quot;, &quot;profile-color/profile&quot;, &quot;profile-color/profile/add-icons&quot;, &quot;profile-color/profile/use-gift&quot;, &quot;profile-color/name&quot;, &quot;profile-color/name/add-icons&quot;, &quot;profile-color/name/use-gift&quot;, &quot;profile-photo/use-emoji&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The profile edit section.
   */
  settingsSectionEditProfile();

  /**
   * The profile edit section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;set-photo&quot;, &quot;first-name&quot;, &quot;last-name&quot;, &quot;emoji-status&quot;, &quot;bio&quot;, &quot;birthday&quot;, &quot;change-number&quot;, &quot;username&quot;, &quot;your-color&quot;, &quot;channel&quot;, &quot;add-account&quot;, &quot;log-out&quot;, &quot;profile-color/profile&quot;, &quot;profile-color/profile/add-icons&quot;, &quot;profile-color/profile/use-gift&quot;, &quot;profile-color/name&quot;, &quot;profile-color/name/add-icons&quot;, &quot;profile-color/name/use-gift&quot;, &quot;profile-photo/use-emoji&quot;.
   */
  explicit settingsSectionEditProfile(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 654959232;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The FAQ section.
 */
class settingsSectionFaq final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The FAQ section.
   */
  settingsSectionFaq();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 689162381;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The &quot;Telegram Features&quot; section.
 */
class settingsSectionFeatures final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The &quot;Telegram Features&quot; section.
   */
  settingsSectionFeatures();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 434930782;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The in-app browser settings section.
 */
class settingsSectionInAppBrowser final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;enable-browser&quot;, &quot;clear-cookies&quot;, &quot;clear-cache&quot;, &quot;history&quot;, &quot;clear-history&quot;, &quot;never-open&quot;, &quot;clear-list&quot;, &quot;search&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The in-app browser settings section.
   */
  settingsSectionInAppBrowser();

  /**
   * The in-app browser settings section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;enable-browser&quot;, &quot;clear-cookies&quot;, &quot;clear-cache&quot;, &quot;history&quot;, &quot;clear-history&quot;, &quot;never-open&quot;, &quot;clear-list&quot;, &quot;search&quot;.
   */
  explicit settingsSectionInAppBrowser(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1762505859;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The application language section.
 */
class settingsSectionLanguage final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;show-button&quot; for Show Translate Button toggle, &quot;translate-chats&quot; for Translate Entire Chats toggle, &quot;do-not-translate&quot; - for Do Not Translate language list.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The application language section.
   */
  settingsSectionLanguage();

  /**
   * The application language section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;show-button&quot; for Show Translate Button toggle, &quot;translate-chats&quot; for Translate Entire Chats toggle, &quot;do-not-translate&quot; - for Do Not Translate language list.
   */
  explicit settingsSectionLanguage(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2102087062;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Telegram Star balance and transaction section.
 */
class settingsSectionMyStars final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;top-up&quot;, &quot;stats&quot;, &quot;gift&quot;, &quot;earn&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The Telegram Star balance and transaction section.
   */
  settingsSectionMyStars();

  /**
   * The Telegram Star balance and transaction section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;top-up&quot;, &quot;stats&quot;, &quot;gift&quot;, &quot;earn&quot;.
   */
  explicit settingsSectionMyStars(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 324987676;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Toncoin balance and transaction section.
 */
class settingsSectionMyToncoins final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The Toncoin balance and transaction section.
   */
  settingsSectionMyToncoins();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1628818474;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The notification settings section.
 */
class settingsSectionNotifications final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;accounts&quot;, &quot;private-chats&quot;, &quot;private-chats/edit&quot;, &quot;private-chats/show&quot;, &quot;private-chats/preview&quot;, &quot;private-chats/sound&quot;, &quot;private-chats/add-exception&quot;, &quot;private-chats/delete-exceptions&quot;, &quot;private-chats/light-color&quot;, &quot;private-chats/vibrate&quot;, &quot;private-chats/priority&quot;, &quot;groups&quot;, &quot;groups/edit&quot;, &quot;groups/show&quot;, &quot;groups/preview&quot;, &quot;groups/sound&quot;, &quot;groups/add-exception&quot;, &quot;groups/delete-exceptions&quot;, &quot;groups/light-color&quot;, &quot;groups/vibrate&quot;, &quot;groups/priority&quot;, &quot;channels&quot;, &quot;channels/edit&quot;, &quot;channels/show&quot;, &quot;channels/preview&quot;, &quot;channels/sound&quot;, &quot;channels/add-exception&quot;, &quot;channels/delete-exceptions&quot;, &quot;channels/light-color&quot;, &quot;channels/vibrate&quot;, &quot;channels/priority&quot;, &quot;stories&quot;, &quot;stories/new&quot;, &quot;stories/important&quot;, &quot;stories/show-sender&quot;, &quot;stories/sound&quot;, &quot;stories/add-exception&quot;, &quot;stories/delete-exceptions&quot;, &quot;stories/light-color&quot;, &quot;stories/vibrate&quot;, &quot;stories/priority&quot;, &quot;reactions&quot;, &quot;reactions/messages&quot;, &quot;reactions/stories&quot;, &quot;reactions/show-sender&quot;, &quot;reactions/sound&quot;, &quot;reactions/light-color&quot;, &quot;reactions/vibrate&quot;, &quot;reactions/priority&quot;, &quot;in-app-sounds&quot;, &quot;in-app-vibrate&quot;, &quot;in-app-preview&quot;, &quot;in-chat-sounds&quot;, &quot;in-app-popup&quot;, &quot;lock-screen-names&quot;, &quot;include-channels&quot;, &quot;include-muted-chats&quot;, &quot;count-unread-messages&quot;, &quot;new-contacts&quot;, &quot;pinned-messages&quot;, &quot;reset&quot;, &quot;web&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The notification settings section.
   */
  settingsSectionNotifications();

  /**
   * The notification settings section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;accounts&quot;, &quot;private-chats&quot;, &quot;private-chats/edit&quot;, &quot;private-chats/show&quot;, &quot;private-chats/preview&quot;, &quot;private-chats/sound&quot;, &quot;private-chats/add-exception&quot;, &quot;private-chats/delete-exceptions&quot;, &quot;private-chats/light-color&quot;, &quot;private-chats/vibrate&quot;, &quot;private-chats/priority&quot;, &quot;groups&quot;, &quot;groups/edit&quot;, &quot;groups/show&quot;, &quot;groups/preview&quot;, &quot;groups/sound&quot;, &quot;groups/add-exception&quot;, &quot;groups/delete-exceptions&quot;, &quot;groups/light-color&quot;, &quot;groups/vibrate&quot;, &quot;groups/priority&quot;, &quot;channels&quot;, &quot;channels/edit&quot;, &quot;channels/show&quot;, &quot;channels/preview&quot;, &quot;channels/sound&quot;, &quot;channels/add-exception&quot;, &quot;channels/delete-exceptions&quot;, &quot;channels/light-color&quot;, &quot;channels/vibrate&quot;, &quot;channels/priority&quot;, &quot;stories&quot;, &quot;stories/new&quot;, &quot;stories/important&quot;, &quot;stories/show-sender&quot;, &quot;stories/sound&quot;, &quot;stories/add-exception&quot;, &quot;stories/delete-exceptions&quot;, &quot;stories/light-color&quot;, &quot;stories/vibrate&quot;, &quot;stories/priority&quot;, &quot;reactions&quot;, &quot;reactions/messages&quot;, &quot;reactions/stories&quot;, &quot;reactions/show-sender&quot;, &quot;reactions/sound&quot;, &quot;reactions/light-color&quot;, &quot;reactions/vibrate&quot;, &quot;reactions/priority&quot;, &quot;in-app-sounds&quot;, &quot;in-app-vibrate&quot;, &quot;in-app-preview&quot;, &quot;in-chat-sounds&quot;, &quot;in-app-popup&quot;, &quot;lock-screen-names&quot;, &quot;include-channels&quot;, &quot;include-muted-chats&quot;, &quot;count-unread-messages&quot;, &quot;new-contacts&quot;, &quot;pinned-messages&quot;, &quot;reset&quot;, &quot;web&quot;.
   */
  explicit settingsSectionNotifications(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1517744502;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The power saving settings section.
 */
class settingsSectionPowerSaving final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;videos&quot;, &quot;gifs&quot;, &quot;stickers&quot;, &quot;emoji&quot;, &quot;effects&quot;, &quot;preload&quot;, &quot;background&quot;, &quot;call-animations&quot;, &quot;particles&quot;, &quot;transitions&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The power saving settings section.
   */
  settingsSectionPowerSaving();

  /**
   * The power saving settings section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;videos&quot;, &quot;gifs&quot;, &quot;stickers&quot;, &quot;emoji&quot;, &quot;effects&quot;, &quot;preload&quot;, &quot;background&quot;, &quot;call-animations&quot;, &quot;particles&quot;, &quot;transitions&quot;.
   */
  explicit settingsSectionPowerSaving(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1041090092;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The &quot;Telegram Premium&quot; section.
 */
class settingsSectionPremium final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The &quot;Telegram Premium&quot; section.
   */
  settingsSectionPremium();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1635573221;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The privacy and security section.
 */
class settingsSectionPrivacyAndSecurity final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;blocked&quot;, &quot;blocked/edit&quot;, &quot;blocked/block-user&quot;, &quot;blocked/block-user/chats&quot;, &quot;blocked/block-user/contacts&quot;, &quot;active-websites&quot;, &quot;active-websites/edit&quot;, &quot;active-websites/disconnect-all&quot;, &quot;passcode&quot;, &quot;passcode/disable&quot;, &quot;passcode/change&quot;, &quot;passcode/auto-lock&quot;, &quot;passcode/face-id&quot;, &quot;passcode/fingerprint&quot;, &quot;2sv&quot;, &quot;2sv/change&quot;, &quot;2sv/disable&quot;, &quot;2sv/change-email&quot;, &quot;passkey&quot;, &quot;passkey/create&quot;, &quot;auto-delete&quot;, &quot;auto-delete/set-custom&quot;, &quot;login-email&quot;, &quot;phone-number&quot;, &quot;phone-number/never&quot;, &quot;phone-number/always&quot;, &quot;last-seen&quot;, &quot;last-seen/never&quot;, &quot;last-seen/always&quot;, &quot;last-seen/hide-read-time&quot;, &quot;profile-photos&quot;, &quot;profile-photos/never&quot;, &quot;profile-photos/always&quot;, &quot;profile-photos/set-public&quot;, &quot;profile-photos/update-public&quot;, &quot;profile-photos/remove-public&quot;, &quot;bio&quot;, &quot;bio/never&quot;, &quot;bio/always&quot;, &quot;gifts&quot;, &quot;gifts/show-icon&quot;, &quot;gifts/never&quot;, &quot;gifts/always&quot;, &quot;gifts/accepted-types&quot;, &quot;birthday&quot;, &quot;birthday/add&quot;, &quot;birthday/never&quot;, &quot;birthday/always&quot;, &quot;saved-music&quot;, &quot;saved-music/never&quot;, &quot;saved-music/always&quot;, &quot;forwards&quot;, &quot;forwards/never&quot;, &quot;forwards/always&quot;, &quot;calls&quot;, &quot;calls/never&quot;, &quot;calls/always&quot;, &quot;calls/p2p&quot;, &quot;calls/p2p/never&quot;, &quot;calls/p2p/always&quot;, &quot;calls/ios-integration&quot;, &quot;voice&quot;, &quot;voice/never&quot;, &quot;voice/always&quot;, &quot;messages&quot;, &quot;messages/set-price&quot;, &quot;messages/exceptions&quot;, &quot;invites&quot;, &quot;invites/never&quot;, &quot;invites/always&quot;, &quot;self-destruct&quot;, &quot;data-settings&quot;, &quot;data-settings/sync-contacts&quot;, &quot;data-settings/delete-synced&quot;, &quot;data-settings/suggest-contacts&quot;, &quot;data-settings/delete-cloud-drafts&quot;, &quot;data-settings/clear-payment-info&quot;, &quot;data-settings/link-previews&quot;, &quot;data-settings/bot-settings&quot;, &quot;data-settings/map-provider&quot;, &quot;archive-and-mute&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The privacy and security section.
   */
  settingsSectionPrivacyAndSecurity();

  /**
   * The privacy and security section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;blocked&quot;, &quot;blocked/edit&quot;, &quot;blocked/block-user&quot;, &quot;blocked/block-user/chats&quot;, &quot;blocked/block-user/contacts&quot;, &quot;active-websites&quot;, &quot;active-websites/edit&quot;, &quot;active-websites/disconnect-all&quot;, &quot;passcode&quot;, &quot;passcode/disable&quot;, &quot;passcode/change&quot;, &quot;passcode/auto-lock&quot;, &quot;passcode/face-id&quot;, &quot;passcode/fingerprint&quot;, &quot;2sv&quot;, &quot;2sv/change&quot;, &quot;2sv/disable&quot;, &quot;2sv/change-email&quot;, &quot;passkey&quot;, &quot;passkey/create&quot;, &quot;auto-delete&quot;, &quot;auto-delete/set-custom&quot;, &quot;login-email&quot;, &quot;phone-number&quot;, &quot;phone-number/never&quot;, &quot;phone-number/always&quot;, &quot;last-seen&quot;, &quot;last-seen/never&quot;, &quot;last-seen/always&quot;, &quot;last-seen/hide-read-time&quot;, &quot;profile-photos&quot;, &quot;profile-photos/never&quot;, &quot;profile-photos/always&quot;, &quot;profile-photos/set-public&quot;, &quot;profile-photos/update-public&quot;, &quot;profile-photos/remove-public&quot;, &quot;bio&quot;, &quot;bio/never&quot;, &quot;bio/always&quot;, &quot;gifts&quot;, &quot;gifts/show-icon&quot;, &quot;gifts/never&quot;, &quot;gifts/always&quot;, &quot;gifts/accepted-types&quot;, &quot;birthday&quot;, &quot;birthday/add&quot;, &quot;birthday/never&quot;, &quot;birthday/always&quot;, &quot;saved-music&quot;, &quot;saved-music/never&quot;, &quot;saved-music/always&quot;, &quot;forwards&quot;, &quot;forwards/never&quot;, &quot;forwards/always&quot;, &quot;calls&quot;, &quot;calls/never&quot;, &quot;calls/always&quot;, &quot;calls/p2p&quot;, &quot;calls/p2p/never&quot;, &quot;calls/p2p/always&quot;, &quot;calls/ios-integration&quot;, &quot;voice&quot;, &quot;voice/never&quot;, &quot;voice/always&quot;, &quot;messages&quot;, &quot;messages/set-price&quot;, &quot;messages/exceptions&quot;, &quot;invites&quot;, &quot;invites/never&quot;, &quot;invites/always&quot;, &quot;self-destruct&quot;, &quot;data-settings&quot;, &quot;data-settings/sync-contacts&quot;, &quot;data-settings/delete-synced&quot;, &quot;data-settings/suggest-contacts&quot;, &quot;data-settings/delete-cloud-drafts&quot;, &quot;data-settings/clear-payment-info&quot;, &quot;data-settings/link-previews&quot;, &quot;data-settings/bot-settings&quot;, &quot;data-settings/map-provider&quot;, &quot;archive-and-mute&quot;.
   */
  explicit settingsSectionPrivacyAndSecurity(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1251665482;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The &quot;Privacy Policy&quot; section.
 */
class settingsSectionPrivacyPolicy final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The &quot;Privacy Policy&quot; section.
   */
  settingsSectionPrivacyPolicy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2068087969;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The current user's QR code section.
 */
class settingsSectionQrCode final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;share&quot;, &quot;scan&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The current user's QR code section.
   */
  settingsSectionQrCode();

  /**
   * The current user's QR code section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;share&quot;, &quot;scan&quot;.
   */
  explicit settingsSectionQrCode(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1816314456;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Search in Settings.
 */
class settingsSectionSearch final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Search in Settings.
   */
  settingsSectionSearch();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 686700184;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The &quot;Send a gift&quot; section.
 */
class settingsSectionSendGift final : public SettingsSection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Subsection of the section; may be one of &quot;&quot;, &quot;self&quot;.
  string subsection_;
  static jfieldID subsection_fieldID;

  /**
   * The &quot;Send a gift&quot; section.
   */
  settingsSectionSendGift();

  /**
   * The &quot;Send a gift&quot; section.
   *
   * \param[in] subsection_ Subsection of the section; may be one of &quot;&quot;, &quot;self&quot;.
   */
  explicit settingsSectionSendGift(string const &subsection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -326078;

  static object_ptr<SettingsSection> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

/**
 * Contains information about a chat shared with a bot.
 */
class sharedChat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Title of the chat; for bots only.
  string title_;
  static jfieldID title_fieldID;
  /// Username of the chat; for bots only.
  string username_;
  static jfieldID username_fieldID;
  /// Photo of the chat; for bots only; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * Contains information about a chat shared with a bot.
   */
  sharedChat();

  /**
   * Contains information about a chat shared with a bot.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] title_ Title of the chat; for bots only.
   * \param[in] username_ Username of the chat; for bots only.
   * \param[in] photo_ Photo of the chat; for bots only; may be null.
   */
  sharedChat(int53 chat_id_, string const &title_, string const &username_, object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1250406426;

  static object_ptr<sharedChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

/**
 * Contains information about a user shared with a bot.
 */
class sharedUser final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// First name of the user; for bots only.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// Last name of the user; for bots only.
  string last_name_;
  static jfieldID last_name_fieldID;
  /// Username of the user; for bots only.
  string username_;
  static jfieldID username_fieldID;
  /// Profile photo of the user; for bots only; may be null.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * Contains information about a user shared with a bot.
   */
  sharedUser();

  /**
   * Contains information about a user shared with a bot.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] first_name_ First name of the user; for bots only.
   * \param[in] last_name_ Last name of the user; for bots only.
   * \param[in] username_ Username of the user; for bots only.
   * \param[in] photo_ Profile photo of the user; for bots only; may be null.
   */
  sharedUser(int53 user_id_, string const &first_name_, string const &last_name_, string const &username_, object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 293020919;

  static object_ptr<sharedUser> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class labeledPricePart;

/**
 * One shipping option.
 */
class shippingOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Shipping option identifier.
  string id_;
  static jfieldID id_fieldID;
  /// Option title.
  string title_;
  static jfieldID title_fieldID;
  /// A list of objects used to calculate the total shipping costs.
  array<object_ptr<labeledPricePart>> price_parts_;
  static jfieldID price_parts_fieldID;

  /**
   * One shipping option.
   */
  shippingOption();

  /**
   * One shipping option.
   *
   * \param[in] id_ Shipping option identifier.
   * \param[in] title_ Option title.
   * \param[in] price_parts_ A list of objects used to calculate the total shipping costs.
   */
  shippingOption(string const &id_, string const &title_, array<object_ptr<labeledPricePart>> &&price_parts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1425690001;

  static object_ptr<shippingOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class error;

/**
 * This class is an abstract base class.
 * Describes result of speech recognition in a voice note.
 */
class SpeechRecognitionResult: public Object {
 public:
  static jclass Class;

  static object_ptr<SpeechRecognitionResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The speech recognition is ongoing.
 */
class speechRecognitionResultPending final : public SpeechRecognitionResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Partially recognized text.
  string partial_text_;
  static jfieldID partial_text_fieldID;

  /**
   * The speech recognition is ongoing.
   */
  speechRecognitionResultPending();

  /**
   * The speech recognition is ongoing.
   *
   * \param[in] partial_text_ Partially recognized text.
   */
  explicit speechRecognitionResultPending(string const &partial_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1631810048;

  static object_ptr<SpeechRecognitionResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The speech recognition successfully finished.
 */
class speechRecognitionResultText final : public SpeechRecognitionResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recognized text.
  string text_;
  static jfieldID text_fieldID;

  /**
   * The speech recognition successfully finished.
   */
  speechRecognitionResultText();

  /**
   * The speech recognition successfully finished.
   *
   * \param[in] text_ Recognized text.
   */
  explicit speechRecognitionResultText(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2132377123;

  static object_ptr<SpeechRecognitionResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The speech recognition failed.
 */
class speechRecognitionResultError final : public SpeechRecognitionResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recognition error. An error with a message &quot;MSG_VOICE_TOO_LONG&quot; is returned when media duration is too big to be recognized.
  object_ptr<error> error_;
  static jfieldID error_fieldID;

  /**
   * The speech recognition failed.
   */
  speechRecognitionResultError();

  /**
   * The speech recognition failed.
   *
   * \param[in] error_ Recognition error. An error with a message &quot;MSG_VOICE_TOO_LONG&quot; is returned when media duration is too big to be recognized.
   */
  explicit speechRecognitionResultError(object_ptr<error> &&error_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 164774908;

  static object_ptr<SpeechRecognitionResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a sponsored chat.
 */
class sponsoredChat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of this result.
  int53 unique_id_;
  static jfieldID unique_id_fieldID;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Additional optional information about the sponsor to be shown along with the chat.
  string sponsor_info_;
  static jfieldID sponsor_info_fieldID;
  /// If non-empty, additional information about the sponsored chat to be shown along with the chat.
  string additional_info_;
  static jfieldID additional_info_fieldID;

  /**
   * Describes a sponsored chat.
   */
  sponsoredChat();

  /**
   * Describes a sponsored chat.
   *
   * \param[in] unique_id_ Unique identifier of this result.
   * \param[in] chat_id_ Chat identifier.
   * \param[in] sponsor_info_ Additional optional information about the sponsor to be shown along with the chat.
   * \param[in] additional_info_ If non-empty, additional information about the sponsored chat to be shown along with the chat.
   */
  sponsoredChat(int53 unique_id_, int53 chat_id_, string const &sponsor_info_, string const &additional_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -325763489;

  static object_ptr<sponsoredChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sponsoredChat;

/**
 * Contains a list of sponsored chats.
 */
class sponsoredChats final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of sponsored chats.
  array<object_ptr<sponsoredChat>> chats_;
  static jfieldID chats_fieldID;

  /**
   * Contains a list of sponsored chats.
   */
  sponsoredChats();

  /**
   * Contains a list of sponsored chats.
   *
   * \param[in] chats_ List of sponsored chats.
   */
  explicit sponsoredChats(array<object_ptr<sponsoredChat>> &&chats_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 536300641;

  static object_ptr<sponsoredChats> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageContent;

class advertisementSponsor;

/**
 * Describes a sponsored message.
 */
class sponsoredMessage final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// True, if the message needs to be labeled as &quot;recommended&quot; instead of &quot;sponsored&quot;.
  bool is_recommended_;
  static jfieldID is_recommended_fieldID;
  /// True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.
  bool can_be_reported_;
  static jfieldID can_be_reported_fieldID;
  /// Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen. The content must be fully downloaded before the message is shown.
  object_ptr<MessageContent> content_;
  static jfieldID content_fieldID;
  /// Information about the sponsor of the message.
  object_ptr<advertisementSponsor> sponsor_;
  static jfieldID sponsor_fieldID;
  /// Title of the sponsored message.
  string title_;
  static jfieldID title_fieldID;
  /// Text for the message action button.
  string button_text_;
  static jfieldID button_text_fieldID;
  /// Identifier of the accent color for title, button text and message background.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the message background; 0 if none.
  int64 background_custom_emoji_id_;
  static jfieldID background_custom_emoji_id_fieldID;
  /// If non-empty, additional information about the sponsored message to be shown along with the message.
  string additional_info_;
  static jfieldID additional_info_fieldID;

  /**
   * Describes a sponsored message.
   */
  sponsoredMessage();

  /**
   * Describes a sponsored message.
   *
   * \param[in] message_id_ Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
   * \param[in] is_recommended_ True, if the message needs to be labeled as &quot;recommended&quot; instead of &quot;sponsored&quot;.
   * \param[in] can_be_reported_ True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage.
   * \param[in] content_ Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen. The content must be fully downloaded before the message is shown.
   * \param[in] sponsor_ Information about the sponsor of the message.
   * \param[in] title_ Title of the sponsored message.
   * \param[in] button_text_ Text for the message action button.
   * \param[in] accent_color_id_ Identifier of the accent color for title, button text and message background.
   * \param[in] background_custom_emoji_id_ Identifier of a custom emoji to be shown on the message background; 0 if none.
   * \param[in] additional_info_ If non-empty, additional information about the sponsored message to be shown along with the message.
   */
  sponsoredMessage(int53 message_id_, bool is_recommended_, bool can_be_reported_, object_ptr<MessageContent> &&content_, object_ptr<advertisementSponsor> &&sponsor_, string const &title_, string const &button_text_, int32 accent_color_id_, int64 background_custom_emoji_id_, string const &additional_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1521782216;

  static object_ptr<sponsoredMessage> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sponsoredMessage;

/**
 * Contains a list of sponsored messages.
 */
class sponsoredMessages final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of sponsored messages.
  array<object_ptr<sponsoredMessage>> messages_;
  static jfieldID messages_fieldID;
  /// The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages.
  int32 messages_between_;
  static jfieldID messages_between_fieldID;

  /**
   * Contains a list of sponsored messages.
   */
  sponsoredMessages();

  /**
   * Contains a list of sponsored messages.
   *
   * \param[in] messages_ List of sponsored messages.
   * \param[in] messages_between_ The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages.
   */
  sponsoredMessages(array<object_ptr<sponsoredMessage>> &&messages_, int32 messages_between_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -537674389;

  static object_ptr<sponsoredMessages> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes state of the stake dice.
 */
class stakeDiceState final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user.
  string state_hash_;
  static jfieldID state_hash_fieldID;
  /// The Toncoin amount that was staked in the previous roll; in the smallest units of the currency.
  int53 stake_toncoin_amount_;
  static jfieldID stake_toncoin_amount_fieldID;
  /// The amounts of Toncoins that are suggested to be staked; in the smallest units of the currency.
  array<int53> suggested_stake_toncoin_amounts_;
  static jfieldID suggested_stake_toncoin_amounts_fieldID;
  /// The number of rolled sixes towards the streak; 0-2.
  int32 current_streak_;
  static jfieldID current_streak_fieldID;
  /// The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user.
  array<int32> prize_per_mille_;
  static jfieldID prize_per_mille_fieldID;
  /// The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 6 three times in a row with the same stake.
  int32 streak_prize_per_mille_;
  static jfieldID streak_prize_per_mille_fieldID;

  /**
   * Describes state of the stake dice.
   */
  stakeDiceState();

  /**
   * Describes state of the stake dice.
   *
   * \param[in] state_hash_ Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user.
   * \param[in] stake_toncoin_amount_ The Toncoin amount that was staked in the previous roll; in the smallest units of the currency.
   * \param[in] suggested_stake_toncoin_amounts_ The amounts of Toncoins that are suggested to be staked; in the smallest units of the currency.
   * \param[in] current_streak_ The number of rolled sixes towards the streak; 0-2.
   * \param[in] prize_per_mille_ The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user.
   * \param[in] streak_prize_per_mille_ The number of Toncoins received by the user for each 1000 Toncoins staked if the dice outcome is 6 three times in a row with the same stake.
   */
  stakeDiceState(string const &state_hash_, int53 stake_toncoin_amount_, array<int53> &&suggested_stake_toncoin_amounts_, int32 current_streak_, array<int32> &&prize_per_mille_, int32 streak_prize_per_mille_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2004711564;

  static object_ptr<stakeDiceState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a possibly non-integer Telegram Star amount.
 */
class starAmount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The integer Telegram Star amount rounded to 0.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999.
  int32 nanostar_count_;
  static jfieldID nanostar_count_fieldID;

  /**
   * Describes a possibly non-integer Telegram Star amount.
   */
  starAmount();

  /**
   * Describes a possibly non-integer Telegram Star amount.
   *
   * \param[in] star_count_ The integer Telegram Star amount rounded to 0.
   * \param[in] nanostar_count_ The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999.
   */
  starAmount(int53 star_count_, int32 nanostar_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1863216512;

  static object_ptr<starAmount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains a number of Telegram Stars.
 */
class starCount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Contains a number of Telegram Stars.
   */
  starCount();

  /**
   * Contains a number of Telegram Stars.
   *
   * \param[in] star_count_ Number of Telegram Stars.
   */
  explicit starCount(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1566395144;

  static object_ptr<starCount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starGiveawayWinnerOption;

/**
 * Describes an option for creating of Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments.
 */
class starGiveawayPaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code for the payment.
  string currency_;
  static jfieldID currency_fieldID;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of Telegram Stars that will be distributed among winners.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the store product associated with the option; may be empty if none.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// Number of times the chat will be boosted for one year if the option is chosen.
  int32 yearly_boost_count_;
  static jfieldID yearly_boost_count_fieldID;
  /// Allowed options for the number of giveaway winners.
  array<object_ptr<starGiveawayWinnerOption>> winner_options_;
  static jfieldID winner_options_fieldID;
  /// True, if the option must be chosen by default.
  bool is_default_;
  static jfieldID is_default_fieldID;
  /// True, if the option must be shown only in the full list of payment options.
  bool is_additional_;
  static jfieldID is_additional_fieldID;

  /**
   * Describes an option for creating of Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments.
   */
  starGiveawayPaymentOption();

  /**
   * Describes an option for creating of Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments.
   *
   * \param[in] currency_ ISO 4217 currency code for the payment.
   * \param[in] amount_ The amount to pay, in the smallest units of the currency.
   * \param[in] star_count_ Number of Telegram Stars that will be distributed among winners.
   * \param[in] store_product_id_ Identifier of the store product associated with the option; may be empty if none.
   * \param[in] yearly_boost_count_ Number of times the chat will be boosted for one year if the option is chosen.
   * \param[in] winner_options_ Allowed options for the number of giveaway winners.
   * \param[in] is_default_ True, if the option must be chosen by default.
   * \param[in] is_additional_ True, if the option must be shown only in the full list of payment options.
   */
  starGiveawayPaymentOption(string const &currency_, int53 amount_, int53 star_count_, string const &store_product_id_, int32 yearly_boost_count_, array<object_ptr<starGiveawayWinnerOption>> &&winner_options_, bool is_default_, bool is_additional_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 565089625;

  static object_ptr<starGiveawayPaymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starGiveawayPaymentOption;

/**
 * Contains a list of options for creating of Telegram Star giveaway.
 */
class starGiveawayPaymentOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of options.
  array<object_ptr<starGiveawayPaymentOption>> options_;
  static jfieldID options_fieldID;

  /**
   * Contains a list of options for creating of Telegram Star giveaway.
   */
  starGiveawayPaymentOptions();

  /**
   * Contains a list of options for creating of Telegram Star giveaway.
   *
   * \param[in] options_ The list of options.
   */
  explicit starGiveawayPaymentOptions(array<object_ptr<starGiveawayPaymentOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1216716679;

  static object_ptr<starGiveawayPaymentOptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an option for the number of winners of a Telegram Star giveaway.
 */
class starGiveawayWinnerOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of users that will be chosen as winners.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// The number of Telegram Stars that will be won by the winners of the giveaway.
  int53 won_star_count_;
  static jfieldID won_star_count_fieldID;
  /// True, if the option must be chosen by default.
  bool is_default_;
  static jfieldID is_default_fieldID;

  /**
   * Describes an option for the number of winners of a Telegram Star giveaway.
   */
  starGiveawayWinnerOption();

  /**
   * Describes an option for the number of winners of a Telegram Star giveaway.
   *
   * \param[in] winner_count_ The number of users that will be chosen as winners.
   * \param[in] won_star_count_ The number of Telegram Stars that will be won by the winners of the giveaway.
   * \param[in] is_default_ True, if the option must be chosen by default.
   */
  starGiveawayWinnerOption(int32 winner_count_, int53 won_star_count_, bool is_default_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -865888761;

  static object_ptr<starGiveawayWinnerOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes an option for buying Telegram Stars. Use telegramPaymentPurposeStars for out-of-store payments.
 */
class starPaymentOption final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code for the payment.
  string currency_;
  static jfieldID currency_fieldID;
  /// The amount to pay, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of Telegram Stars that will be purchased.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the store product associated with the option; may be empty if none.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// True, if the option must be shown only in the full list of payment options.
  bool is_additional_;
  static jfieldID is_additional_fieldID;

  /**
   * Describes an option for buying Telegram Stars. Use telegramPaymentPurposeStars for out-of-store payments.
   */
  starPaymentOption();

  /**
   * Describes an option for buying Telegram Stars. Use telegramPaymentPurposeStars for out-of-store payments.
   *
   * \param[in] currency_ ISO 4217 currency code for the payment.
   * \param[in] amount_ The amount to pay, in the smallest units of the currency.
   * \param[in] star_count_ Number of Telegram Stars that will be purchased.
   * \param[in] store_product_id_ Identifier of the store product associated with the option; may be empty if none.
   * \param[in] is_additional_ True, if the option must be shown only in the full list of payment options.
   */
  starPaymentOption(string const &currency_, int53 amount_, int53 star_count_, string const &store_product_id_, bool is_additional_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1364056047;

  static object_ptr<starPaymentOption> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starPaymentOption;

/**
 * Contains a list of options for buying Telegram Stars.
 */
class starPaymentOptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of options.
  array<object_ptr<starPaymentOption>> options_;
  static jfieldID options_fieldID;

  /**
   * Contains a list of options for buying Telegram Stars.
   */
  starPaymentOptions();

  /**
   * Contains a list of options for buying Telegram Stars.
   *
   * \param[in] options_ The list of options.
   */
  explicit starPaymentOptions(array<object_ptr<starPaymentOption>> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -423720498;

  static object_ptr<starPaymentOptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

class starRevenueStatus;

/**
 * A detailed statistics about Telegram Stars earned by a user or a chat.
 */
class starRevenueStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A graph containing amount of revenue in a given day.
  object_ptr<StatisticalGraph> revenue_by_day_graph_;
  static jfieldID revenue_by_day_graph_fieldID;
  /// Telegram Star revenue status.
  object_ptr<starRevenueStatus> status_;
  static jfieldID status_fieldID;
  /// Current conversion rate of a Telegram Star to USD.
  double usd_rate_;
  static jfieldID usd_rate_fieldID;

  /**
   * A detailed statistics about Telegram Stars earned by a user or a chat.
   */
  starRevenueStatistics();

  /**
   * A detailed statistics about Telegram Stars earned by a user or a chat.
   *
   * \param[in] revenue_by_day_graph_ A graph containing amount of revenue in a given day.
   * \param[in] status_ Telegram Star revenue status.
   * \param[in] usd_rate_ Current conversion rate of a Telegram Star to USD.
   */
  starRevenueStatistics(object_ptr<StatisticalGraph> &&revenue_by_day_graph_, object_ptr<starRevenueStatus> &&status_, double usd_rate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1121086889;

  static object_ptr<starRevenueStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starAmount;

/**
 * Contains information about Telegram Stars earned by a user or a chat.
 */
class starRevenueStatus final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total Telegram Star amount earned.
  object_ptr<starAmount> total_amount_;
  static jfieldID total_amount_fieldID;
  /// The Telegram Star amount that isn't withdrawn yet.
  object_ptr<starAmount> current_amount_;
  static jfieldID current_amount_fieldID;
  /// The Telegram Star amount that is available for withdrawal.
  object_ptr<starAmount> available_amount_;
  static jfieldID available_amount_fieldID;
  /// True, if Telegram Stars can be withdrawn now or later.
  bool withdrawal_enabled_;
  static jfieldID withdrawal_enabled_fieldID;
  /// Time left before the next withdrawal can be started, in seconds; 0 if withdrawal can be started now.
  int32 next_withdrawal_in_;
  static jfieldID next_withdrawal_in_fieldID;

  /**
   * Contains information about Telegram Stars earned by a user or a chat.
   */
  starRevenueStatus();

  /**
   * Contains information about Telegram Stars earned by a user or a chat.
   *
   * \param[in] total_amount_ Total Telegram Star amount earned.
   * \param[in] current_amount_ The Telegram Star amount that isn't withdrawn yet.
   * \param[in] available_amount_ The Telegram Star amount that is available for withdrawal.
   * \param[in] withdrawal_enabled_ True, if Telegram Stars can be withdrawn now or later.
   * \param[in] next_withdrawal_in_ Time left before the next withdrawal can be started, in seconds; 0 if withdrawal can be started now.
   */
  starRevenueStatus(object_ptr<starAmount> &&total_amount_, object_ptr<starAmount> &&current_amount_, object_ptr<starAmount> &&available_amount_, bool withdrawal_enabled_, int32 next_withdrawal_in_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2006266600;

  static object_ptr<starRevenueStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StarSubscriptionType;

class starSubscriptionPricing;

/**
 * Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars.
 */
class starSubscription final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the subscription.
  string id_;
  static jfieldID id_fieldID;
  /// Identifier of the chat that is subscribed.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Point in time (Unix timestamp) when the subscription will expire or expired.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// True, if the subscription was canceled.
  bool is_canceled_;
  static jfieldID is_canceled_fieldID;
  /// True, if the subscription expires soon and there are no enough Telegram Stars on the user's balance to extend it.
  bool is_expiring_;
  static jfieldID is_expiring_fieldID;
  /// The subscription plan.
  object_ptr<starSubscriptionPricing> pricing_;
  static jfieldID pricing_fieldID;
  /// Type of the subscription.
  object_ptr<StarSubscriptionType> type_;
  static jfieldID type_fieldID;

  /**
   * Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars.
   */
  starSubscription();

  /**
   * Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars.
   *
   * \param[in] id_ Unique identifier of the subscription.
   * \param[in] chat_id_ Identifier of the chat that is subscribed.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the subscription will expire or expired.
   * \param[in] is_canceled_ True, if the subscription was canceled.
   * \param[in] is_expiring_ True, if the subscription expires soon and there are no enough Telegram Stars on the user's balance to extend it.
   * \param[in] pricing_ The subscription plan.
   * \param[in] type_ Type of the subscription.
   */
  starSubscription(string const &id_, int53 chat_id_, int32 expiration_date_, bool is_canceled_, bool is_expiring_, object_ptr<starSubscriptionPricing> &&pricing_, object_ptr<StarSubscriptionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 976753141;

  static object_ptr<starSubscription> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes subscription plan paid in Telegram Stars.
 */
class starSubscriptionPricing final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of seconds between consecutive Telegram Star debiting.
  int32 period_;
  static jfieldID period_fieldID;
  /// The Telegram Star amount that must be paid for each period.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Describes subscription plan paid in Telegram Stars.
   */
  starSubscriptionPricing();

  /**
   * Describes subscription plan paid in Telegram Stars.
   *
   * \param[in] period_ The number of seconds between consecutive Telegram Star debiting.
   * \param[in] star_count_ The Telegram Star amount that must be paid for each period.
   */
  starSubscriptionPricing(int32 period_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1767733162;

  static object_ptr<starSubscriptionPricing> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

/**
 * This class is an abstract base class.
 * Describes type of subscription paid in Telegram Stars.
 */
class StarSubscriptionType: public Object {
 public:
  static jclass Class;

  static object_ptr<StarSubscriptionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a subscription to a channel chat.
 */
class starSubscriptionTypeChannel final : public StarSubscriptionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the subscription is active and the user can use the method reuseStarSubscription to join the subscribed chat again.
  bool can_reuse_;
  static jfieldID can_reuse_fieldID;
  /// The invite link that can be used to renew the subscription if it has been expired; may be empty, if the link isn't available anymore.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Describes a subscription to a channel chat.
   */
  starSubscriptionTypeChannel();

  /**
   * Describes a subscription to a channel chat.
   *
   * \param[in] can_reuse_ True, if the subscription is active and the user can use the method reuseStarSubscription to join the subscribed chat again.
   * \param[in] invite_link_ The invite link that can be used to renew the subscription if it has been expired; may be empty, if the link isn't available anymore.
   */
  starSubscriptionTypeChannel(bool can_reuse_, string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1030048011;

  static object_ptr<StarSubscriptionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a subscription in a bot or a business account.
 */
class starSubscriptionTypeBot final : public StarSubscriptionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the subscription was canceled by the bot and can't be extended.
  bool is_canceled_by_bot_;
  static jfieldID is_canceled_by_bot_fieldID;
  /// Subscription invoice title.
  string title_;
  static jfieldID title_fieldID;
  /// Subscription invoice photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// The link to the subscription invoice.
  string invoice_link_;
  static jfieldID invoice_link_fieldID;

  /**
   * Describes a subscription in a bot or a business account.
   */
  starSubscriptionTypeBot();

  /**
   * Describes a subscription in a bot or a business account.
   *
   * \param[in] is_canceled_by_bot_ True, if the subscription was canceled by the bot and can't be extended.
   * \param[in] title_ Subscription invoice title.
   * \param[in] photo_ Subscription invoice photo.
   * \param[in] invoice_link_ The link to the subscription invoice.
   */
  starSubscriptionTypeBot(bool is_canceled_by_bot_, string const &title_, object_ptr<photo> &&photo_, string const &invoice_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 226024914;

  static object_ptr<StarSubscriptionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starAmount;

class starSubscription;

/**
 * Represents a list of Telegram Star subscriptions.
 */
class starSubscriptions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The amount of owned Telegram Stars.
  object_ptr<starAmount> star_amount_;
  static jfieldID star_amount_fieldID;
  /// List of subscriptions for Telegram Stars.
  array<object_ptr<starSubscription>> subscriptions_;
  static jfieldID subscriptions_fieldID;
  /// The number of Telegram Stars required to buy to extend subscriptions expiring soon.
  int53 required_star_count_;
  static jfieldID required_star_count_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of Telegram Star subscriptions.
   */
  starSubscriptions();

  /**
   * Represents a list of Telegram Star subscriptions.
   *
   * \param[in] star_amount_ The amount of owned Telegram Stars.
   * \param[in] subscriptions_ List of subscriptions for Telegram Stars.
   * \param[in] required_star_count_ The number of Telegram Stars required to buy to extend subscriptions expiring soon.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  starSubscriptions(object_ptr<starAmount> &&star_amount_, array<object_ptr<starSubscription>> &&subscriptions_, int53 required_star_count_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 151169395;

  static object_ptr<starSubscriptions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StarTransactionType;

class starAmount;

/**
 * Represents a transaction changing the amount of owned Telegram Stars.
 */
class starTransaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the transaction.
  string id_;
  static jfieldID id_fieldID;
  /// The amount of added owned Telegram Stars; negative for outgoing transactions.
  object_ptr<starAmount> star_amount_;
  static jfieldID star_amount_fieldID;
  /// True, if the transaction is a refund of a previous transaction.
  bool is_refund_;
  static jfieldID is_refund_fieldID;
  /// Point in time (Unix timestamp) when the transaction was completed.
  int32 date_;
  static jfieldID date_fieldID;
  /// Type of the transaction.
  object_ptr<StarTransactionType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a transaction changing the amount of owned Telegram Stars.
   */
  starTransaction();

  /**
   * Represents a transaction changing the amount of owned Telegram Stars.
   *
   * \param[in] id_ Unique identifier of the transaction.
   * \param[in] star_amount_ The amount of added owned Telegram Stars; negative for outgoing transactions.
   * \param[in] is_refund_ True, if the transaction is a refund of a previous transaction.
   * \param[in] date_ Point in time (Unix timestamp) when the transaction was completed.
   * \param[in] type_ Type of the transaction.
   */
  starTransaction(string const &id_, object_ptr<starAmount> &&star_amount_, bool is_refund_, int32 date_, object_ptr<StarTransactionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2139228816;

  static object_ptr<starTransaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class PaidMedia;

class RevenueWithdrawalState;

class affiliateInfo;

class gift;

class productInfo;

class starAmount;

class sticker;

class upgradedGift;

/**
 * This class is an abstract base class.
 * Describes type of transaction with Telegram Stars.
 */
class StarTransactionType: public Object {
 public:
  static jclass Class;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Telegram Stars from the Premium bot; relevant for regular users only.
 */
class starTransactionTypePremiumBotDeposit final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a deposit of Telegram Stars from the Premium bot; relevant for regular users only.
   */
  starTransactionTypePremiumBotDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -663156466;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Telegram Stars from App Store; relevant for regular users only.
 */
class starTransactionTypeAppStoreDeposit final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a deposit of Telegram Stars from App Store; relevant for regular users only.
   */
  starTransactionTypeAppStoreDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 136853825;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Telegram Stars from Google Play; relevant for regular users only.
 */
class starTransactionTypeGooglePlayDeposit final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a deposit of Telegram Stars from Google Play; relevant for regular users only.
   */
  starTransactionTypeGooglePlayDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -323111338;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Telegram Stars from Fragment; relevant for regular users and bots only.
 */
class starTransactionTypeFragmentDeposit final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a deposit of Telegram Stars from Fragment; relevant for regular users and bots only.
   */
  starTransactionTypeFragmentDeposit();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 123887172;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Telegram Stars by another user; relevant for regular users only.
 */
class starTransactionTypeUserDeposit final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who gifted Telegram Stars; 0 if the user was anonymous.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The sticker to be shown in the transaction information; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * The transaction is a deposit of Telegram Stars by another user; relevant for regular users only.
   */
  starTransactionTypeUserDeposit();

  /**
   * The transaction is a deposit of Telegram Stars by another user; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the user who gifted Telegram Stars; 0 if the user was anonymous.
   * \param[in] sticker_ The sticker to be shown in the transaction information; may be null if unknown.
   */
  starTransactionTypeUserDeposit(int53 user_id_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 204085481;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Telegram Stars from a giveaway; relevant for regular users only.
 */
class starTransactionTypeGiveawayDeposit final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a supergroup or a channel chat that created the giveaway.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message.
  int53 giveaway_message_id_;
  static jfieldID giveaway_message_id_fieldID;

  /**
   * The transaction is a deposit of Telegram Stars from a giveaway; relevant for regular users only.
   */
  starTransactionTypeGiveawayDeposit();

  /**
   * The transaction is a deposit of Telegram Stars from a giveaway; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of a supergroup or a channel chat that created the giveaway.
   * \param[in] giveaway_message_id_ Identifier of the message with the giveaway; may be 0 or an identifier of a deleted message.
   */
  starTransactionTypeGiveawayDeposit(int53 chat_id_, int53 giveaway_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1318977338;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a withdrawal of earned Telegram Stars to Fragment; relevant for regular users, bots, supergroup and channel chats only.
 */
class starTransactionTypeFragmentWithdrawal final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// State of the withdrawal; may be null for refunds from Fragment.
  object_ptr<RevenueWithdrawalState> withdrawal_state_;
  static jfieldID withdrawal_state_fieldID;

  /**
   * The transaction is a withdrawal of earned Telegram Stars to Fragment; relevant for regular users, bots, supergroup and channel chats only.
   */
  starTransactionTypeFragmentWithdrawal();

  /**
   * The transaction is a withdrawal of earned Telegram Stars to Fragment; relevant for regular users, bots, supergroup and channel chats only.
   *
   * \param[in] withdrawal_state_ State of the withdrawal; may be null for refunds from Fragment.
   */
  explicit starTransactionTypeFragmentWithdrawal(object_ptr<RevenueWithdrawalState> &&withdrawal_state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1355142766;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; relevant for bots and channel chats only.
 */
class starTransactionTypeTelegramAdsWithdrawal final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a withdrawal of earned Telegram Stars to Telegram Ad platform; relevant for bots and channel chats only.
   */
  starTransactionTypeTelegramAdsWithdrawal();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1517386647;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a payment for Telegram API usage; relevant for bots only.
 */
class starTransactionTypeTelegramApiUsage final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of billed requests.
  int32 request_count_;
  static jfieldID request_count_fieldID;

  /**
   * The transaction is a payment for Telegram API usage; relevant for bots only.
   */
  starTransactionTypeTelegramApiUsage();

  /**
   * The transaction is a payment for Telegram API usage; relevant for bots only.
   *
   * \param[in] request_count_ The number of billed requests.
   */
  explicit starTransactionTypeTelegramApiUsage(int32 request_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 665332478;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of paid media from a bot or a business account by the current user; relevant for regular users only.
 */
class starTransactionTypeBotPaidMediaPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot or the business account user who sent the paid media.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The bought media if the transaction wasn't refunded.
  array<object_ptr<PaidMedia>> media_;
  static jfieldID media_fieldID;

  /**
   * The transaction is a purchase of paid media from a bot or a business account by the current user; relevant for regular users only.
   */
  starTransactionTypeBotPaidMediaPurchase();

  /**
   * The transaction is a purchase of paid media from a bot or a business account by the current user; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot or the business account user who sent the paid media.
   * \param[in] media_ The bought media if the transaction wasn't refunded.
   */
  starTransactionTypeBotPaidMediaPurchase(int53 user_id_, array<object_ptr<PaidMedia>> &&media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 976645509;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of paid media by the bot or a business account managed by the bot; relevant for bots only.
 */
class starTransactionTypeBotPaidMediaSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the media.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The bought media.
  array<object_ptr<PaidMedia>> media_;
  static jfieldID media_fieldID;
  /// Bot-provided payload.
  string payload_;
  static jfieldID payload_fieldID;
  /// Information about the affiliate which received commission from the transaction; may be null if none.
  object_ptr<affiliateInfo> affiliate_;
  static jfieldID affiliate_fieldID;

  /**
   * The transaction is a sale of paid media by the bot or a business account managed by the bot; relevant for bots only.
   */
  starTransactionTypeBotPaidMediaSale();

  /**
   * The transaction is a sale of paid media by the bot or a business account managed by the bot; relevant for bots only.
   *
   * \param[in] user_id_ Identifier of the user who bought the media.
   * \param[in] media_ The bought media.
   * \param[in] payload_ Bot-provided payload.
   * \param[in] affiliate_ Information about the affiliate which received commission from the transaction; may be null if none.
   */
  starTransactionTypeBotPaidMediaSale(int53 user_id_, array<object_ptr<PaidMedia>> &&media_, string const &payload_, object_ptr<affiliateInfo> &&affiliate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1034408372;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of paid media from a channel by the current user; relevant for regular users only.
 */
class starTransactionTypeChannelPaidMediaPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat that sent the paid media.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The bought media if the transaction wasn't refunded.
  array<object_ptr<PaidMedia>> media_;
  static jfieldID media_fieldID;

  /**
   * The transaction is a purchase of paid media from a channel by the current user; relevant for regular users only.
   */
  starTransactionTypeChannelPaidMediaPurchase();

  /**
   * The transaction is a purchase of paid media from a channel by the current user; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the channel chat that sent the paid media.
   * \param[in] message_id_ Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message.
   * \param[in] media_ The bought media if the transaction wasn't refunded.
   */
  starTransactionTypeChannelPaidMediaPurchase(int53 chat_id_, int53 message_id_, array<object_ptr<PaidMedia>> &&media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1321281338;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of paid media by the channel chat; relevant for channel chats only.
 */
class starTransactionTypeChannelPaidMediaSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the media.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The bought media.
  array<object_ptr<PaidMedia>> media_;
  static jfieldID media_fieldID;

  /**
   * The transaction is a sale of paid media by the channel chat; relevant for channel chats only.
   */
  starTransactionTypeChannelPaidMediaSale();

  /**
   * The transaction is a sale of paid media by the channel chat; relevant for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user who bought the media.
   * \param[in] message_id_ Identifier of the corresponding message with paid media; may be 0 or an identifier of a deleted message.
   * \param[in] media_ The bought media.
   */
  starTransactionTypeChannelPaidMediaSale(int53 user_id_, int53 message_id_, array<object_ptr<PaidMedia>> &&media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 52587085;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of a product from a bot or a business account by the current user; relevant for regular users only.
 */
class starTransactionTypeBotInvoicePurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot or the business account user who created the invoice.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Information about the bought product.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;

  /**
   * The transaction is a purchase of a product from a bot or a business account by the current user; relevant for regular users only.
   */
  starTransactionTypeBotInvoicePurchase();

  /**
   * The transaction is a purchase of a product from a bot or a business account by the current user; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot or the business account user who created the invoice.
   * \param[in] product_info_ Information about the bought product.
   */
  starTransactionTypeBotInvoicePurchase(int53 user_id_, object_ptr<productInfo> &&product_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 501066764;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of a product by the bot; relevant for bots only.
 */
class starTransactionTypeBotInvoiceSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the product.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Information about the bought product.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;
  /// Invoice payload.
  bytes invoice_payload_;
  static jfieldID invoice_payload_fieldID;
  /// Information about the affiliate which received commission from the transaction; may be null if none.
  object_ptr<affiliateInfo> affiliate_;
  static jfieldID affiliate_fieldID;

  /**
   * The transaction is a sale of a product by the bot; relevant for bots only.
   */
  starTransactionTypeBotInvoiceSale();

  /**
   * The transaction is a sale of a product by the bot; relevant for bots only.
   *
   * \param[in] user_id_ Identifier of the user who bought the product.
   * \param[in] product_info_ Information about the bought product.
   * \param[in] invoice_payload_ Invoice payload.
   * \param[in] affiliate_ Information about the affiliate which received commission from the transaction; may be null if none.
   */
  starTransactionTypeBotInvoiceSale(int53 user_id_, object_ptr<productInfo> &&product_info_, bytes const &invoice_payload_, object_ptr<affiliateInfo> &&affiliate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1534954799;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of a subscription from a bot or a business account by the current user; relevant for regular users only.
 */
class starTransactionTypeBotSubscriptionPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot or the business account user who created the subscription link.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;
  static jfieldID subscription_period_fieldID;
  /// Information about the bought subscription.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;

  /**
   * The transaction is a purchase of a subscription from a bot or a business account by the current user; relevant for regular users only.
   */
  starTransactionTypeBotSubscriptionPurchase();

  /**
   * The transaction is a purchase of a subscription from a bot or a business account by the current user; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot or the business account user who created the subscription link.
   * \param[in] subscription_period_ The number of seconds between consecutive Telegram Star debitings.
   * \param[in] product_info_ Information about the bought subscription.
   */
  starTransactionTypeBotSubscriptionPurchase(int53 user_id_, int32 subscription_period_, object_ptr<productInfo> &&product_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1086264149;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of a subscription by the bot; relevant for bots only.
 */
class starTransactionTypeBotSubscriptionSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the subscription.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;
  static jfieldID subscription_period_fieldID;
  /// Information about the bought subscription.
  object_ptr<productInfo> product_info_;
  static jfieldID product_info_fieldID;
  /// Invoice payload.
  bytes invoice_payload_;
  static jfieldID invoice_payload_fieldID;
  /// Information about the affiliate which received commission from the transaction; may be null if none.
  object_ptr<affiliateInfo> affiliate_;
  static jfieldID affiliate_fieldID;

  /**
   * The transaction is a sale of a subscription by the bot; relevant for bots only.
   */
  starTransactionTypeBotSubscriptionSale();

  /**
   * The transaction is a sale of a subscription by the bot; relevant for bots only.
   *
   * \param[in] user_id_ Identifier of the user who bought the subscription.
   * \param[in] subscription_period_ The number of seconds between consecutive Telegram Star debitings.
   * \param[in] product_info_ Information about the bought subscription.
   * \param[in] invoice_payload_ Invoice payload.
   * \param[in] affiliate_ Information about the affiliate which received commission from the transaction; may be null if none.
   */
  starTransactionTypeBotSubscriptionSale(int53 user_id_, int32 subscription_period_, object_ptr<productInfo> &&product_info_, bytes const &invoice_payload_, object_ptr<affiliateInfo> &&affiliate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 526936201;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of a subscription to a channel chat by the current user; relevant for regular users only.
 */
class starTransactionTypeChannelSubscriptionPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat that created the subscription.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;
  static jfieldID subscription_period_fieldID;

  /**
   * The transaction is a purchase of a subscription to a channel chat by the current user; relevant for regular users only.
   */
  starTransactionTypeChannelSubscriptionPurchase();

  /**
   * The transaction is a purchase of a subscription to a channel chat by the current user; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the channel chat that created the subscription.
   * \param[in] subscription_period_ The number of seconds between consecutive Telegram Star debitings.
   */
  starTransactionTypeChannelSubscriptionPurchase(int53 chat_id_, int32 subscription_period_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 940487633;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of a subscription by the channel chat; relevant for channel chats only.
 */
class starTransactionTypeChannelSubscriptionSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the subscription.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of seconds between consecutive Telegram Star debitings.
  int32 subscription_period_;
  static jfieldID subscription_period_fieldID;

  /**
   * The transaction is a sale of a subscription by the channel chat; relevant for channel chats only.
   */
  starTransactionTypeChannelSubscriptionSale();

  /**
   * The transaction is a sale of a subscription by the channel chat; relevant for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user who bought the subscription.
   * \param[in] subscription_period_ The number of seconds between consecutive Telegram Star debitings.
   */
  starTransactionTypeChannelSubscriptionSale(int53 user_id_, int32 subscription_period_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -32342910;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a bid on a gift auction; relevant for regular users only.
 */
class starTransactionTypeGiftAuctionBid final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who will receive the gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a bid on a gift auction; relevant for regular users only.
   */
  starTransactionTypeGiftAuctionBid();

  /**
   * The transaction is a bid on a gift auction; relevant for regular users only.
   *
   * \param[in] owner_id_ Identifier of the user who will receive the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftAuctionBid(object_ptr<MessageSender> &&owner_id_, object_ptr<gift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1557306224;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of a regular gift; relevant for regular users and bots only.
 */
class starTransactionTypeGiftPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel that received the gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a purchase of a regular gift; relevant for regular users and bots only.
   */
  starTransactionTypeGiftPurchase();

  /**
   * The transaction is a purchase of a regular gift; relevant for regular users and bots only.
   *
   * \param[in] owner_id_ Identifier of the user or the channel that received the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftPurchase(object_ptr<MessageSender> &&owner_id_, object_ptr<gift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1819045664;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is an offer of gift purchase; relevant for regular users only.
 */
class starTransactionTypeGiftPurchaseOffer final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is an offer of gift purchase; relevant for regular users only.
   */
  starTransactionTypeGiftPurchaseOffer();

  /**
   * The transaction is an offer of gift purchase; relevant for regular users only.
   *
   * \param[in] gift_ The gift.
   */
  explicit starTransactionTypeGiftPurchaseOffer(object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1220117354;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a transfer of an upgraded gift; relevant for regular users only.
 */
class starTransactionTypeGiftTransfer final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel that received the gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a transfer of an upgraded gift; relevant for regular users only.
   */
  starTransactionTypeGiftTransfer();

  /**
   * The transaction is a transfer of an upgraded gift; relevant for regular users only.
   *
   * \param[in] owner_id_ Identifier of the user or the channel that received the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftTransfer(object_ptr<MessageSender> &&owner_id_, object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 9835767;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a drop of original details of an upgraded gift; relevant for regular users only.
 */
class starTransactionTypeGiftOriginalDetailsDrop final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel that owns the gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a drop of original details of an upgraded gift; relevant for regular users only.
   */
  starTransactionTypeGiftOriginalDetailsDrop();

  /**
   * The transaction is a drop of original details of an upgraded gift; relevant for regular users only.
   *
   * \param[in] owner_id_ Identifier of the user or the channel that owns the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftOriginalDetailsDrop(object_ptr<MessageSender> &&owner_id_, object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1676911485;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of a received gift; relevant for regular users and channel chats only.
 */
class starTransactionTypeGiftSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who sent the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a sale of a received gift; relevant for regular users and channel chats only.
   */
  starTransactionTypeGiftSale();

  /**
   * The transaction is a sale of a received gift; relevant for regular users and channel chats only.
   *
   * \param[in] user_id_ Identifier of the user who sent the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftSale(int53 user_id_, object_ptr<gift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1691750743;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is an upgrade of a gift; relevant for regular users only.
 */
class starTransactionTypeGiftUpgrade final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who initially sent the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The upgraded gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is an upgrade of a gift; relevant for regular users only.
   */
  starTransactionTypeGiftUpgrade();

  /**
   * The transaction is an upgrade of a gift; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the user who initially sent the gift.
   * \param[in] gift_ The upgraded gift.
   */
  starTransactionTypeGiftUpgrade(int53 user_id_, object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -632388839;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only.
 */
class starTransactionTypeGiftUpgradePurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Owner of the upgraded gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The gift.
  object_ptr<gift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only.
   */
  starTransactionTypeGiftUpgradePurchase();

  /**
   * The transaction is a purchase of an upgrade of a gift owned by another user or channel; relevant for regular users only.
   *
   * \param[in] owner_id_ Owner of the upgraded gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeGiftUpgradePurchase(object_ptr<MessageSender> &&owner_id_, object_ptr<gift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -869970174;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only.
 */
class starTransactionTypeUpgradedGiftPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who sold the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only.
   */
  starTransactionTypeUpgradedGiftPurchase();

  /**
   * The transaction is a purchase of an upgraded gift for some user or channel; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the user who sold the gift.
   * \param[in] gift_ The gift.
   */
  starTransactionTypeUpgradedGiftPurchase(int53 user_id_, object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -59050247;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of an upgraded gift; relevant for regular users only.
 */
class starTransactionTypeUpgradedGiftSale final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars received by the seller of the gift.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// The Telegram Star amount that was received by Telegram; can be negative for refunds.
  object_ptr<starAmount> commission_star_amount_;
  static jfieldID commission_star_amount_fieldID;
  /// True, if the gift was sold through a purchase offer.
  bool via_offer_;
  static jfieldID via_offer_fieldID;

  /**
   * The transaction is a sale of an upgraded gift; relevant for regular users only.
   */
  starTransactionTypeUpgradedGiftSale();

  /**
   * The transaction is a sale of an upgraded gift; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the user who bought the gift.
   * \param[in] gift_ The gift.
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars received by the seller of the gift.
   * \param[in] commission_star_amount_ The Telegram Star amount that was received by Telegram; can be negative for refunds.
   * \param[in] via_offer_ True, if the gift was sold through a purchase offer.
   */
  starTransactionTypeUpgradedGiftSale(int53 user_id_, object_ptr<upgradedGift> &&gift_, int32 commission_per_mille_, object_ptr<starAmount> &&commission_star_amount_, bool via_offer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1004166760;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sending of a paid reaction to a message in a channel chat by the current user; relevant for regular users only.
 */
class starTransactionTypeChannelPaidReactionSend final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the reacted message; may be 0 or an identifier of a deleted message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * The transaction is a sending of a paid reaction to a message in a channel chat by the current user; relevant for regular users only.
   */
  starTransactionTypeChannelPaidReactionSend();

  /**
   * The transaction is a sending of a paid reaction to a message in a channel chat by the current user; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the channel chat.
   * \param[in] message_id_ Identifier of the reacted message; may be 0 or an identifier of a deleted message.
   */
  starTransactionTypeChannelPaidReactionSend(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1071224896;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a receiving of a paid reaction to a message by the channel chat; relevant for channel chats only.
 */
class starTransactionTypeChannelPaidReactionReceive final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who added the paid reaction.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Identifier of the reacted message; may be 0 or an identifier of a deleted message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * The transaction is a receiving of a paid reaction to a message by the channel chat; relevant for channel chats only.
   */
  starTransactionTypeChannelPaidReactionReceive();

  /**
   * The transaction is a receiving of a paid reaction to a message by the channel chat; relevant for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user who added the paid reaction.
   * \param[in] message_id_ Identifier of the reacted message; may be 0 or an identifier of a deleted message.
   */
  starTransactionTypeChannelPaidReactionReceive(int53 user_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 601291243;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a receiving of a commission from an affiliate program; relevant for regular users, bots and channel chats only.
 */
class starTransactionTypeAffiliateProgramCommission final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that created the affiliate program.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;

  /**
   * The transaction is a receiving of a commission from an affiliate program; relevant for regular users, bots and channel chats only.
   */
  starTransactionTypeAffiliateProgramCommission();

  /**
   * The transaction is a receiving of a commission from an affiliate program; relevant for regular users, bots and channel chats only.
   *
   * \param[in] chat_id_ Identifier of the chat that created the affiliate program.
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the program owner.
   */
  starTransactionTypeAffiliateProgramCommission(int53 chat_id_, int32 commission_per_mille_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1704757901;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sending of a paid message; relevant for regular users only.
 */
class starTransactionTypePaidMessageSend final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that received the payment.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Number of sent paid messages.
  int32 message_count_;
  static jfieldID message_count_fieldID;

  /**
   * The transaction is a sending of a paid message; relevant for regular users only.
   */
  starTransactionTypePaidMessageSend();

  /**
   * The transaction is a sending of a paid message; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the chat that received the payment.
   * \param[in] message_count_ Number of sent paid messages.
   */
  starTransactionTypePaidMessageSend(int53 chat_id_, int32 message_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1709611931;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a receiving of a paid message; relevant for regular users, supergroup and channel chats only.
 */
class starTransactionTypePaidMessageReceive final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Number of received paid messages.
  int32 message_count_;
  static jfieldID message_count_fieldID;
  /// The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// The Telegram Star amount that was received by Telegram; can be negative for refunds.
  object_ptr<starAmount> commission_star_amount_;
  static jfieldID commission_star_amount_fieldID;

  /**
   * The transaction is a receiving of a paid message; relevant for regular users, supergroup and channel chats only.
   */
  starTransactionTypePaidMessageReceive();

  /**
   * The transaction is a receiving of a paid message; relevant for regular users, supergroup and channel chats only.
   *
   * \param[in] sender_id_ Identifier of the sender of the message.
   * \param[in] message_count_ Number of received paid messages.
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending.
   * \param[in] commission_star_amount_ The Telegram Star amount that was received by Telegram; can be negative for refunds.
   */
  starTransactionTypePaidMessageReceive(object_ptr<MessageSender> &&sender_id_, int32 message_count_, int32 commission_per_mille_, object_ptr<starAmount> &&commission_star_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -676839994;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sending of a paid group call message; relevant for regular users only.
 */
class starTransactionTypePaidGroupCallMessageSend final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that received the payment.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The transaction is a sending of a paid group call message; relevant for regular users only.
   */
  starTransactionTypePaidGroupCallMessageSend();

  /**
   * The transaction is a sending of a paid group call message; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the chat that received the payment.
   */
  explicit starTransactionTypePaidGroupCallMessageSend(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -655578726;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a receiving of a paid group call message; relevant for regular users and channel chats only.
 */
class starTransactionTypePaidGroupCallMessageReceive final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// The Telegram Star amount that was received by Telegram; can be negative for refunds.
  object_ptr<starAmount> commission_star_amount_;
  static jfieldID commission_star_amount_fieldID;

  /**
   * The transaction is a receiving of a paid group call message; relevant for regular users and channel chats only.
   */
  starTransactionTypePaidGroupCallMessageReceive();

  /**
   * The transaction is a receiving of a paid group call message; relevant for regular users and channel chats only.
   *
   * \param[in] sender_id_ Identifier of the sender of the message.
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending.
   * \param[in] commission_star_amount_ The Telegram Star amount that was received by Telegram; can be negative for refunds.
   */
  starTransactionTypePaidGroupCallMessageReceive(object_ptr<MessageSender> &&sender_id_, int32 commission_per_mille_, object_ptr<starAmount> &&commission_star_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 197238067;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sending of a paid group reaction; relevant for regular users only.
 */
class starTransactionTypePaidGroupCallReactionSend final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that received the payment.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The transaction is a sending of a paid group reaction; relevant for regular users only.
   */
  starTransactionTypePaidGroupCallReactionSend();

  /**
   * The transaction is a sending of a paid group reaction; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the chat that received the payment.
   */
  explicit starTransactionTypePaidGroupCallReactionSend(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1410716443;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a receiving of a paid group call reaction; relevant for regular users and channel chats only.
 */
class starTransactionTypePaidGroupCallReactionReceive final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sender of the reaction.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for reaction sending.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// The Telegram Star amount that was received by Telegram; can be negative for refunds.
  object_ptr<starAmount> commission_star_amount_;
  static jfieldID commission_star_amount_fieldID;

  /**
   * The transaction is a receiving of a paid group call reaction; relevant for regular users and channel chats only.
   */
  starTransactionTypePaidGroupCallReactionReceive();

  /**
   * The transaction is a receiving of a paid group call reaction; relevant for regular users and channel chats only.
   *
   * \param[in] sender_id_ Identifier of the sender of the reaction.
   * \param[in] commission_per_mille_ The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for reaction sending.
   * \param[in] commission_star_amount_ The Telegram Star amount that was received by Telegram; can be negative for refunds.
   */
  starTransactionTypePaidGroupCallReactionReceive(object_ptr<MessageSender> &&sender_id_, int32 commission_per_mille_, object_ptr<starAmount> &&commission_star_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1410001679;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a payment for a suggested post; relevant for regular users only.
 */
class starTransactionTypeSuggestedPostPaymentSend final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat that posted the post.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The transaction is a payment for a suggested post; relevant for regular users only.
   */
  starTransactionTypeSuggestedPostPaymentSend();

  /**
   * The transaction is a payment for a suggested post; relevant for regular users only.
   *
   * \param[in] chat_id_ Identifier of the channel chat that posted the post.
   */
  explicit starTransactionTypeSuggestedPostPaymentSend(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 508845173;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a receiving of a payment for a suggested post by the channel chat; relevant for channel chats only.
 */
class starTransactionTypeSuggestedPostPaymentReceive final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who paid for the suggested post.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * The transaction is a receiving of a payment for a suggested post by the channel chat; relevant for channel chats only.
   */
  starTransactionTypeSuggestedPostPaymentReceive();

  /**
   * The transaction is a receiving of a payment for a suggested post by the channel chat; relevant for channel chats only.
   *
   * \param[in] user_id_ Identifier of the user who paid for the suggested post.
   */
  explicit starTransactionTypeSuggestedPostPaymentReceive(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 480833401;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of Telegram Premium subscription; relevant for regular users and bots only.
 */
class starTransactionTypePremiumPurchase final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who received the Telegram Premium subscription.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// A sticker to be shown in the transaction information; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * The transaction is a purchase of Telegram Premium subscription; relevant for regular users and bots only.
   */
  starTransactionTypePremiumPurchase();

  /**
   * The transaction is a purchase of Telegram Premium subscription; relevant for regular users and bots only.
   *
   * \param[in] user_id_ Identifier of the user who received the Telegram Premium subscription.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active.
   * \param[in] sticker_ A sticker to be shown in the transaction information; may be null if unknown.
   */
  starTransactionTypePremiumPurchase(int53 user_id_, int32 month_count_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 998094851;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a transfer of Telegram Stars to a business bot; relevant for regular users only.
 */
class starTransactionTypeBusinessBotTransferSend final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot that received Telegram Stars.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * The transaction is a transfer of Telegram Stars to a business bot; relevant for regular users only.
   */
  starTransactionTypeBusinessBotTransferSend();

  /**
   * The transaction is a transfer of Telegram Stars to a business bot; relevant for regular users only.
   *
   * \param[in] user_id_ Identifier of the bot that received Telegram Stars.
   */
  explicit starTransactionTypeBusinessBotTransferSend(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1221227814;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a transfer of Telegram Stars from a business account; relevant for bots only.
 */
class starTransactionTypeBusinessBotTransferReceive final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who sent Telegram Stars.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * The transaction is a transfer of Telegram Stars from a business account; relevant for bots only.
   */
  starTransactionTypeBusinessBotTransferReceive();

  /**
   * The transaction is a transfer of Telegram Stars from a business account; relevant for bots only.
   *
   * \param[in] user_id_ Identifier of the user who sent Telegram Stars.
   */
  explicit starTransactionTypeBusinessBotTransferReceive(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 532496778;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a payment for search of posts in public Telegram channels; relevant for regular users only.
 */
class starTransactionTypePublicPostSearch final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a payment for search of posts in public Telegram channels; relevant for regular users only.
   */
  starTransactionTypePublicPostSearch();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1390533454;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a transaction of an unsupported type.
 */
class starTransactionTypeUnsupported final : public StarTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a transaction of an unsupported type.
   */
  starTransactionTypeUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1993329330;

  static object_ptr<StarTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class starAmount;

class starTransaction;

/**
 * Represents a list of Telegram Star transactions.
 */
class starTransactions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The amount of owned Telegram Stars.
  object_ptr<starAmount> star_amount_;
  static jfieldID star_amount_fieldID;
  /// List of transactions with Telegram Stars.
  array<object_ptr<starTransaction>> transactions_;
  static jfieldID transactions_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of Telegram Star transactions.
   */
  starTransactions();

  /**
   * Represents a list of Telegram Star transactions.
   *
   * \param[in] star_amount_ The amount of owned Telegram Stars.
   * \param[in] transactions_ List of transactions with Telegram Stars.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  starTransactions(object_ptr<starAmount> &&star_amount_, array<object_ptr<starTransaction>> &&transactions_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1218437859;

  static object_ptr<starTransactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class CanPostStoryResult;

class story;

/**
 * This class is an abstract base class.
 * Represents result of starting a live story.
 */
class StartLiveStoryResult: public Object {
 public:
  static jclass Class;

  static object_ptr<StartLiveStoryResult> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The live story was successfully posted.
 */
class startLiveStoryResultOk final : public StartLiveStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The live story.
  object_ptr<story> story_;
  static jfieldID story_fieldID;

  /**
   * The live story was successfully posted.
   */
  startLiveStoryResultOk();

  /**
   * The live story was successfully posted.
   *
   * \param[in] story_ The live story.
   */
  explicit startLiveStoryResultOk(object_ptr<story> &&story_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -387759428;

  static object_ptr<StartLiveStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The live story failed to post with an error to be handled.
 */
class startLiveStoryResultFail final : public StartLiveStoryResult {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the error; other error types may be returned as regular errors.
  object_ptr<CanPostStoryResult> error_type_;
  static jfieldID error_type_fieldID;

  /**
   * The live story failed to post with an error to be handled.
   */
  startLiveStoryResultFail();

  /**
   * The live story failed to post with an error to be handled.
   *
   * \param[in] error_type_ Type of the error; other error types may be returned as regular errors.
   */
  explicit startLiveStoryResultFail(object_ptr<CanPostStoryResult> &&error_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 495261112;

  static object_ptr<StartLiveStoryResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a statistical graph.
 */
class StatisticalGraph: public Object {
 public:
  static jclass Class;

  static object_ptr<StatisticalGraph> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A graph data.
 */
class statisticalGraphData final : public StatisticalGraph {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Graph data in JSON format.
  string json_data_;
  static jfieldID json_data_fieldID;
  /// If non-empty, a token which can be used to receive a zoomed in graph.
  string zoom_token_;
  static jfieldID zoom_token_fieldID;

  /**
   * A graph data.
   */
  statisticalGraphData();

  /**
   * A graph data.
   *
   * \param[in] json_data_ Graph data in JSON format.
   * \param[in] zoom_token_ If non-empty, a token which can be used to receive a zoomed in graph.
   */
  statisticalGraphData(string const &json_data_, string const &zoom_token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1988940244;

  static object_ptr<StatisticalGraph> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The graph data to be asynchronously loaded through getStatisticalGraph.
 */
class statisticalGraphAsync final : public StatisticalGraph {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The token to use for data loading.
  string token_;
  static jfieldID token_fieldID;

  /**
   * The graph data to be asynchronously loaded through getStatisticalGraph.
   */
  statisticalGraphAsync();

  /**
   * The graph data to be asynchronously loaded through getStatisticalGraph.
   *
   * \param[in] token_ The token to use for data loading.
   */
  explicit statisticalGraphAsync(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 435891103;

  static object_ptr<StatisticalGraph> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An error message to be shown to the user instead of the graph.
 */
class statisticalGraphError final : public StatisticalGraph {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The error message.
  string error_message_;
  static jfieldID error_message_fieldID;

  /**
   * An error message to be shown to the user instead of the graph.
   */
  statisticalGraphError();

  /**
   * An error message to be shown to the user instead of the graph.
   *
   * \param[in] error_message_ The error message.
   */
  explicit statisticalGraphError(string const &error_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1006788526;

  static object_ptr<StatisticalGraph> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A value with information about its recent changes.
 */
class statisticalValue final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The current value.
  double value_;
  static jfieldID value_fieldID;
  /// The value for the previous day.
  double previous_value_;
  static jfieldID previous_value_fieldID;
  /// The growth rate of the value, as a percentage.
  double growth_rate_percentage_;
  static jfieldID growth_rate_percentage_fieldID;

  /**
   * A value with information about its recent changes.
   */
  statisticalValue();

  /**
   * A value with information about its recent changes.
   *
   * \param[in] value_ The current value.
   * \param[in] previous_value_ The value for the previous day.
   * \param[in] growth_rate_percentage_ The growth rate of the value, as a percentage.
   */
  statisticalValue(double value_, double previous_value_, double growth_rate_percentage_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1651337846;

  static object_ptr<statisticalValue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StickerFormat;

class StickerFullType;

class file;

class thumbnail;

/**
 * Describes a sticker.
 */
class sticker final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique sticker identifier within the set; 0 if none.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the sticker set to which the sticker belongs; 0 if none.
  int64 set_id_;
  static jfieldID set_id_fieldID;
  /// Sticker width; as defined by the sender.
  int32 width_;
  static jfieldID width_fieldID;
  /// Sticker height; as defined by the sender.
  int32 height_;
  static jfieldID height_fieldID;
  /// Emoji corresponding to the sticker; may be empty if unknown.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// Sticker format.
  object_ptr<StickerFormat> format_;
  static jfieldID format_fieldID;
  /// Sticker's full type.
  object_ptr<StickerFullType> full_type_;
  static jfieldID full_type_fieldID;
  /// Sticker thumbnail in WEBP or JPEG format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// File containing the sticker.
  object_ptr<file> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Describes a sticker.
   */
  sticker();

  /**
   * Describes a sticker.
   *
   * \param[in] id_ Unique sticker identifier within the set; 0 if none.
   * \param[in] set_id_ Identifier of the sticker set to which the sticker belongs; 0 if none.
   * \param[in] width_ Sticker width; as defined by the sender.
   * \param[in] height_ Sticker height; as defined by the sender.
   * \param[in] emoji_ Emoji corresponding to the sticker; may be empty if unknown.
   * \param[in] format_ Sticker format.
   * \param[in] full_type_ Sticker's full type.
   * \param[in] thumbnail_ Sticker thumbnail in WEBP or JPEG format; may be null.
   * \param[in] sticker_ File containing the sticker.
   */
  sticker(int64 id_, int64 set_id_, int32 width_, int32 height_, string const &emoji_, object_ptr<StickerFormat> &&format_, object_ptr<StickerFullType> &&full_type_, object_ptr<thumbnail> &&thumbnail_, object_ptr<file> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -647013057;

  static object_ptr<sticker> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes format of a sticker.
 */
class StickerFormat: public Object {
 public:
  static jclass Class;

  static object_ptr<StickerFormat> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is an image in WEBP format.
 */
class stickerFormatWebp final : public StickerFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sticker is an image in WEBP format.
   */
  stickerFormatWebp();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2123043040;

  static object_ptr<StickerFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is an animation in TGS format.
 */
class stickerFormatTgs final : public StickerFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sticker is an animation in TGS format.
   */
  stickerFormatTgs();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1614588662;

  static object_ptr<StickerFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a video in WEBM format.
 */
class stickerFormatWebm final : public StickerFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sticker is a video in WEBM format.
   */
  stickerFormatWebm();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2070162097;

  static object_ptr<StickerFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class maskPosition;

/**
 * This class is an abstract base class.
 * Contains full information about sticker type.
 */
class StickerFullType: public Object {
 public:
  static jclass Class;

  static object_ptr<StickerFullType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a regular sticker.
 */
class stickerFullTypeRegular final : public StickerFullType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Premium animation of the sticker; may be null. If present, only Telegram Premium users can use the sticker.
  object_ptr<file> premium_animation_;
  static jfieldID premium_animation_fieldID;

  /**
   * The sticker is a regular sticker.
   */
  stickerFullTypeRegular();

  /**
   * The sticker is a regular sticker.
   *
   * \param[in] premium_animation_ Premium animation of the sticker; may be null. If present, only Telegram Premium users can use the sticker.
   */
  explicit stickerFullTypeRegular(object_ptr<file> &&premium_animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2006425865;

  static object_ptr<StickerFullType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a mask in WEBP format to be placed on photos or videos.
 */
class stickerFullTypeMask final : public StickerFullType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Position where the mask is placed; may be null.
  object_ptr<maskPosition> mask_position_;
  static jfieldID mask_position_fieldID;

  /**
   * The sticker is a mask in WEBP format to be placed on photos or videos.
   */
  stickerFullTypeMask();

  /**
   * The sticker is a mask in WEBP format to be placed on photos or videos.
   *
   * \param[in] mask_position_ Position where the mask is placed; may be null.
   */
  explicit stickerFullTypeMask(object_ptr<maskPosition> &&mask_position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 652197687;

  static object_ptr<StickerFullType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji.
 */
class stickerFullTypeCustomEmoji final : public StickerFullType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the custom emoji.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;
  /// True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places.
  bool needs_repainting_;
  static jfieldID needs_repainting_fieldID;

  /**
   * The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji.
   */
  stickerFullTypeCustomEmoji();

  /**
   * The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji.
   *
   * \param[in] custom_emoji_id_ Identifier of the custom emoji.
   * \param[in] needs_repainting_ True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places.
   */
  stickerFullTypeCustomEmoji(int64 custom_emoji_id_, bool needs_repainting_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1015085653;

  static object_ptr<StickerFullType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class emojis;

class outline;

class sticker;

class thumbnail;

/**
 * Represents a sticker set.
 */
class stickerSet final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set.
  int64 id_;
  static jfieldID id_fieldID;
  /// Title of the sticker set.
  string title_;
  static jfieldID title_fieldID;
  /// Name of the sticker set.
  string name_;
  static jfieldID name_fieldID;
  /// Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Sticker set thumbnail's outline; may be null if unknown.
  object_ptr<outline> thumbnail_outline_;
  static jfieldID thumbnail_outline_fieldID;
  /// True, if the sticker set is owned by the current user.
  bool is_owned_;
  static jfieldID is_owned_fieldID;
  /// True, if the sticker set has been installed by the current user.
  bool is_installed_;
  static jfieldID is_installed_fieldID;
  /// True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously.
  bool is_archived_;
  static jfieldID is_archived_fieldID;
  /// True, if the sticker set is official.
  bool is_official_;
  static jfieldID is_official_fieldID;
  /// Type of the stickers in the set.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only.
  bool needs_repainting_;
  static jfieldID needs_repainting_fieldID;
  /// True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only.
  bool is_allowed_as_chat_emoji_status_;
  static jfieldID is_allowed_as_chat_emoji_status_fieldID;
  /// True for already viewed trending sticker sets.
  bool is_viewed_;
  static jfieldID is_viewed_fieldID;
  /// List of stickers in this set.
  array<object_ptr<sticker>> stickers_;
  static jfieldID stickers_fieldID;
  /// A list of emojis corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object.
  array<object_ptr<emojis>> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * Represents a sticker set.
   */
  stickerSet();

  /**
   * Represents a sticker set.
   *
   * \param[in] id_ Identifier of the sticker set.
   * \param[in] title_ Title of the sticker set.
   * \param[in] name_ Name of the sticker set.
   * \param[in] thumbnail_ Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed.
   * \param[in] thumbnail_outline_ Sticker set thumbnail's outline; may be null if unknown.
   * \param[in] is_owned_ True, if the sticker set is owned by the current user.
   * \param[in] is_installed_ True, if the sticker set has been installed by the current user.
   * \param[in] is_archived_ True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously.
   * \param[in] is_official_ True, if the sticker set is official.
   * \param[in] sticker_type_ Type of the stickers in the set.
   * \param[in] needs_repainting_ True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only.
   * \param[in] is_allowed_as_chat_emoji_status_ True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only.
   * \param[in] is_viewed_ True for already viewed trending sticker sets.
   * \param[in] stickers_ List of stickers in this set.
   * \param[in] emojis_ A list of emojis corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object.
   */
  stickerSet(int64 id_, string const &title_, string const &name_, object_ptr<thumbnail> &&thumbnail_, object_ptr<outline> &&thumbnail_outline_, bool is_owned_, bool is_installed_, bool is_archived_, bool is_official_, object_ptr<StickerType> &&sticker_type_, bool needs_repainting_, bool is_allowed_as_chat_emoji_status_, bool is_viewed_, array<object_ptr<sticker>> &&stickers_, array<object_ptr<emojis>> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1783150210;

  static object_ptr<stickerSet> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class outline;

class sticker;

class thumbnail;

/**
 * Represents short information about a sticker set.
 */
class stickerSetInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set.
  int64 id_;
  static jfieldID id_fieldID;
  /// Title of the sticker set.
  string title_;
  static jfieldID title_fieldID;
  /// Name of the sticker set.
  string name_;
  static jfieldID name_fieldID;
  /// Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Sticker set thumbnail's outline; may be null if unknown.
  object_ptr<outline> thumbnail_outline_;
  static jfieldID thumbnail_outline_fieldID;
  /// True, if the sticker set is owned by the current user.
  bool is_owned_;
  static jfieldID is_owned_fieldID;
  /// True, if the sticker set has been installed by the current user.
  bool is_installed_;
  static jfieldID is_installed_fieldID;
  /// True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously.
  bool is_archived_;
  static jfieldID is_archived_fieldID;
  /// True, if the sticker set is official.
  bool is_official_;
  static jfieldID is_official_fieldID;
  /// Type of the stickers in the set.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only.
  bool needs_repainting_;
  static jfieldID needs_repainting_fieldID;
  /// True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only.
  bool is_allowed_as_chat_emoji_status_;
  static jfieldID is_allowed_as_chat_emoji_status_fieldID;
  /// True for already viewed trending sticker sets.
  bool is_viewed_;
  static jfieldID is_viewed_fieldID;
  /// Total number of stickers in the set.
  int32 size_;
  static jfieldID size_fieldID;
  /// Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested.
  array<object_ptr<sticker>> covers_;
  static jfieldID covers_fieldID;

  /**
   * Represents short information about a sticker set.
   */
  stickerSetInfo();

  /**
   * Represents short information about a sticker set.
   *
   * \param[in] id_ Identifier of the sticker set.
   * \param[in] title_ Title of the sticker set.
   * \param[in] name_ Name of the sticker set.
   * \param[in] thumbnail_ Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed.
   * \param[in] thumbnail_outline_ Sticker set thumbnail's outline; may be null if unknown.
   * \param[in] is_owned_ True, if the sticker set is owned by the current user.
   * \param[in] is_installed_ True, if the sticker set has been installed by the current user.
   * \param[in] is_archived_ True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously.
   * \param[in] is_official_ True, if the sticker set is official.
   * \param[in] sticker_type_ Type of the stickers in the set.
   * \param[in] needs_repainting_ True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only.
   * \param[in] is_allowed_as_chat_emoji_status_ True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only.
   * \param[in] is_viewed_ True for already viewed trending sticker sets.
   * \param[in] size_ Total number of stickers in the set.
   * \param[in] covers_ Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested.
   */
  stickerSetInfo(int64 id_, string const &title_, string const &name_, object_ptr<thumbnail> &&thumbnail_, object_ptr<outline> &&thumbnail_outline_, bool is_owned_, bool is_installed_, bool is_archived_, bool is_official_, object_ptr<StickerType> &&sticker_type_, bool needs_repainting_, bool is_allowed_as_chat_emoji_status_, bool is_viewed_, int32 size_, array<object_ptr<sticker>> &&covers_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1649074729;

  static object_ptr<stickerSetInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class stickerSetInfo;

/**
 * Represents a list of sticker sets.
 */
class stickerSets final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of sticker sets found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of sticker sets.
  array<object_ptr<stickerSetInfo>> sets_;
  static jfieldID sets_fieldID;

  /**
   * Represents a list of sticker sets.
   */
  stickerSets();

  /**
   * Represents a list of sticker sets.
   *
   * \param[in] total_count_ Approximate total number of sticker sets found.
   * \param[in] sets_ List of sticker sets.
   */
  stickerSets(int32 total_count_, array<object_ptr<stickerSetInfo>> &&sets_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1883828812;

  static object_ptr<stickerSets> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes type of sticker.
 */
class StickerType: public Object {
 public:
  static jclass Class;

  static object_ptr<StickerType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a regular sticker.
 */
class stickerTypeRegular final : public StickerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sticker is a regular sticker.
   */
  stickerTypeRegular();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 56345973;

  static object_ptr<StickerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a mask in WEBP format to be placed on photos or videos.
 */
class stickerTypeMask final : public StickerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sticker is a mask in WEBP format to be placed on photos or videos.
   */
  stickerTypeMask();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1765394796;

  static object_ptr<StickerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sticker is a custom emoji to be used inside message text and caption.
 */
class stickerTypeCustomEmoji final : public StickerType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sticker is a custom emoji to be used inside message text and caption.
   */
  stickerTypeCustomEmoji();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -120752249;

  static object_ptr<StickerType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Represents a list of stickers.
 */
class stickers final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of stickers.
  array<object_ptr<sticker>> stickers_;
  static jfieldID stickers_fieldID;

  /**
   * Represents a list of stickers.
   */
  stickers();

  /**
   * Represents a list of stickers.
   *
   * \param[in] stickers_ List of stickers.
   */
  explicit stickers(array<object_ptr<sticker>> &&stickers_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1974859260;

  static object_ptr<stickers> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class storageStatisticsByChat;

/**
 * Contains the exact storage usage statistics split by chats and file type.
 */
class storageStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total size of files, in bytes.
  int53 size_;
  static jfieldID size_fieldID;
  /// Total number of files.
  int32 count_;
  static jfieldID count_fieldID;
  /// Statistics split by chats.
  array<object_ptr<storageStatisticsByChat>> by_chat_;
  static jfieldID by_chat_fieldID;

  /**
   * Contains the exact storage usage statistics split by chats and file type.
   */
  storageStatistics();

  /**
   * Contains the exact storage usage statistics split by chats and file type.
   *
   * \param[in] size_ Total size of files, in bytes.
   * \param[in] count_ Total number of files.
   * \param[in] by_chat_ Statistics split by chats.
   */
  storageStatistics(int53 size_, int32 count_, array<object_ptr<storageStatisticsByChat>> &&by_chat_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 217237013;

  static object_ptr<storageStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class storageStatisticsByFileType;

/**
 * Contains the storage usage statistics for a specific chat.
 */
class storageStatisticsByChat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier; 0 if none.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Total size of the files in the chat, in bytes.
  int53 size_;
  static jfieldID size_fieldID;
  /// Total number of files in the chat.
  int32 count_;
  static jfieldID count_fieldID;
  /// Statistics split by file types.
  array<object_ptr<storageStatisticsByFileType>> by_file_type_;
  static jfieldID by_file_type_fieldID;

  /**
   * Contains the storage usage statistics for a specific chat.
   */
  storageStatisticsByChat();

  /**
   * Contains the storage usage statistics for a specific chat.
   *
   * \param[in] chat_id_ Chat identifier; 0 if none.
   * \param[in] size_ Total size of the files in the chat, in bytes.
   * \param[in] count_ Total number of files in the chat.
   * \param[in] by_file_type_ Statistics split by file types.
   */
  storageStatisticsByChat(int53 chat_id_, int53 size_, int32 count_, array<object_ptr<storageStatisticsByFileType>> &&by_file_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 635434531;

  static object_ptr<storageStatisticsByChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class FileType;

/**
 * Contains the storage usage statistics for a specific file type.
 */
class storageStatisticsByFileType final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File type.
  object_ptr<FileType> file_type_;
  static jfieldID file_type_fieldID;
  /// Total size of the files, in bytes.
  int53 size_;
  static jfieldID size_fieldID;
  /// Total number of files.
  int32 count_;
  static jfieldID count_fieldID;

  /**
   * Contains the storage usage statistics for a specific file type.
   */
  storageStatisticsByFileType();

  /**
   * Contains the storage usage statistics for a specific file type.
   *
   * \param[in] file_type_ File type.
   * \param[in] size_ Total size of the files, in bytes.
   * \param[in] count_ Total number of files.
   */
  storageStatisticsByFileType(object_ptr<FileType> &&file_type_, int53 size_, int32 count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 714012840;

  static object_ptr<storageStatisticsByFileType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains approximate storage usage statistics, excluding files of unknown file type.
 */
class storageStatisticsFast final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total size of files, in bytes.
  int53 files_size_;
  static jfieldID files_size_fieldID;
  /// Approximate number of files.
  int32 file_count_;
  static jfieldID file_count_fieldID;
  /// Size of the database.
  int53 database_size_;
  static jfieldID database_size_fieldID;
  /// Size of the language pack database.
  int53 language_pack_database_size_;
  static jfieldID language_pack_database_size_fieldID;
  /// Size of the TDLib internal log.
  int53 log_size_;
  static jfieldID log_size_fieldID;

  /**
   * Contains approximate storage usage statistics, excluding files of unknown file type.
   */
  storageStatisticsFast();

  /**
   * Contains approximate storage usage statistics, excluding files of unknown file type.
   *
   * \param[in] files_size_ Approximate total size of files, in bytes.
   * \param[in] file_count_ Approximate number of files.
   * \param[in] database_size_ Size of the database.
   * \param[in] language_pack_database_size_ Size of the language pack database.
   * \param[in] log_size_ Size of the TDLib internal log.
   */
  storageStatisticsFast(int53 files_size_, int32 file_count_, int53 database_size_, int53 language_pack_database_size_, int53 log_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -884922271;

  static object_ptr<storageStatisticsFast> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class giveawayParameters;

/**
 * This class is an abstract base class.
 * Describes a purpose of an in-store payment.
 */
class StorePaymentPurpose: public Object {
 public:
  static jclass Class;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user subscribing to Telegram Premium.
 */
class storePaymentPurposePremiumSubscription final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
  bool is_restore_;
  static jfieldID is_restore_fieldID;
  /// Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store.
  bool is_upgrade_;
  static jfieldID is_upgrade_fieldID;

  /**
   * The user subscribing to Telegram Premium.
   */
  storePaymentPurposePremiumSubscription();

  /**
   * The user subscribing to Telegram Premium.
   *
   * \param[in] is_restore_ Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
   * \param[in] is_upgrade_ Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store.
   */
  storePaymentPurposePremiumSubscription(bool is_restore_, bool is_upgrade_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1263894804;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user gifting Telegram Premium to another user.
 */
class storePaymentPurposePremiumGift final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Identifiers of the user which will receive Telegram Premium.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * The user gifting Telegram Premium to another user.
   */
  storePaymentPurposePremiumGift();

  /**
   * The user gifting Telegram Premium to another user.
   *
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] user_id_ Identifiers of the user which will receive Telegram Premium.
   * \param[in] text_ Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
   */
  storePaymentPurposePremiumGift(string const &currency_, int53 amount_, int53 user_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -39502443;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user boosting a chat by creating Telegram Premium gift codes for other users.
 */
class storePaymentPurposePremiumGiftCodes final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user.
  int53 boosted_chat_id_;
  static jfieldID boosted_chat_id_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Identifiers of the users which can activate the gift codes.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;
  /// Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * The user boosting a chat by creating Telegram Premium gift codes for other users.
   */
  storePaymentPurposePremiumGiftCodes();

  /**
   * The user boosting a chat by creating Telegram Premium gift codes for other users.
   *
   * \param[in] boosted_chat_id_ Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] user_ids_ Identifiers of the users which can activate the gift codes.
   * \param[in] text_ Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
   */
  storePaymentPurposePremiumGiftCodes(int53 boosted_chat_id_, string const &currency_, int53 amount_, array<int53> &&user_ids_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1072286736;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user creating a Telegram Premium giveaway.
 */
class storePaymentPurposePremiumGiveaway final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;

  /**
   * The user creating a Telegram Premium giveaway.
   */
  storePaymentPurposePremiumGiveaway();

  /**
   * The user creating a Telegram Premium giveaway.
   *
   * \param[in] parameters_ Giveaway parameters.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   */
  storePaymentPurposePremiumGiveaway(object_ptr<giveawayParameters> &&parameters_, string const &currency_, int53 amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1302624938;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user creating a Telegram Star giveaway.
 */
class storePaymentPurposeStarGiveaway final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// The number of users to receive Telegram Stars.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// The number of Telegram Stars to be distributed through the giveaway.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * The user creating a Telegram Star giveaway.
   */
  storePaymentPurposeStarGiveaway();

  /**
   * The user creating a Telegram Star giveaway.
   *
   * \param[in] parameters_ Giveaway parameters.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] winner_count_ The number of users to receive Telegram Stars.
   * \param[in] star_count_ The number of Telegram Stars to be distributed through the giveaway.
   */
  storePaymentPurposeStarGiveaway(object_ptr<giveawayParameters> &&parameters_, string const &currency_, int53 amount_, int32 winner_count_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 211212441;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user buying Telegram Stars.
 */
class storePaymentPurposeStars final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of bought Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The user buying Telegram Stars.
   */
  storePaymentPurposeStars();

  /**
   * The user buying Telegram Stars.
   *
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] star_count_ Number of bought Telegram Stars.
   * \param[in] chat_id_ Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none.
   */
  storePaymentPurposeStars(string const &currency_, int53 amount_, int53 star_count_, int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 410189263;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user buying Telegram Stars for other users.
 */
class storePaymentPurposeGiftedStars final : public StorePaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user to which Telegram Stars are gifted.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of bought Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * The user buying Telegram Stars for other users.
   */
  storePaymentPurposeGiftedStars();

  /**
   * The user buying Telegram Stars for other users.
   *
   * \param[in] user_id_ Identifier of the user to which Telegram Stars are gifted.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] star_count_ Number of bought Telegram Stars.
   */
  storePaymentPurposeGiftedStars(int53 user_id_, string const &currency_, int53 amount_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 893691428;

  static object_ptr<StorePaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes an in-store transaction.
 */
class StoreTransaction: public Object {
 public:
  static jclass Class;

  static object_ptr<StoreTransaction> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A purchase through App Store.
 */
class storeTransactionAppStore final : public StoreTransaction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// App Store receipt.
  bytes receipt_;
  static jfieldID receipt_fieldID;

  /**
   * A purchase through App Store.
   */
  storeTransactionAppStore();

  /**
   * A purchase through App Store.
   *
   * \param[in] receipt_ App Store receipt.
   */
  explicit storeTransactionAppStore(bytes const &receipt_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1625562441;

  static object_ptr<StoreTransaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A purchase through Google Play.
 */
class storeTransactionGooglePlay final : public StoreTransaction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Application package name.
  string package_name_;
  static jfieldID package_name_fieldID;
  /// Identifier of the purchased store product.
  string store_product_id_;
  static jfieldID store_product_id_fieldID;
  /// Google Play purchase token.
  string purchase_token_;
  static jfieldID purchase_token_fieldID;

  /**
   * A purchase through Google Play.
   */
  storeTransactionGooglePlay();

  /**
   * A purchase through Google Play.
   *
   * \param[in] package_name_ Application package name.
   * \param[in] store_product_id_ Identifier of the purchased store product.
   * \param[in] purchase_token_ Google Play purchase token.
   */
  storeTransactionGooglePlay(string const &package_name_, string const &store_product_id_, string const &purchase_token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1094018617;

  static object_ptr<StoreTransaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class story;

/**
 * Represents a list of stories.
 */
class stories final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of stories found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// The list of stories.
  array<object_ptr<story>> stories_;
  static jfieldID stories_fieldID;
  /// Identifiers of the pinned stories; returned only in getChatPostedToChatPageStories with from_story_id == 0.
  array<int32> pinned_story_ids_;
  static jfieldID pinned_story_ids_fieldID;

  /**
   * Represents a list of stories.
   */
  stories();

  /**
   * Represents a list of stories.
   *
   * \param[in] total_count_ Approximate total number of stories found.
   * \param[in] stories_ The list of stories.
   * \param[in] pinned_story_ids_ Identifiers of the pinned stories; returned only in getChatPostedToChatPageStories with from_story_id == 0.
   */
  stories(int32 total_count_, array<object_ptr<story>> &&stories_, array<int32> &&pinned_story_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 670157595;

  static object_ptr<stories> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ReactionType;

class StoryContent;

class StoryPrivacySettings;

class formattedText;

class storyArea;

class storyInteractionInfo;

class storyRepostInfo;

/**
 * Represents a story.
 */
class story final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique story identifier among stories posted by the given chat.
  int32 id_;
  static jfieldID id_fieldID;
  /// Identifier of the chat that posted the story.
  int53 poster_chat_id_;
  static jfieldID poster_chat_id_fieldID;
  /// Identifier of the user or chat that posted the story; may be null if the story is posted on behalf of the poster_chat_id.
  object_ptr<MessageSender> poster_id_;
  static jfieldID poster_id_fieldID;
  /// Point in time (Unix timestamp) when the story was published.
  int32 date_;
  static jfieldID date_fieldID;
  /// True, if the story is being posted by the current user.
  bool is_being_posted_;
  static jfieldID is_being_posted_fieldID;
  /// True, if the story is being edited by the current user.
  bool is_being_edited_;
  static jfieldID is_being_edited_fieldID;
  /// True, if the story was edited.
  bool is_edited_;
  static jfieldID is_edited_fieldID;
  /// True, if the story is saved in the profile of the chat that posted it and will be available there after expiration.
  bool is_posted_to_chat_page_;
  static jfieldID is_posted_to_chat_page_fieldID;
  /// True, if the story is visible only for the current user.
  bool is_visible_only_for_self_;
  static jfieldID is_visible_only_for_self_fieldID;
  /// True, if the story can be added to an album using createStoryAlbum and addStoryAlbumStories.
  bool can_be_added_to_album_;
  static jfieldID can_be_added_to_album_fieldID;
  /// True, if the story can be deleted.
  bool can_be_deleted_;
  static jfieldID can_be_deleted_fieldID;
  /// True, if the story can be edited.
  bool can_be_edited_;
  static jfieldID can_be_edited_fieldID;
  /// True, if the story can be forwarded as a message or reposted as a story. Otherwise, screenshotting and saving of the story content must be also forbidden.
  bool can_be_forwarded_;
  static jfieldID can_be_forwarded_fieldID;
  /// True, if the story can be replied in the chat with the user who posted the story.
  bool can_be_replied_;
  static jfieldID can_be_replied_fieldID;
  /// True, if the story privacy settings can be changed.
  bool can_set_privacy_settings_;
  static jfieldID can_set_privacy_settings_fieldID;
  /// True, if the story's is_posted_to_chat_page value can be changed.
  bool can_toggle_is_posted_to_chat_page_;
  static jfieldID can_toggle_is_posted_to_chat_page_fieldID;
  /// True, if the story statistics are available through getStoryStatistics.
  bool can_get_statistics_;
  static jfieldID can_get_statistics_fieldID;
  /// True, if interactions with the story can be received through getStoryInteractions.
  bool can_get_interactions_;
  static jfieldID can_get_interactions_fieldID;
  /// True, if users viewed the story can't be received, because the story has expired more than getOption(&quot;story_viewers_expiration_delay&quot;) seconds ago.
  bool has_expired_viewers_;
  static jfieldID has_expired_viewers_fieldID;
  /// Information about the original story; may be null if the story wasn't reposted.
  object_ptr<storyRepostInfo> repost_info_;
  static jfieldID repost_info_fieldID;
  /// Information about interactions with the story; may be null if the story isn't owned or there were no interactions.
  object_ptr<storyInteractionInfo> interaction_info_;
  static jfieldID interaction_info_fieldID;
  /// Type of the chosen reaction; may be null if none.
  object_ptr<ReactionType> chosen_reaction_type_;
  static jfieldID chosen_reaction_type_fieldID;
  /// Privacy rules affecting story visibility; may be approximate for non-owned stories.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  static jfieldID privacy_settings_fieldID;
  /// Content of the story.
  object_ptr<StoryContent> content_;
  static jfieldID content_fieldID;
  /// Clickable areas to be shown on the story content.
  array<object_ptr<storyArea>> areas_;
  static jfieldID areas_fieldID;
  /// Caption of the story.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// Identifiers of story albums to which the story is added; only for manageable stories.
  array<int32> album_ids_;
  static jfieldID album_ids_fieldID;

  /**
   * Represents a story.
   */
  story();

  /**
   * Represents a story.
   *
   * \param[in] id_ Unique story identifier among stories posted by the given chat.
   * \param[in] poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] poster_id_ Identifier of the user or chat that posted the story; may be null if the story is posted on behalf of the poster_chat_id.
   * \param[in] date_ Point in time (Unix timestamp) when the story was published.
   * \param[in] is_being_posted_ True, if the story is being posted by the current user.
   * \param[in] is_being_edited_ True, if the story is being edited by the current user.
   * \param[in] is_edited_ True, if the story was edited.
   * \param[in] is_posted_to_chat_page_ True, if the story is saved in the profile of the chat that posted it and will be available there after expiration.
   * \param[in] is_visible_only_for_self_ True, if the story is visible only for the current user.
   * \param[in] can_be_added_to_album_ True, if the story can be added to an album using createStoryAlbum and addStoryAlbumStories.
   * \param[in] can_be_deleted_ True, if the story can be deleted.
   * \param[in] can_be_edited_ True, if the story can be edited.
   * \param[in] can_be_forwarded_ True, if the story can be forwarded as a message or reposted as a story. Otherwise, screenshotting and saving of the story content must be also forbidden.
   * \param[in] can_be_replied_ True, if the story can be replied in the chat with the user who posted the story.
   * \param[in] can_set_privacy_settings_ True, if the story privacy settings can be changed.
   * \param[in] can_toggle_is_posted_to_chat_page_ True, if the story's is_posted_to_chat_page value can be changed.
   * \param[in] can_get_statistics_ True, if the story statistics are available through getStoryStatistics.
   * \param[in] can_get_interactions_ True, if interactions with the story can be received through getStoryInteractions.
   * \param[in] has_expired_viewers_ True, if users viewed the story can't be received, because the story has expired more than getOption(&quot;story_viewers_expiration_delay&quot;) seconds ago.
   * \param[in] repost_info_ Information about the original story; may be null if the story wasn't reposted.
   * \param[in] interaction_info_ Information about interactions with the story; may be null if the story isn't owned or there were no interactions.
   * \param[in] chosen_reaction_type_ Type of the chosen reaction; may be null if none.
   * \param[in] privacy_settings_ Privacy rules affecting story visibility; may be approximate for non-owned stories.
   * \param[in] content_ Content of the story.
   * \param[in] areas_ Clickable areas to be shown on the story content.
   * \param[in] caption_ Caption of the story.
   * \param[in] album_ids_ Identifiers of story albums to which the story is added; only for manageable stories.
   */
  story(int32 id_, int53 poster_chat_id_, object_ptr<MessageSender> &&poster_id_, int32 date_, bool is_being_posted_, bool is_being_edited_, bool is_edited_, bool is_posted_to_chat_page_, bool is_visible_only_for_self_, bool can_be_added_to_album_, bool can_be_deleted_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_replied_, bool can_set_privacy_settings_, bool can_toggle_is_posted_to_chat_page_, bool can_get_statistics_, bool can_get_interactions_, bool has_expired_viewers_, object_ptr<storyRepostInfo> &&repost_info_, object_ptr<storyInteractionInfo> &&interaction_info_, object_ptr<ReactionType> &&chosen_reaction_type_, object_ptr<StoryPrivacySettings> &&privacy_settings_, object_ptr<StoryContent> &&content_, array<object_ptr<storyArea>> &&areas_, object_ptr<formattedText> &&caption_, array<int32> &&album_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1551193142;

  static object_ptr<story> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

class video;

/**
 * Describes album of stories.
 */
class storyAlbum final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the album.
  int32 id_;
  static jfieldID id_fieldID;
  /// Name of the album.
  string name_;
  static jfieldID name_fieldID;
  /// Icon of the album; may be null if none.
  object_ptr<photo> photo_icon_;
  static jfieldID photo_icon_fieldID;
  /// Video icon of the album; may be null if none.
  object_ptr<video> video_icon_;
  static jfieldID video_icon_fieldID;

  /**
   * Describes album of stories.
   */
  storyAlbum();

  /**
   * Describes album of stories.
   *
   * \param[in] id_ Unique identifier of the album.
   * \param[in] name_ Name of the album.
   * \param[in] photo_icon_ Icon of the album; may be null if none.
   * \param[in] video_icon_ Video icon of the album; may be null if none.
   */
  storyAlbum(int32 id_, string const &name_, object_ptr<photo> &&photo_icon_, object_ptr<video> &&video_icon_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -346189829;

  static object_ptr<storyAlbum> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbum;

/**
 * Represents a list of story albums.
 */
class storyAlbums final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of story albums.
  array<object_ptr<storyAlbum>> albums_;
  static jfieldID albums_fieldID;

  /**
   * Represents a list of story albums.
   */
  storyAlbums();

  /**
   * Represents a list of story albums.
   *
   * \param[in] albums_ List of story albums.
   */
  explicit storyAlbums(array<object_ptr<storyAlbum>> &&albums_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2123240062;

  static object_ptr<storyAlbums> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StoryAreaType;

class storyAreaPosition;

/**
 * Describes a clickable rectangle area on a story media.
 */
class storyArea final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Position of the area.
  object_ptr<storyAreaPosition> position_;
  static jfieldID position_fieldID;
  /// Type of the area.
  object_ptr<StoryAreaType> type_;
  static jfieldID type_fieldID;

  /**
   * Describes a clickable rectangle area on a story media.
   */
  storyArea();

  /**
   * Describes a clickable rectangle area on a story media.
   *
   * \param[in] position_ Position of the area.
   * \param[in] type_ Type of the area.
   */
  storyArea(object_ptr<storyAreaPosition> &&position_, object_ptr<StoryAreaType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -906033314;

  static object_ptr<storyArea> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes position of a clickable rectangle area on a story media.
 */
class storyAreaPosition final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The abscissa of the rectangle's center, as a percentage of the media width.
  double x_percentage_;
  static jfieldID x_percentage_fieldID;
  /// The ordinate of the rectangle's center, as a percentage of the media height.
  double y_percentage_;
  static jfieldID y_percentage_fieldID;
  /// The width of the rectangle, as a percentage of the media width.
  double width_percentage_;
  static jfieldID width_percentage_fieldID;
  /// The height of the rectangle, as a percentage of the media height.
  double height_percentage_;
  static jfieldID height_percentage_fieldID;
  /// Clockwise rotation angle of the rectangle, in degrees; 0-360.
  double rotation_angle_;
  static jfieldID rotation_angle_fieldID;
  /// The radius of the rectangle corner rounding, as a percentage of the media width.
  double corner_radius_percentage_;
  static jfieldID corner_radius_percentage_fieldID;

  /**
   * Describes position of a clickable rectangle area on a story media.
   */
  storyAreaPosition();

  /**
   * Describes position of a clickable rectangle area on a story media.
   *
   * \param[in] x_percentage_ The abscissa of the rectangle's center, as a percentage of the media width.
   * \param[in] y_percentage_ The ordinate of the rectangle's center, as a percentage of the media height.
   * \param[in] width_percentage_ The width of the rectangle, as a percentage of the media width.
   * \param[in] height_percentage_ The height of the rectangle, as a percentage of the media height.
   * \param[in] rotation_angle_ Clockwise rotation angle of the rectangle, in degrees; 0-360.
   * \param[in] corner_radius_percentage_ The radius of the rectangle corner rounding, as a percentage of the media width.
   */
  storyAreaPosition(double x_percentage_, double y_percentage_, double width_percentage_, double height_percentage_, double rotation_angle_, double corner_radius_percentage_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1533023124;

  static object_ptr<storyAreaPosition> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class location;

class locationAddress;

class venue;

/**
 * This class is an abstract base class.
 * Describes type of clickable area on a story media.
 */
class StoryAreaType: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a location.
 */
class storyAreaTypeLocation final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Address of the location; may be null if unknown.
  object_ptr<locationAddress> address_;
  static jfieldID address_fieldID;

  /**
   * An area pointing to a location.
   */
  storyAreaTypeLocation();

  /**
   * An area pointing to a location.
   *
   * \param[in] location_ The location.
   * \param[in] address_ Address of the location; may be null if unknown.
   */
  storyAreaTypeLocation(object_ptr<location> &&location_, object_ptr<locationAddress> &&address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1464612189;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a venue.
 */
class storyAreaTypeVenue final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the venue.
  object_ptr<venue> venue_;
  static jfieldID venue_fieldID;

  /**
   * An area pointing to a venue.
   */
  storyAreaTypeVenue();

  /**
   * An area pointing to a venue.
   *
   * \param[in] venue_ Information about the venue.
   */
  explicit storyAreaTypeVenue(object_ptr<venue> &&venue_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 414076166;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a suggested reaction. App needs to show a clickable reaction on the area and call setStoryReaction when the are is clicked.
 */
class storyAreaTypeSuggestedReaction final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;
  /// Number of times the reaction was added.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// True, if reaction has a dark background.
  bool is_dark_;
  static jfieldID is_dark_fieldID;
  /// True, if reaction corner is flipped.
  bool is_flipped_;
  static jfieldID is_flipped_fieldID;

  /**
   * An area pointing to a suggested reaction. App needs to show a clickable reaction on the area and call setStoryReaction when the are is clicked.
   */
  storyAreaTypeSuggestedReaction();

  /**
   * An area pointing to a suggested reaction. App needs to show a clickable reaction on the area and call setStoryReaction when the are is clicked.
   *
   * \param[in] reaction_type_ Type of the reaction.
   * \param[in] total_count_ Number of times the reaction was added.
   * \param[in] is_dark_ True, if reaction has a dark background.
   * \param[in] is_flipped_ True, if reaction corner is flipped.
   */
  storyAreaTypeSuggestedReaction(object_ptr<ReactionType> &&reaction_type_, int32 total_count_, bool is_dark_, bool is_flipped_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -111177092;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a message.
 */
class storyAreaTypeMessage final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * An area pointing to a message.
   */
  storyAreaTypeMessage();

  /**
   * An area pointing to a message.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message.
   */
  storyAreaTypeMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1074825548;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area pointing to a HTTP or tg:// link.
 */
class storyAreaTypeLink final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// HTTP or tg:// URL to be opened when the area is clicked.
  string url_;
  static jfieldID url_fieldID;

  /**
   * An area pointing to a HTTP or tg:// link.
   */
  storyAreaTypeLink();

  /**
   * An area pointing to a HTTP or tg:// link.
   *
   * \param[in] url_ HTTP or tg:// URL to be opened when the area is clicked.
   */
  explicit storyAreaTypeLink(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -127770235;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area with information about weather.
 */
class storyAreaTypeWeather final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Temperature, in degree Celsius.
  double temperature_;
  static jfieldID temperature_fieldID;
  /// Emoji representing the weather.
  string emoji_;
  static jfieldID emoji_fieldID;
  /// A color of the area background in the ARGB format.
  int32 background_color_;
  static jfieldID background_color_fieldID;

  /**
   * An area with information about weather.
   */
  storyAreaTypeWeather();

  /**
   * An area with information about weather.
   *
   * \param[in] temperature_ Temperature, in degree Celsius.
   * \param[in] emoji_ Emoji representing the weather.
   * \param[in] background_color_ A color of the area background in the ARGB format.
   */
  storyAreaTypeWeather(double temperature_, string const &emoji_, int32 background_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1504150082;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An area with an upgraded gift.
 */
class storyAreaTypeUpgradedGift final : public StoryAreaType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique name of the upgraded gift.
  string gift_name_;
  static jfieldID gift_name_fieldID;

  /**
   * An area with an upgraded gift.
   */
  storyAreaTypeUpgradedGift();

  /**
   * An area with an upgraded gift.
   *
   * \param[in] gift_name_ Unique name of the upgraded gift.
   */
  explicit storyAreaTypeUpgradedGift(string const &gift_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 760281479;

  static object_ptr<StoryAreaType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class photo;

class storyVideo;

/**
 * This class is an abstract base class.
 * Contains the content of a story.
 */
class StoryContent: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryContent> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo story.
 */
class storyContentPhoto final : public StoryContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;

  /**
   * A photo story.
   */
  storyContentPhoto();

  /**
   * A photo story.
   *
   * \param[in] photo_ The photo.
   */
  explicit storyContentPhoto(object_ptr<photo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -731971504;

  static object_ptr<StoryContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video story.
 */
class storyContentVideo final : public StoryContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The video in MPEG4 format.
  object_ptr<storyVideo> video_;
  static jfieldID video_fieldID;
  /// Alternative version of the video in MPEG4 format, encoded with H.264 codec; may be null.
  object_ptr<storyVideo> alternative_video_;
  static jfieldID alternative_video_fieldID;

  /**
   * A video story.
   */
  storyContentVideo();

  /**
   * A video story.
   *
   * \param[in] video_ The video in MPEG4 format.
   * \param[in] alternative_video_ Alternative version of the video in MPEG4 format, encoded with H.264 codec; may be null.
   */
  storyContentVideo(object_ptr<storyVideo> &&video_, object_ptr<storyVideo> &&alternative_video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1291754842;

  static object_ptr<StoryContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A live story.
 */
class storyContentLive final : public StoryContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the corresponding group call. The group call can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// True, if the call is an RTMP stream instead of an ordinary group call.
  bool is_rtmp_stream_;
  static jfieldID is_rtmp_stream_fieldID;

  /**
   * A live story.
   */
  storyContentLive();

  /**
   * A live story.
   *
   * \param[in] group_call_id_ Identifier of the corresponding group call. The group call can be received through the method getGroupCall.
   * \param[in] is_rtmp_stream_ True, if the call is an RTMP stream instead of an ordinary group call.
   */
  storyContentLive(int32 group_call_id_, bool is_rtmp_stream_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1192628634;

  static object_ptr<StoryContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story content that is not supported in the current TDLib version.
 */
class storyContentUnsupported final : public StoryContent {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A story content that is not supported in the current TDLib version.
   */
  storyContentUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2033715858;

  static object_ptr<StoryContent> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains the type of the content of a story.
 */
class StoryContentType: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryContentType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A photo story.
 */
class storyContentTypePhoto final : public StoryContentType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A photo story.
   */
  storyContentTypePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1568510965;

  static object_ptr<StoryContentType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A video story.
 */
class storyContentTypeVideo final : public StoryContentType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A video story.
   */
  storyContentTypeVideo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -573976899;

  static object_ptr<StoryContentType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A live story.
 */
class storyContentTypeLive final : public StoryContentType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A live story.
   */
  storyContentTypeLive();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -659651117;

  static object_ptr<StoryContentType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story of unknown content type.
 */
class storyContentTypeUnsupported final : public StoryContentType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A story of unknown content type.
   */
  storyContentTypeUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 642311105;

  static object_ptr<StoryContentType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains identifier of a story along with identifier of the chat that posted it.
 */
class storyFullId final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 poster_chat_id_;
  static jfieldID poster_chat_id_fieldID;
  /// Unique story identifier among stories of the chat.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Contains identifier of a story along with identifier of the chat that posted it.
   */
  storyFullId();

  /**
   * Contains identifier of a story along with identifier of the chat that posted it.
   *
   * \param[in] poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Unique story identifier among stories of the chat.
   */
  storyFullId(int53 poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 765952419;

  static object_ptr<storyFullId> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains basic information about a story.
 */
class storyInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique story identifier among stories of the chat.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Point in time (Unix timestamp) when the story was published.
  int32 date_;
  static jfieldID date_fieldID;
  /// True, if the story is available only to close friends.
  bool is_for_close_friends_;
  static jfieldID is_for_close_friends_fieldID;
  /// True, if the story is a live story.
  bool is_live_;
  static jfieldID is_live_fieldID;

  /**
   * Contains basic information about a story.
   */
  storyInfo();

  /**
   * Contains basic information about a story.
   *
   * \param[in] story_id_ Unique story identifier among stories of the chat.
   * \param[in] date_ Point in time (Unix timestamp) when the story was published.
   * \param[in] is_for_close_friends_ True, if the story is available only to close friends.
   * \param[in] is_live_ True, if the story is a live story.
   */
  storyInfo(int32 story_id_, int32 date_, bool is_for_close_friends_, bool is_live_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 182159362;

  static object_ptr<storyInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BlockList;

class MessageSender;

class StoryInteractionType;

/**
 * Represents interaction with a story.
 */
class storyInteraction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or chat that made the interaction.
  object_ptr<MessageSender> actor_id_;
  static jfieldID actor_id_fieldID;
  /// Approximate point in time (Unix timestamp) when the interaction happened.
  int32 interaction_date_;
  static jfieldID interaction_date_fieldID;
  /// Block list to which the actor is added; may be null if none or for chat stories.
  object_ptr<BlockList> block_list_;
  static jfieldID block_list_fieldID;
  /// Type of the interaction.
  object_ptr<StoryInteractionType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents interaction with a story.
   */
  storyInteraction();

  /**
   * Represents interaction with a story.
   *
   * \param[in] actor_id_ Identifier of the user or chat that made the interaction.
   * \param[in] interaction_date_ Approximate point in time (Unix timestamp) when the interaction happened.
   * \param[in] block_list_ Block list to which the actor is added; may be null if none or for chat stories.
   * \param[in] type_ Type of the interaction.
   */
  storyInteraction(object_ptr<MessageSender> &&actor_id_, int32 interaction_date_, object_ptr<BlockList> &&block_list_, object_ptr<StoryInteractionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -702229982;

  static object_ptr<storyInteraction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about interactions with a story.
 */
class storyInteractionInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of times the story was viewed.
  int32 view_count_;
  static jfieldID view_count_fieldID;
  /// Number of times the story was forwarded; 0 if none or unknown.
  int32 forward_count_;
  static jfieldID forward_count_fieldID;
  /// Number of reactions added to the story; 0 if none or unknown.
  int32 reaction_count_;
  static jfieldID reaction_count_fieldID;
  /// Identifiers of at most 3 recent viewers of the story.
  array<int53> recent_viewer_user_ids_;
  static jfieldID recent_viewer_user_ids_fieldID;

  /**
   * Contains information about interactions with a story.
   */
  storyInteractionInfo();

  /**
   * Contains information about interactions with a story.
   *
   * \param[in] view_count_ Number of times the story was viewed.
   * \param[in] forward_count_ Number of times the story was forwarded; 0 if none or unknown.
   * \param[in] reaction_count_ Number of reactions added to the story; 0 if none or unknown.
   * \param[in] recent_viewer_user_ids_ Identifiers of at most 3 recent viewers of the story.
   */
  storyInteractionInfo(int32 view_count_, int32 forward_count_, int32 reaction_count_, array<int53> &&recent_viewer_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -846542065;

  static object_ptr<storyInteractionInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class message;

class story;

/**
 * This class is an abstract base class.
 * Describes type of interaction with a story.
 */
class StoryInteractionType: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryInteractionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A view of the story.
 */
class storyInteractionTypeView final : public StoryInteractionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction that was chosen by the viewer; may be null if none.
  object_ptr<ReactionType> chosen_reaction_type_;
  static jfieldID chosen_reaction_type_fieldID;

  /**
   * A view of the story.
   */
  storyInteractionTypeView();

  /**
   * A view of the story.
   *
   * \param[in] chosen_reaction_type_ Type of the reaction that was chosen by the viewer; may be null if none.
   */
  explicit storyInteractionTypeView(object_ptr<ReactionType> &&chosen_reaction_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1407399888;

  static object_ptr<StoryInteractionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A forward of the story as a message.
 */
class storyInteractionTypeForward final : public StoryInteractionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message with story forward.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * A forward of the story as a message.
   */
  storyInteractionTypeForward();

  /**
   * A forward of the story as a message.
   *
   * \param[in] message_ The message with story forward.
   */
  explicit storyInteractionTypeForward(object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 668089599;

  static object_ptr<StoryInteractionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A repost of the story as a story.
 */
class storyInteractionTypeRepost final : public StoryInteractionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The reposted story.
  object_ptr<story> story_;
  static jfieldID story_fieldID;

  /**
   * A repost of the story as a story.
   */
  storyInteractionTypeRepost();

  /**
   * A repost of the story as a story.
   *
   * \param[in] story_ The reposted story.
   */
  explicit storyInteractionTypeRepost(object_ptr<story> &&story_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1021150780;

  static object_ptr<StoryInteractionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class storyInteraction;

/**
 * Represents a list of interactions with a story.
 */
class storyInteractions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of interactions found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Approximate total number of found forwards and reposts; always 0 for chat stories.
  int32 total_forward_count_;
  static jfieldID total_forward_count_fieldID;
  /// Approximate total number of found reactions; always 0 for chat stories.
  int32 total_reaction_count_;
  static jfieldID total_reaction_count_fieldID;
  /// List of story interactions.
  array<object_ptr<storyInteraction>> interactions_;
  static jfieldID interactions_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of interactions with a story.
   */
  storyInteractions();

  /**
   * Represents a list of interactions with a story.
   *
   * \param[in] total_count_ Approximate total number of interactions found.
   * \param[in] total_forward_count_ Approximate total number of found forwards and reposts; always 0 for chat stories.
   * \param[in] total_reaction_count_ Approximate total number of found reactions; always 0 for chat stories.
   * \param[in] interactions_ List of story interactions.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  storyInteractions(int32 total_count_, int32 total_forward_count_, int32 total_reaction_count_, array<object_ptr<storyInteraction>> &&interactions_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1537062962;

  static object_ptr<storyInteractions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes a list of stories.
 */
class StoryList: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryList> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of stories, shown in the main chat list and folder chat lists.
 */
class storyListMain final : public StoryList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The list of stories, shown in the main chat list and folder chat lists.
   */
  storyListMain();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -672222209;

  static object_ptr<StoryList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of stories, shown in the Arvhive chat list.
 */
class storyListArchive final : public StoryList {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The list of stories, shown in the Arvhive chat list.
   */
  storyListArchive();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -41900223;

  static object_ptr<StoryList> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains information about the origin of a story that was reposted.
 */
class StoryOrigin: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryOrigin> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The original story was a public story that was posted by a known chat.
 */
class storyOriginPublicStory final : public StoryOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted original story.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Story identifier of the original story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * The original story was a public story that was posted by a known chat.
   */
  storyOriginPublicStory();

  /**
   * The original story was a public story that was posted by a known chat.
   *
   * \param[in] chat_id_ Identifier of the chat that posted original story.
   * \param[in] story_id_ Story identifier of the original story.
   */
  storyOriginPublicStory(int53 chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 741842878;

  static object_ptr<StoryOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The original story was posted by an unknown user.
 */
class storyOriginHiddenUser final : public StoryOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the user or the chat that posted the story.
  string poster_name_;
  static jfieldID poster_name_fieldID;

  /**
   * The original story was posted by an unknown user.
   */
  storyOriginHiddenUser();

  /**
   * The original story was posted by an unknown user.
   *
   * \param[in] poster_name_ Name of the user or the chat that posted the story.
   */
  explicit storyOriginHiddenUser(string const &poster_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -96348585;

  static object_ptr<StoryOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes privacy settings of a story.
 */
class StoryPrivacySettings: public Object {
 public:
  static jclass Class;

  static object_ptr<StoryPrivacySettings> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The story can be viewed by everyone.
 */
class storyPrivacySettingsEveryone final : public StoryPrivacySettings {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of the users that can't see the story; always unknown and empty for non-owned stories.
  array<int53> except_user_ids_;
  static jfieldID except_user_ids_fieldID;

  /**
   * The story can be viewed by everyone.
   */
  storyPrivacySettingsEveryone();

  /**
   * The story can be viewed by everyone.
   *
   * \param[in] except_user_ids_ Identifiers of the users that can't see the story; always unknown and empty for non-owned stories.
   */
  explicit storyPrivacySettingsEveryone(array<int53> &&except_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 890847843;

  static object_ptr<StoryPrivacySettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The story can be viewed by all contacts except chosen users.
 */
class storyPrivacySettingsContacts final : public StoryPrivacySettings {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifiers of the contacts that can't see the story; always unknown and empty for non-owned stories.
  array<int53> except_user_ids_;
  static jfieldID except_user_ids_fieldID;

  /**
   * The story can be viewed by all contacts except chosen users.
   */
  storyPrivacySettingsContacts();

  /**
   * The story can be viewed by all contacts except chosen users.
   *
   * \param[in] except_user_ids_ User identifiers of the contacts that can't see the story; always unknown and empty for non-owned stories.
   */
  explicit storyPrivacySettingsContacts(array<int53> &&except_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 50285309;

  static object_ptr<StoryPrivacySettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The story can be viewed by all close friends.
 */
class storyPrivacySettingsCloseFriends final : public StoryPrivacySettings {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The story can be viewed by all close friends.
   */
  storyPrivacySettingsCloseFriends();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2097122144;

  static object_ptr<StoryPrivacySettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The story can be viewed by certain specified users.
 */
class storyPrivacySettingsSelectedUsers final : public StoryPrivacySettings {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of the users; always unknown and empty for non-owned stories.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * The story can be viewed by certain specified users.
   */
  storyPrivacySettingsSelectedUsers();

  /**
   * The story can be viewed by certain specified users.
   *
   * \param[in] user_ids_ Identifiers of the users; always unknown and empty for non-owned stories.
   */
  explicit storyPrivacySettingsSelectedUsers(array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1885772602;

  static object_ptr<StoryPrivacySettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StoryOrigin;

/**
 * Contains information about original story that was reposted.
 */
class storyRepostInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Origin of the story that was reposted.
  object_ptr<StoryOrigin> origin_;
  static jfieldID origin_fieldID;
  /// True, if story content was modified during reposting; otherwise, story wasn't modified.
  bool is_content_modified_;
  static jfieldID is_content_modified_fieldID;

  /**
   * Contains information about original story that was reposted.
   */
  storyRepostInfo();

  /**
   * Contains information about original story that was reposted.
   *
   * \param[in] origin_ Origin of the story that was reposted.
   * \param[in] is_content_modified_ True, if story content was modified during reposting; otherwise, story wasn't modified.
   */
  storyRepostInfo(object_ptr<StoryOrigin> &&origin_, bool is_content_modified_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -8412096;

  static object_ptr<storyRepostInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

/**
 * A detailed statistics about a story.
 */
class storyStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A graph containing number of story views and shares.
  object_ptr<StatisticalGraph> story_interaction_graph_;
  static jfieldID story_interaction_graph_fieldID;
  /// A graph containing number of story reactions.
  object_ptr<StatisticalGraph> story_reaction_graph_;
  static jfieldID story_reaction_graph_fieldID;

  /**
   * A detailed statistics about a story.
   */
  storyStatistics();

  /**
   * A detailed statistics about a story.
   *
   * \param[in] story_interaction_graph_ A graph containing number of story views and shares.
   * \param[in] story_reaction_graph_ A graph containing number of story reactions.
   */
  storyStatistics(object_ptr<StatisticalGraph> &&story_interaction_graph_, object_ptr<StatisticalGraph> &&story_reaction_graph_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1178897259;

  static object_ptr<storyStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes a video file posted as a story.
 */
class storyVideo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Duration of the video, in seconds.
  double duration_;
  static jfieldID duration_fieldID;
  /// Video width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Video height.
  int32 height_;
  static jfieldID height_fieldID;
  /// True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets.
  bool has_stickers_;
  static jfieldID has_stickers_fieldID;
  /// True, if the video has no sound.
  bool is_animation_;
  static jfieldID is_animation_fieldID;
  /// Video minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Video thumbnail in JPEG or MPEG4 format; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Size of file prefix, which is expected to be preloaded, in bytes.
  int32 preload_prefix_size_;
  static jfieldID preload_prefix_size_fieldID;
  /// Timestamp of the frame used as video thumbnail.
  double cover_frame_timestamp_;
  static jfieldID cover_frame_timestamp_fieldID;
  /// File containing the video.
  object_ptr<file> video_;
  static jfieldID video_fieldID;

  /**
   * Describes a video file posted as a story.
   */
  storyVideo();

  /**
   * Describes a video file posted as a story.
   *
   * \param[in] duration_ Duration of the video, in seconds.
   * \param[in] width_ Video width.
   * \param[in] height_ Video height.
   * \param[in] has_stickers_ True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets.
   * \param[in] is_animation_ True, if the video has no sound.
   * \param[in] minithumbnail_ Video minithumbnail; may be null.
   * \param[in] thumbnail_ Video thumbnail in JPEG or MPEG4 format; may be null.
   * \param[in] preload_prefix_size_ Size of file prefix, which is expected to be preloaded, in bytes.
   * \param[in] cover_frame_timestamp_ Timestamp of the frame used as video thumbnail.
   * \param[in] video_ File containing the video.
   */
  storyVideo(double duration_, int32 width_, int32 height_, bool has_stickers_, bool is_animation_, object_ptr<minithumbnail> &&minithumbnail_, object_ptr<thumbnail> &&thumbnail_, int32 preload_prefix_size_, double cover_frame_timestamp_, object_ptr<file> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1445661253;

  static object_ptr<storyVideo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * This class is an abstract base class.
 * Describes an action suggested to the current user.
 */
class SuggestedAction: public Object {
 public:
  static jclass Class;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to enable archive_and_mute_new_chats_from_unknown_users setting in archiveChatListSettings.
 */
class suggestedActionEnableArchiveAndMuteNewChats final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to enable archive_and_mute_new_chats_from_unknown_users setting in archiveChatListSettings.
   */
  suggestedActionEnableArchiveAndMuteNewChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2017586255;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to check whether they still remember their 2-step verification password.
 */
class suggestedActionCheckPassword final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to check whether they still remember their 2-step verification password.
   */
  suggestedActionCheckPassword();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1910534839;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to check whether authorization phone number is correct and change the phone number if it is inaccessible.
 */
class suggestedActionCheckPhoneNumber final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to check whether authorization phone number is correct and change the phone number if it is inaccessible.
   */
  suggestedActionCheckPhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 648771563;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to view a hint about the meaning of one and two check marks on sent messages.
 */
class suggestedActionViewChecksHint final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to view a hint about the meaning of one and two check marks on sent messages.
   */
  suggestedActionViewChecksHint();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 891303239;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to convert specified supergroup to a broadcast group.
 */
class suggestedActionConvertToBroadcastGroup final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * Suggests the user to convert specified supergroup to a broadcast group.
   */
  suggestedActionConvertToBroadcastGroup();

  /**
   * Suggests the user to convert specified supergroup to a broadcast group.
   *
   * \param[in] supergroup_id_ Supergroup identifier.
   */
  explicit suggestedActionConvertToBroadcastGroup(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -965071304;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to set a 2-step verification password to be able to log in again.
 */
class suggestedActionSetPassword final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of days to pass between consecutive authorizations if the user declines to set password; if 0, then the user is advised to set the password for security reasons.
  int32 authorization_delay_;
  static jfieldID authorization_delay_fieldID;

  /**
   * Suggests the user to set a 2-step verification password to be able to log in again.
   */
  suggestedActionSetPassword();

  /**
   * Suggests the user to set a 2-step verification password to be able to log in again.
   *
   * \param[in] authorization_delay_ The number of days to pass between consecutive authorizations if the user declines to set password; if 0, then the user is advised to set the password for security reasons.
   */
  explicit suggestedActionSetPassword(int32 authorization_delay_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1863613848;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to upgrade the Premium subscription from monthly payments to annual payments.
 */
class suggestedActionUpgradePremium final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to upgrade the Premium subscription from monthly payments to annual payments.
   */
  suggestedActionUpgradePremium();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1890220539;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to restore a recently expired Premium subscription.
 */
class suggestedActionRestorePremium final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to restore a recently expired Premium subscription.
   */
  suggestedActionRestorePremium();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -385229468;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to subscribe to the Premium subscription with annual payments.
 */
class suggestedActionSubscribeToAnnualPremium final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to subscribe to the Premium subscription with annual payments.
   */
  suggestedActionSubscribeToAnnualPremium();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 373913787;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to gift Telegram Premium to friends for Christmas.
 */
class suggestedActionGiftPremiumForChristmas final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to gift Telegram Premium to friends for Christmas.
   */
  suggestedActionGiftPremiumForChristmas();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1816924561;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to set birthdate.
 */
class suggestedActionSetBirthdate final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to set birthdate.
   */
  suggestedActionSetBirthdate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -356672766;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to set profile photo.
 */
class suggestedActionSetProfilePhoto final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to set profile photo.
   */
  suggestedActionSetProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1612563093;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to extend their expiring Telegram Premium subscription.
 */
class suggestedActionExtendPremium final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A URL for managing Telegram Premium subscription.
  string manage_premium_subscription_url_;
  static jfieldID manage_premium_subscription_url_fieldID;

  /**
   * Suggests the user to extend their expiring Telegram Premium subscription.
   */
  suggestedActionExtendPremium();

  /**
   * Suggests the user to extend their expiring Telegram Premium subscription.
   *
   * \param[in] manage_premium_subscription_url_ A URL for managing Telegram Premium subscription.
   */
  explicit suggestedActionExtendPremium(string const &manage_premium_subscription_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -566207286;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to extend their expiring Telegram Star subscriptions. Call getStarSubscriptions with only_expiring == true to get the number of expiring subscriptions and the number of required to buy Telegram Stars.
 */
class suggestedActionExtendStarSubscriptions final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to extend their expiring Telegram Star subscriptions. Call getStarSubscriptions with only_expiring == true to get the number of expiring subscriptions and the number of required to buy Telegram Stars.
   */
  suggestedActionExtendStarSubscriptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -47000234;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A custom suggestion to be shown at the top of the chat list.
 */
class suggestedActionCustom final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique name of the suggestion.
  string name_;
  static jfieldID name_fieldID;
  /// Title of the suggestion.
  object_ptr<formattedText> title_;
  static jfieldID title_fieldID;
  /// Description of the suggestion.
  object_ptr<formattedText> description_;
  static jfieldID description_fieldID;
  /// The link to open when the suggestion is clicked.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A custom suggestion to be shown at the top of the chat list.
   */
  suggestedActionCustom();

  /**
   * A custom suggestion to be shown at the top of the chat list.
   *
   * \param[in] name_ Unique name of the suggestion.
   * \param[in] title_ Title of the suggestion.
   * \param[in] description_ Description of the suggestion.
   * \param[in] url_ The link to open when the suggestion is clicked.
   */
  suggestedActionCustom(string const &name_, object_ptr<formattedText> &&title_, object_ptr<formattedText> &&description_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2092876611;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to add login email address. Call isLoginEmailAddressRequired, and then setLoginEmailAddress or checkLoginEmailAddressCode to change the login email address.
 */
class suggestedActionSetLoginEmailAddress final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the suggested action can be hidden using hideSuggestedAction. Otherwise, the user must not be able to use the application without setting up the email address.
  bool can_be_hidden_;
  static jfieldID can_be_hidden_fieldID;

  /**
   * Suggests the user to add login email address. Call isLoginEmailAddressRequired, and then setLoginEmailAddress or checkLoginEmailAddressCode to change the login email address.
   */
  suggestedActionSetLoginEmailAddress();

  /**
   * Suggests the user to add login email address. Call isLoginEmailAddressRequired, and then setLoginEmailAddress or checkLoginEmailAddressCode to change the login email address.
   *
   * \param[in] can_be_hidden_ True, if the suggested action can be hidden using hideSuggestedAction. Otherwise, the user must not be able to use the application without setting up the email address.
   */
  explicit suggestedActionSetLoginEmailAddress(bool can_be_hidden_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1557625160;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Suggests the user to add a passkey for login using addLoginPasskey.
 */
class suggestedActionAddLoginPasskey final : public SuggestedAction {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Suggests the user to add a passkey for login using addLoginPasskey.
   */
  suggestedActionAddLoginPasskey();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1186248690;

  static object_ptr<SuggestedAction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SuggestedPostPrice;

class SuggestedPostState;

/**
 * Contains information about a suggested post. If the post can be approved or declined, then changes to the post can be also suggested. Use sendMessage with reply to the message and suggested post information to suggest message changes. Use addOffer to suggest price or time changes.
 */
class suggestedPostInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Price of the suggested post; may be null if the post is non-paid.
  object_ptr<SuggestedPostPrice> price_;
  static jfieldID price_fieldID;
  /// Point in time (Unix timestamp) when the post is expected to be published; 0 if the specific date isn't set yet.
  int32 send_date_;
  static jfieldID send_date_fieldID;
  /// State of the post.
  object_ptr<SuggestedPostState> state_;
  static jfieldID state_fieldID;
  /// True, if the suggested post can be approved by the current user using approveSuggestedPost; updates aren't sent when value of this field changes.
  bool can_be_approved_;
  static jfieldID can_be_approved_fieldID;
  /// True, if the suggested post can be declined by the current user using declineSuggestedPost; updates aren't sent when value of this field changes.
  bool can_be_declined_;
  static jfieldID can_be_declined_fieldID;

  /**
   * Contains information about a suggested post. If the post can be approved or declined, then changes to the post can be also suggested. Use sendMessage with reply to the message and suggested post information to suggest message changes. Use addOffer to suggest price or time changes.
   */
  suggestedPostInfo();

  /**
   * Contains information about a suggested post. If the post can be approved or declined, then changes to the post can be also suggested. Use sendMessage with reply to the message and suggested post information to suggest message changes. Use addOffer to suggest price or time changes.
   *
   * \param[in] price_ Price of the suggested post; may be null if the post is non-paid.
   * \param[in] send_date_ Point in time (Unix timestamp) when the post is expected to be published; 0 if the specific date isn't set yet.
   * \param[in] state_ State of the post.
   * \param[in] can_be_approved_ True, if the suggested post can be approved by the current user using approveSuggestedPost; updates aren't sent when value of this field changes.
   * \param[in] can_be_declined_ True, if the suggested post can be declined by the current user using declineSuggestedPost; updates aren't sent when value of this field changes.
   */
  suggestedPostInfo(object_ptr<SuggestedPostPrice> &&price_, int32 send_date_, object_ptr<SuggestedPostState> &&state_, bool can_be_approved_, bool can_be_declined_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1088331710;

  static object_ptr<suggestedPostInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes price of a suggested post.
 */
class SuggestedPostPrice: public Object {
 public:
  static jclass Class;

  static object_ptr<SuggestedPostPrice> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes price of a suggested post in Telegram Stars.
 */
class suggestedPostPriceStar final : public SuggestedPostPrice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The Telegram Star amount expected to be paid for the post; getOption(&quot;suggested_post_star_count_min&quot;)-getOption(&quot;suggested_post_star_count_max&quot;).
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Describes price of a suggested post in Telegram Stars.
   */
  suggestedPostPriceStar();

  /**
   * Describes price of a suggested post in Telegram Stars.
   *
   * \param[in] star_count_ The Telegram Star amount expected to be paid for the post; getOption(&quot;suggested_post_star_count_min&quot;)-getOption(&quot;suggested_post_star_count_max&quot;).
   */
  explicit suggestedPostPriceStar(int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 216488903;

  static object_ptr<SuggestedPostPrice> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes price of a suggested post in Toncoins.
 */
class suggestedPostPriceTon final : public SuggestedPostPrice {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The amount of 1/100 of Toncoin expected to be paid for the post; getOption(&quot;suggested_post_toncoin_cent_count_min&quot;)-getOption(&quot;suggested_post_toncoin_cent_count_max&quot;).
  int53 toncoin_cent_count_;
  static jfieldID toncoin_cent_count_fieldID;

  /**
   * Describes price of a suggested post in Toncoins.
   */
  suggestedPostPriceTon();

  /**
   * Describes price of a suggested post in Toncoins.
   *
   * \param[in] toncoin_cent_count_ The amount of 1/100 of Toncoin expected to be paid for the post; getOption(&quot;suggested_post_toncoin_cent_count_min&quot;)-getOption(&quot;suggested_post_toncoin_cent_count_max&quot;).
   */
  explicit suggestedPostPriceTon(int53 toncoin_cent_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1095222334;

  static object_ptr<SuggestedPostPrice> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes reason for refund of the payment for a suggested post.
 */
class SuggestedPostRefundReason: public Object {
 public:
  static jclass Class;

  static object_ptr<SuggestedPostRefundReason> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The post was refunded, because it was deleted by channel administrators in less than getOption(&quot;suggested_post_lifetime_min&quot;) seconds.
 */
class suggestedPostRefundReasonPostDeleted final : public SuggestedPostRefundReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The post was refunded, because it was deleted by channel administrators in less than getOption(&quot;suggested_post_lifetime_min&quot;) seconds.
   */
  suggestedPostRefundReasonPostDeleted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1657796126;

  static object_ptr<SuggestedPostRefundReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The post was refunded, because the payment for the post was refunded.
 */
class suggestedPostRefundReasonPaymentRefunded final : public SuggestedPostRefundReason {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The post was refunded, because the payment for the post was refunded.
   */
  suggestedPostRefundReasonPaymentRefunded();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 755739598;

  static object_ptr<SuggestedPostRefundReason> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes state of a suggested post.
 */
class SuggestedPostState: public Object {
 public:
  static jclass Class;

  static object_ptr<SuggestedPostState> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The post must be approved or declined.
 */
class suggestedPostStatePending final : public SuggestedPostState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The post must be approved or declined.
   */
  suggestedPostStatePending();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 232632669;

  static object_ptr<SuggestedPostState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The post was approved.
 */
class suggestedPostStateApproved final : public SuggestedPostState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The post was approved.
   */
  suggestedPostStateApproved();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -782541552;

  static object_ptr<SuggestedPostState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The post was declined.
 */
class suggestedPostStateDeclined final : public SuggestedPostState {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The post was declined.
   */
  suggestedPostStateDeclined();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 318192794;

  static object_ptr<SuggestedPostState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ActiveStoryState;

class ChatMemberStatus;

class restrictionInfo;

class usernames;

class verificationStatus;

/**
 * Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers.
 */
class supergroup final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup or channel identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// Usernames of the supergroup or channel; may be null.
  object_ptr<usernames> usernames_;
  static jfieldID usernames_fieldID;
  /// Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member.
  int32 date_;
  static jfieldID date_fieldID;
  /// Status of the current user in the supergroup or channel.
  object_ptr<ChatMemberStatus> status_;
  static jfieldID status_fieldID;
  /// Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through getChatSimilarChats, getChatsToPostStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getRecommendedChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, or for chats with messages or stories from publicForwards and foundStories.
  int32 member_count_;
  static jfieldID member_count_fieldID;
  /// Approximate boost level for the chat.
  int32 boost_level_;
  static jfieldID boost_level_fieldID;
  /// True, if automatic translation of messages is enabled in the channel.
  bool has_automatic_translation_;
  static jfieldID has_automatic_translation_fieldID;
  /// True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
  bool has_linked_chat_;
  static jfieldID has_linked_chat_fieldID;
  /// True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup.
  bool has_location_;
  static jfieldID has_location_fieldID;
  /// True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.
  bool sign_messages_;
  static jfieldID sign_messages_fieldID;
  /// True, if messages sent to the channel have information about the sender user. This field is only applicable to channels.
  bool show_message_sender_;
  static jfieldID show_message_sender_fieldID;
  /// True, if users need to join the supergroup before they can send messages. May be false only for discussion supergroups and channel direct messages groups.
  bool join_to_send_messages_;
  static jfieldID join_to_send_messages_fieldID;
  /// True, if all users directly joining the supergroup need to be approved by supergroup administrators. May be true only for non-broadcast supergroups with username, location, or a linked chat.
  bool join_by_request_;
  static jfieldID join_by_request_fieldID;
  /// True, if the slow mode is enabled in the supergroup.
  bool is_slow_mode_enabled_;
  static jfieldID is_slow_mode_enabled_fieldID;
  /// True, if the supergroup is a channel.
  bool is_channel_;
  static jfieldID is_channel_fieldID;
  /// True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members.
  bool is_broadcast_group_;
  static jfieldID is_broadcast_group_fieldID;
  /// True, if the supergroup is a forum with topics.
  bool is_forum_;
  static jfieldID is_forum_fieldID;
  /// True, if the supergroup is a direct message group for a channel chat.
  bool is_direct_messages_group_;
  static jfieldID is_direct_messages_group_fieldID;
  /// True, if the supergroup is a direct messages group for a channel chat that is administered by the current user.
  bool is_administered_direct_messages_group_;
  static jfieldID is_administered_direct_messages_group_fieldID;
  /// Information about verification status of the supergroup or channel; may be null if none.
  object_ptr<verificationStatus> verification_status_;
  static jfieldID verification_status_fieldID;
  /// True, if the channel has direct messages group.
  bool has_direct_messages_group_;
  static jfieldID has_direct_messages_group_fieldID;
  /// True, if the supergroup is a forum, which topics are shown in the same way as in channel direct messages groups.
  bool has_forum_tabs_;
  static jfieldID has_forum_tabs_fieldID;
  /// Information about the restrictions that must be applied to the corresponding supergroup or channel chat; may be null if none.
  object_ptr<restrictionInfo> restriction_info_;
  static jfieldID restriction_info_fieldID;
  /// Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;
  /// State of active stories of the supergroup or channel; may be null if there are no active stories.
  object_ptr<ActiveStoryState> active_story_state_;
  static jfieldID active_story_state_fieldID;

  /**
   * Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers.
   */
  supergroup();

  /**
   * Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers.
   *
   * \param[in] id_ Supergroup or channel identifier.
   * \param[in] usernames_ Usernames of the supergroup or channel; may be null.
   * \param[in] date_ Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member.
   * \param[in] status_ Status of the current user in the supergroup or channel.
   * \param[in] member_count_ Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through getChatSimilarChats, getChatsToPostStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getRecommendedChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, or for chats with messages or stories from publicForwards and foundStories.
   * \param[in] boost_level_ Approximate boost level for the chat.
   * \param[in] has_automatic_translation_ True, if automatic translation of messages is enabled in the channel.
   * \param[in] has_linked_chat_ True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
   * \param[in] has_location_ True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup.
   * \param[in] sign_messages_ True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.
   * \param[in] show_message_sender_ True, if messages sent to the channel have information about the sender user. This field is only applicable to channels.
   * \param[in] join_to_send_messages_ True, if users need to join the supergroup before they can send messages. May be false only for discussion supergroups and channel direct messages groups.
   * \param[in] join_by_request_ True, if all users directly joining the supergroup need to be approved by supergroup administrators. May be true only for non-broadcast supergroups with username, location, or a linked chat.
   * \param[in] is_slow_mode_enabled_ True, if the slow mode is enabled in the supergroup.
   * \param[in] is_channel_ True, if the supergroup is a channel.
   * \param[in] is_broadcast_group_ True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members.
   * \param[in] is_forum_ True, if the supergroup is a forum with topics.
   * \param[in] is_direct_messages_group_ True, if the supergroup is a direct message group for a channel chat.
   * \param[in] is_administered_direct_messages_group_ True, if the supergroup is a direct messages group for a channel chat that is administered by the current user.
   * \param[in] verification_status_ Information about verification status of the supergroup or channel; may be null if none.
   * \param[in] has_direct_messages_group_ True, if the channel has direct messages group.
   * \param[in] has_forum_tabs_ True, if the supergroup is a forum, which topics are shown in the same way as in channel direct messages groups.
   * \param[in] restriction_info_ Information about the restrictions that must be applied to the corresponding supergroup or channel chat; may be null if none.
   * \param[in] paid_message_star_count_ Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message.
   * \param[in] active_story_state_ State of active stories of the supergroup or channel; may be null if there are no active stories.
   */
  supergroup(int53 id_, object_ptr<usernames> &&usernames_, int32 date_, object_ptr<ChatMemberStatus> &&status_, int32 member_count_, int32 boost_level_, bool has_automatic_translation_, bool has_linked_chat_, bool has_location_, bool sign_messages_, bool show_message_sender_, bool join_to_send_messages_, bool join_by_request_, bool is_slow_mode_enabled_, bool is_channel_, bool is_broadcast_group_, bool is_forum_, bool is_direct_messages_group_, bool is_administered_direct_messages_group_, object_ptr<verificationStatus> &&verification_status_, bool has_direct_messages_group_, bool has_forum_tabs_, object_ptr<restrictionInfo> &&restriction_info_, int53 paid_message_star_count_, object_ptr<ActiveStoryState> &&active_story_state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1134998957;

  static object_ptr<supergroup> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ProfileTab;

class botCommands;

class botVerification;

class chatInviteLink;

class chatLocation;

class chatPhoto;

/**
 * Contains full information about a supergroup or channel.
 */
class supergroupFullInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// Supergroup or channel description.
  string description_;
  static jfieldID description_fieldID;
  /// Number of members in the supergroup or channel; 0 if unknown.
  int32 member_count_;
  static jfieldID member_count_fieldID;
  /// Number of privileged users in the supergroup or channel; 0 if unknown.
  int32 administrator_count_;
  static jfieldID administrator_count_fieldID;
  /// Number of restricted users in the supergroup; 0 if unknown.
  int32 restricted_count_;
  static jfieldID restricted_count_fieldID;
  /// Number of users banned from chat; 0 if unknown.
  int32 banned_count_;
  static jfieldID banned_count_fieldID;
  /// Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown.
  int53 linked_chat_id_;
  static jfieldID linked_chat_id_fieldID;
  /// Chat identifier of a direct messages group for the channel, or a channel, for which the supergroup is the designated direct messages group; 0 if none.
  int53 direct_messages_chat_id_;
  static jfieldID direct_messages_chat_id_fieldID;
  /// Delay between consecutive sent messages for non-administrator supergroup members, in seconds.
  int32 slow_mode_delay_;
  static jfieldID slow_mode_delay_fieldID;
  /// Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero.
  double slow_mode_delay_expires_in_;
  static jfieldID slow_mode_delay_expires_in_fieldID;
  /// True, if paid messages can be enabled in the supergroup chat; for supergroup only.
  bool can_enable_paid_messages_;
  static jfieldID can_enable_paid_messages_fieldID;
  /// True, if paid reaction can be enabled in the channel chat; for channels only.
  bool can_enable_paid_reaction_;
  static jfieldID can_enable_paid_reaction_fieldID;
  /// True, if members of the chat can be retrieved via getSupergroupMembers or searchChatMembers.
  bool can_get_members_;
  static jfieldID can_get_members_fieldID;
  /// True, if non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers.
  bool has_hidden_members_;
  static jfieldID has_hidden_members_fieldID;
  /// True, if non-administrators and non-bots can be hidden in responses to getSupergroupMembers and searchChatMembers for non-administrators.
  bool can_hide_members_;
  static jfieldID can_hide_members_fieldID;
  /// True, if the supergroup sticker set can be changed.
  bool can_set_sticker_set_;
  static jfieldID can_set_sticker_set_fieldID;
  /// True, if the supergroup location can be changed.
  bool can_set_location_;
  static jfieldID can_set_location_fieldID;
  /// True, if the supergroup or channel statistics are available.
  bool can_get_statistics_;
  static jfieldID can_get_statistics_fieldID;
  /// True, if the supergroup or channel revenue statistics are available.
  bool can_get_revenue_statistics_;
  static jfieldID can_get_revenue_statistics_fieldID;
  /// True, if the supergroup or channel Telegram Star revenue statistics are available.
  bool can_get_star_revenue_statistics_;
  static jfieldID can_get_star_revenue_statistics_fieldID;
  /// True, if the user can send a gift to the supergroup or channel using sendGift or transferGift.
  bool can_send_gift_;
  static jfieldID can_send_gift_fieldID;
  /// True, if aggressive anti-spam checks can be enabled or disabled in the supergroup.
  bool can_toggle_aggressive_anti_spam_;
  static jfieldID can_toggle_aggressive_anti_spam_fieldID;
  /// True, if new chat members will have access to old messages. In public, discussion, of forum groups and all channels, old messages are always available, so this option affects only private non-forum supergroups without a linked chat. The value of this field is only available to chat administrators.
  bool is_all_history_available_;
  static jfieldID is_all_history_available_fieldID;
  /// True, if the chat can have sponsored messages. The value of this field is only available to the owner of the chat.
  bool can_have_sponsored_messages_;
  static jfieldID can_have_sponsored_messages_fieldID;
  /// True, if aggressive anti-spam checks are enabled in the supergroup. The value of this field is only available to chat administrators.
  bool has_aggressive_anti_spam_enabled_;
  static jfieldID has_aggressive_anti_spam_enabled_fieldID;
  /// True, if paid media can be sent and forwarded to the channel chat; for channels only.
  bool has_paid_media_allowed_;
  static jfieldID has_paid_media_allowed_fieldID;
  /// True, if the supergroup or channel has pinned stories.
  bool has_pinned_stories_;
  static jfieldID has_pinned_stories_fieldID;
  /// Number of saved to profile gifts for channels without can_post_messages administrator right, otherwise, the total number of received gifts.
  int32 gift_count_;
  static jfieldID gift_count_fieldID;
  /// Number of times the current user boosted the supergroup or channel.
  int32 my_boost_count_;
  static jfieldID my_boost_count_fieldID;
  /// Number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; 0 if unspecified.
  int32 unrestrict_boost_count_;
  static jfieldID unrestrict_boost_count_fieldID;
  /// Number of Telegram Stars that must be paid by the current user for each sent message to the supergroup.
  int53 outgoing_paid_message_star_count_;
  static jfieldID outgoing_paid_message_star_count_fieldID;
  /// Identifier of the supergroup sticker set that must be shown before user sticker sets; 0 if none.
  int64 sticker_set_id_;
  static jfieldID sticker_set_id_fieldID;
  /// Identifier of the custom emoji sticker set that can be used in the supergroup without Telegram Premium subscription; 0 if none.
  int64 custom_emoji_sticker_set_id_;
  static jfieldID custom_emoji_sticker_set_id_fieldID;
  /// Location to which the supergroup is connected; may be null if none.
  object_ptr<chatLocation> location_;
  static jfieldID location_fieldID;
  /// Primary invite link for the chat; may be null. For chat administrators with can_invite_users right only.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;
  /// List of commands of bots in the group.
  array<object_ptr<botCommands>> bot_commands_;
  static jfieldID bot_commands_fieldID;
  /// Information about verification status of the supergroup or the channel provided by a bot; may be null if none or unknown.
  object_ptr<botVerification> bot_verification_;
  static jfieldID bot_verification_fieldID;
  /// The main tab chosen by the administrators of the channel; may be null if not chosen manually.
  object_ptr<ProfileTab> main_profile_tab_;
  static jfieldID main_profile_tab_fieldID;
  /// Identifier of the basic group from which supergroup was upgraded; 0 if none.
  int53 upgraded_from_basic_group_id_;
  static jfieldID upgraded_from_basic_group_id_fieldID;
  /// Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none.
  int53 upgraded_from_max_message_id_;
  static jfieldID upgraded_from_max_message_id_fieldID;

  /**
   * Contains full information about a supergroup or channel.
   */
  supergroupFullInfo();

  /**
   * Contains full information about a supergroup or channel.
   *
   * \param[in] photo_ Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo.
   * \param[in] description_ Supergroup or channel description.
   * \param[in] member_count_ Number of members in the supergroup or channel; 0 if unknown.
   * \param[in] administrator_count_ Number of privileged users in the supergroup or channel; 0 if unknown.
   * \param[in] restricted_count_ Number of restricted users in the supergroup; 0 if unknown.
   * \param[in] banned_count_ Number of users banned from chat; 0 if unknown.
   * \param[in] linked_chat_id_ Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown.
   * \param[in] direct_messages_chat_id_ Chat identifier of a direct messages group for the channel, or a channel, for which the supergroup is the designated direct messages group; 0 if none.
   * \param[in] slow_mode_delay_ Delay between consecutive sent messages for non-administrator supergroup members, in seconds.
   * \param[in] slow_mode_delay_expires_in_ Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero.
   * \param[in] can_enable_paid_messages_ True, if paid messages can be enabled in the supergroup chat; for supergroup only.
   * \param[in] can_enable_paid_reaction_ True, if paid reaction can be enabled in the channel chat; for channels only.
   * \param[in] can_get_members_ True, if members of the chat can be retrieved via getSupergroupMembers or searchChatMembers.
   * \param[in] has_hidden_members_ True, if non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers.
   * \param[in] can_hide_members_ True, if non-administrators and non-bots can be hidden in responses to getSupergroupMembers and searchChatMembers for non-administrators.
   * \param[in] can_set_sticker_set_ True, if the supergroup sticker set can be changed.
   * \param[in] can_set_location_ True, if the supergroup location can be changed.
   * \param[in] can_get_statistics_ True, if the supergroup or channel statistics are available.
   * \param[in] can_get_revenue_statistics_ True, if the supergroup or channel revenue statistics are available.
   * \param[in] can_get_star_revenue_statistics_ True, if the supergroup or channel Telegram Star revenue statistics are available.
   * \param[in] can_send_gift_ True, if the user can send a gift to the supergroup or channel using sendGift or transferGift.
   * \param[in] can_toggle_aggressive_anti_spam_ True, if aggressive anti-spam checks can be enabled or disabled in the supergroup.
   * \param[in] is_all_history_available_ True, if new chat members will have access to old messages. In public, discussion, of forum groups and all channels, old messages are always available, so this option affects only private non-forum supergroups without a linked chat. The value of this field is only available to chat administrators.
   * \param[in] can_have_sponsored_messages_ True, if the chat can have sponsored messages. The value of this field is only available to the owner of the chat.
   * \param[in] has_aggressive_anti_spam_enabled_ True, if aggressive anti-spam checks are enabled in the supergroup. The value of this field is only available to chat administrators.
   * \param[in] has_paid_media_allowed_ True, if paid media can be sent and forwarded to the channel chat; for channels only.
   * \param[in] has_pinned_stories_ True, if the supergroup or channel has pinned stories.
   * \param[in] gift_count_ Number of saved to profile gifts for channels without can_post_messages administrator right, otherwise, the total number of received gifts.
   * \param[in] my_boost_count_ Number of times the current user boosted the supergroup or channel.
   * \param[in] unrestrict_boost_count_ Number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; 0 if unspecified.
   * \param[in] outgoing_paid_message_star_count_ Number of Telegram Stars that must be paid by the current user for each sent message to the supergroup.
   * \param[in] sticker_set_id_ Identifier of the supergroup sticker set that must be shown before user sticker sets; 0 if none.
   * \param[in] custom_emoji_sticker_set_id_ Identifier of the custom emoji sticker set that can be used in the supergroup without Telegram Premium subscription; 0 if none.
   * \param[in] location_ Location to which the supergroup is connected; may be null if none.
   * \param[in] invite_link_ Primary invite link for the chat; may be null. For chat administrators with can_invite_users right only.
   * \param[in] bot_commands_ List of commands of bots in the group.
   * \param[in] bot_verification_ Information about verification status of the supergroup or the channel provided by a bot; may be null if none or unknown.
   * \param[in] main_profile_tab_ The main tab chosen by the administrators of the channel; may be null if not chosen manually.
   * \param[in] upgraded_from_basic_group_id_ Identifier of the basic group from which supergroup was upgraded; 0 if none.
   * \param[in] upgraded_from_max_message_id_ Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none.
   */
  supergroupFullInfo(object_ptr<chatPhoto> &&photo_, string const &description_, int32 member_count_, int32 administrator_count_, int32 restricted_count_, int32 banned_count_, int53 linked_chat_id_, int53 direct_messages_chat_id_, int32 slow_mode_delay_, double slow_mode_delay_expires_in_, bool can_enable_paid_messages_, bool can_enable_paid_reaction_, bool can_get_members_, bool has_hidden_members_, bool can_hide_members_, bool can_set_sticker_set_, bool can_set_location_, bool can_get_statistics_, bool can_get_revenue_statistics_, bool can_get_star_revenue_statistics_, bool can_send_gift_, bool can_toggle_aggressive_anti_spam_, bool is_all_history_available_, bool can_have_sponsored_messages_, bool has_aggressive_anti_spam_enabled_, bool has_paid_media_allowed_, bool has_pinned_stories_, int32 gift_count_, int32 my_boost_count_, int32 unrestrict_boost_count_, int53 outgoing_paid_message_star_count_, int64 sticker_set_id_, int64 custom_emoji_sticker_set_id_, object_ptr<chatLocation> &&location_, object_ptr<chatInviteLink> &&invite_link_, array<object_ptr<botCommands>> &&bot_commands_, object_ptr<botVerification> &&bot_verification_, object_ptr<ProfileTab> &&main_profile_tab_, int53 upgraded_from_basic_group_id_, int53 upgraded_from_max_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -497664769;

  static object_ptr<supergroupFullInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

/**
 * This class is an abstract base class.
 * Specifies the kind of chat members to return in getSupergroupMembers.
 */
class SupergroupMembersFilter: public Object {
 public:
  static jclass Class;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns recently active users in reverse chronological order.
 */
class supergroupMembersFilterRecent final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns recently active users in reverse chronological order.
   */
  supergroupMembersFilterRecent();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1178199509;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns contacts of the user, which are members of the supergroup or channel.
 */
class supergroupMembersFilterContacts final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Returns contacts of the user, which are members of the supergroup or channel.
   */
  supergroupMembersFilterContacts();

  /**
   * Returns contacts of the user, which are members of the supergroup or channel.
   *
   * \param[in] query_ Query to search for.
   */
  explicit supergroupMembersFilterContacts(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1282910856;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns the owner and administrators.
 */
class supergroupMembersFilterAdministrators final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns the owner and administrators.
   */
  supergroupMembersFilterAdministrators();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2097380265;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Used to search for supergroup or channel members via a (string) query.
 */
class supergroupMembersFilterSearch final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Used to search for supergroup or channel members via a (string) query.
   */
  supergroupMembersFilterSearch();

  /**
   * Used to search for supergroup or channel members via a (string) query.
   *
   * \param[in] query_ Query to search for.
   */
  explicit supergroupMembersFilterSearch(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1696358469;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns restricted supergroup members; can be used only by administrators.
 */
class supergroupMembersFilterRestricted final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Returns restricted supergroup members; can be used only by administrators.
   */
  supergroupMembersFilterRestricted();

  /**
   * Returns restricted supergroup members; can be used only by administrators.
   *
   * \param[in] query_ Query to search for.
   */
  explicit supergroupMembersFilterRestricted(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1107800034;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns users banned from the supergroup or channel; can be used only by administrators.
 */
class supergroupMembersFilterBanned final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Returns users banned from the supergroup or channel; can be used only by administrators.
   */
  supergroupMembersFilterBanned();

  /**
   * Returns users banned from the supergroup or channel; can be used only by administrators.
   *
   * \param[in] query_ Query to search for.
   */
  explicit supergroupMembersFilterBanned(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1210621683;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns users which can be mentioned in the supergroup.
 */
class supergroupMembersFilterMention final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// Identifier of the topic in which the users will be mentioned; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Returns users which can be mentioned in the supergroup.
   */
  supergroupMembersFilterMention();

  /**
   * Returns users which can be mentioned in the supergroup.
   *
   * \param[in] query_ Query to search for.
   * \param[in] topic_id_ Identifier of the topic in which the users will be mentioned; pass null if none.
   */
  supergroupMembersFilterMention(string const &query_, object_ptr<MessageTopic> &&topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1151301973;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns bot members of the supergroup or channel.
 */
class supergroupMembersFilterBots final : public SupergroupMembersFilter {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Returns bot members of the supergroup or channel.
   */
  supergroupMembersFilterBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 492138918;

  static object_ptr<SupergroupMembersFilter> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class TMeUrlType;

/**
 * Represents a URL linking to an internal Telegram entity.
 */
class tMeUrl final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL.
  string url_;
  static jfieldID url_fieldID;
  /// Type of the URL.
  object_ptr<TMeUrlType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a URL linking to an internal Telegram entity.
   */
  tMeUrl();

  /**
   * Represents a URL linking to an internal Telegram entity.
   *
   * \param[in] url_ URL.
   * \param[in] type_ Type of the URL.
   */
  tMeUrl(string const &url_, object_ptr<TMeUrlType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1140786622;

  static object_ptr<tMeUrl> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinkInfo;

/**
 * This class is an abstract base class.
 * Describes the type of URL linking to an internal Telegram entity.
 */
class TMeUrlType: public Object {
 public:
  static jclass Class;

  static object_ptr<TMeUrlType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A URL linking to a user.
 */
class tMeUrlTypeUser final : public TMeUrlType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A URL linking to a user.
   */
  tMeUrlTypeUser();

  /**
   * A URL linking to a user.
   *
   * \param[in] user_id_ Identifier of the user.
   */
  explicit tMeUrlTypeUser(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 125336602;

  static object_ptr<TMeUrlType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A URL linking to a public supergroup or channel.
 */
class tMeUrlTypeSupergroup final : public TMeUrlType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * A URL linking to a public supergroup or channel.
   */
  tMeUrlTypeSupergroup();

  /**
   * A URL linking to a public supergroup or channel.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   */
  explicit tMeUrlTypeSupergroup(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1353369944;

  static object_ptr<TMeUrlType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat invite link.
 */
class tMeUrlTypeChatInvite final : public TMeUrlType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the chat invite link.
  object_ptr<chatInviteLinkInfo> info_;
  static jfieldID info_fieldID;

  /**
   * A chat invite link.
   */
  tMeUrlTypeChatInvite();

  /**
   * A chat invite link.
   *
   * \param[in] info_ Information about the chat invite link.
   */
  explicit tMeUrlTypeChatInvite(object_ptr<chatInviteLinkInfo> &&info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 313907785;

  static object_ptr<TMeUrlType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A URL linking to a sticker set.
 */
class tMeUrlTypeStickerSet final : public TMeUrlType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set.
  int64 sticker_set_id_;
  static jfieldID sticker_set_id_fieldID;

  /**
   * A URL linking to a sticker set.
   */
  tMeUrlTypeStickerSet();

  /**
   * A URL linking to a sticker set.
   *
   * \param[in] sticker_set_id_ Identifier of the sticker set.
   */
  explicit tMeUrlTypeStickerSet(int64 sticker_set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1602473196;

  static object_ptr<TMeUrlType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class tMeUrl;

/**
 * Contains a list of t.me URLs.
 */
class tMeUrls final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of URLs.
  array<object_ptr<tMeUrl>> urls_;
  static jfieldID urls_fieldID;

  /**
   * Contains a list of t.me URLs.
   */
  tMeUrls();

  /**
   * Contains a list of t.me URLs.
   *
   * \param[in] urls_ List of URLs.
   */
  explicit tMeUrls(array<object_ptr<tMeUrl>> &&urls_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1130595098;

  static object_ptr<tMeUrls> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

class targetChatTypes;

/**
 * This class is an abstract base class.
 * Describes the target chat to be opened.
 */
class TargetChat: public Object {
 public:
  static jclass Class;

  static object_ptr<TargetChat> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The currently opened chat and forum topic must be kept.
 */
class targetChatCurrent final : public TargetChat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The currently opened chat and forum topic must be kept.
   */
  targetChatCurrent();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -416689904;

  static object_ptr<TargetChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat needs to be chosen by the user among chats of the specified types.
 */
class targetChatChosen final : public TargetChat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Allowed types for the chat.
  object_ptr<targetChatTypes> types_;
  static jfieldID types_fieldID;

  /**
   * The chat needs to be chosen by the user among chats of the specified types.
   */
  targetChatChosen();

  /**
   * The chat needs to be chosen by the user among chats of the specified types.
   *
   * \param[in] types_ Allowed types for the chat.
   */
  explicit targetChatChosen(object_ptr<targetChatTypes> &&types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1392978522;

  static object_ptr<TargetChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat needs to be open with the provided internal link.
 */
class targetChatInternalLink final : public TargetChat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// An internal link pointing to the chat.
  object_ptr<InternalLinkType> link_;
  static jfieldID link_fieldID;

  /**
   * The chat needs to be open with the provided internal link.
   */
  targetChatInternalLink();

  /**
   * The chat needs to be open with the provided internal link.
   *
   * \param[in] link_ An internal link pointing to the chat.
   */
  explicit targetChatInternalLink(object_ptr<InternalLinkType> &&link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -579301408;

  static object_ptr<TargetChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes allowed types for the target chat.
 */
class targetChatTypes final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if private chats with ordinary users are allowed.
  bool allow_user_chats_;
  static jfieldID allow_user_chats_fieldID;
  /// True, if private chats with other bots are allowed.
  bool allow_bot_chats_;
  static jfieldID allow_bot_chats_fieldID;
  /// True, if basic group and supergroup chats are allowed.
  bool allow_group_chats_;
  static jfieldID allow_group_chats_fieldID;
  /// True, if channel chats are allowed.
  bool allow_channel_chats_;
  static jfieldID allow_channel_chats_fieldID;

  /**
   * Describes allowed types for the target chat.
   */
  targetChatTypes();

  /**
   * Describes allowed types for the target chat.
   *
   * \param[in] allow_user_chats_ True, if private chats with ordinary users are allowed.
   * \param[in] allow_bot_chats_ True, if private chats with other bots are allowed.
   * \param[in] allow_group_chats_ True, if basic group and supergroup chats are allowed.
   * \param[in] allow_channel_chats_ True, if channel chats are allowed.
   */
  targetChatTypes(bool allow_user_chats_, bool allow_bot_chats_, bool allow_group_chats_, bool allow_channel_chats_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1513098833;

  static object_ptr<targetChatTypes> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class giveawayParameters;

/**
 * This class is an abstract base class.
 * Describes a purpose of a payment toward Telegram.
 */
class TelegramPaymentPurpose: public Object {
 public:
  static jclass Class;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user gifting Telegram Premium to another user.
 */
class telegramPaymentPurposePremiumGift final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code of the payment currency, or &quot;XTR&quot; for payments in Telegram Stars.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Identifier of the user which will receive Telegram Premium.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Number of months the Telegram Premium subscription will be active for the user.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Text to show to the user receiving Telegram Premium; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * The user gifting Telegram Premium to another user.
   */
  telegramPaymentPurposePremiumGift();

  /**
   * The user gifting Telegram Premium to another user.
   *
   * \param[in] currency_ ISO 4217 currency code of the payment currency, or &quot;XTR&quot; for payments in Telegram Stars.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] user_id_ Identifier of the user which will receive Telegram Premium.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active for the user.
   * \param[in] text_ Text to show to the user receiving Telegram Premium; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
   */
  telegramPaymentPurposePremiumGift(string const &currency_, int53 amount_, int53 user_id_, int32 month_count_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1600286150;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user boosting a chat by creating Telegram Premium gift codes for other users.
 */
class telegramPaymentPurposePremiumGiftCodes final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user.
  int53 boosted_chat_id_;
  static jfieldID boosted_chat_id_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Identifiers of the users which can activate the gift codes.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;
  /// Number of months the Telegram Premium subscription will be active for the users.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * The user boosting a chat by creating Telegram Premium gift codes for other users.
   */
  telegramPaymentPurposePremiumGiftCodes();

  /**
   * The user boosting a chat by creating Telegram Premium gift codes for other users.
   *
   * \param[in] boosted_chat_id_ Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] user_ids_ Identifiers of the users which can activate the gift codes.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active for the users.
   * \param[in] text_ Text to show along with the gift codes; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
   */
  telegramPaymentPurposePremiumGiftCodes(int53 boosted_chat_id_, string const &currency_, int53 amount_, array<int53> &&user_ids_, int32 month_count_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1863495348;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user creating a Telegram Premium giveaway.
 */
class telegramPaymentPurposePremiumGiveaway final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of users which will be able to activate the gift codes.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// Number of months the Telegram Premium subscription will be active for the users.
  int32 month_count_;
  static jfieldID month_count_fieldID;

  /**
   * The user creating a Telegram Premium giveaway.
   */
  telegramPaymentPurposePremiumGiveaway();

  /**
   * The user creating a Telegram Premium giveaway.
   *
   * \param[in] parameters_ Giveaway parameters.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] winner_count_ Number of users which will be able to activate the gift codes.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active for the users.
   */
  telegramPaymentPurposePremiumGiveaway(object_ptr<giveawayParameters> &&parameters_, string const &currency_, int53 amount_, int32 winner_count_, int32 month_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -760757441;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user buying Telegram Stars.
 */
class telegramPaymentPurposeStars final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of bought Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The user buying Telegram Stars.
   */
  telegramPaymentPurposeStars();

  /**
   * The user buying Telegram Stars.
   *
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] star_count_ Number of bought Telegram Stars.
   * \param[in] chat_id_ Identifier of the chat that is supposed to receive the Telegram Stars; pass 0 if none.
   */
  telegramPaymentPurposeStars(string const &currency_, int53 amount_, int53 star_count_, int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1204968037;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user buying Telegram Stars for other users.
 */
class telegramPaymentPurposeGiftedStars final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user to which Telegram Stars are gifted.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// Number of bought Telegram Stars.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * The user buying Telegram Stars for other users.
   */
  telegramPaymentPurposeGiftedStars();

  /**
   * The user buying Telegram Stars for other users.
   *
   * \param[in] user_id_ Identifier of the user to which Telegram Stars are gifted.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] star_count_ Number of bought Telegram Stars.
   */
  telegramPaymentPurposeGiftedStars(int53 user_id_, string const &currency_, int53 amount_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1850308042;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user creating a Telegram Star giveaway.
 */
class telegramPaymentPurposeStarGiveaway final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;
  /// The number of users to receive Telegram Stars.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// The number of Telegram Stars to be distributed through the giveaway.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * The user creating a Telegram Star giveaway.
   */
  telegramPaymentPurposeStarGiveaway();

  /**
   * The user creating a Telegram Star giveaway.
   *
   * \param[in] parameters_ Giveaway parameters.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   * \param[in] winner_count_ The number of users to receive Telegram Stars.
   * \param[in] star_count_ The number of Telegram Stars to be distributed through the giveaway.
   */
  telegramPaymentPurposeStarGiveaway(object_ptr<giveawayParameters> &&parameters_, string const &currency_, int53 amount_, int32 winner_count_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1014604689;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user joins a chat and subscribes to regular payments in Telegram Stars.
 */
class telegramPaymentPurposeJoinChat final : public TelegramPaymentPurpose {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link to use.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * The user joins a chat and subscribes to regular payments in Telegram Stars.
   */
  telegramPaymentPurposeJoinChat();

  /**
   * The user joins a chat and subscribes to regular payments in Telegram Stars.
   *
   * \param[in] invite_link_ Invite link to use.
   */
  explicit telegramPaymentPurposeJoinChat(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1914869880;

  static object_ptr<TelegramPaymentPurpose> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Returns information about the availability of a temporary password, which can be used for payments.
 */
class temporaryPasswordState final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if a temporary password is available.
  bool has_password_;
  static jfieldID has_password_fieldID;
  /// Time left before the temporary password expires, in seconds.
  int32 valid_for_;
  static jfieldID valid_for_fieldID;

  /**
   * Returns information about the availability of a temporary password, which can be used for payments.
   */
  temporaryPasswordState();

  /**
   * Returns information about the availability of a temporary password, which can be used for payments.
   *
   * \param[in] has_password_ True, if a temporary password is available.
   * \param[in] valid_for_ Time left before the temporary password expires, in seconds.
   */
  temporaryPasswordState(bool has_password_, int32 valid_for_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 939837410;

  static object_ptr<temporaryPasswordState> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Contains Telegram terms of service.
 */
class termsOfService final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the terms of service.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// The minimum age of a user to be able to accept the terms; 0 if age isn't restricted.
  int32 min_user_age_;
  static jfieldID min_user_age_fieldID;
  /// True, if a blocking popup with terms of service must be shown to the user.
  bool show_popup_;
  static jfieldID show_popup_fieldID;

  /**
   * Contains Telegram terms of service.
   */
  termsOfService();

  /**
   * Contains Telegram terms of service.
   *
   * \param[in] text_ Text of the terms of service.
   * \param[in] min_user_age_ The minimum age of a user to be able to accept the terms; 0 if age isn't restricted.
   * \param[in] show_popup_ True, if a blocking popup with terms of service must be shown to the user.
   */
  termsOfService(object_ptr<formattedText> &&text_, int32 min_user_age_, bool show_popup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 739422597;

  static object_ptr<termsOfService> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A simple object containing a sequence of bytes; for testing only.
 */
class testBytes final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Bytes.
  bytes value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a sequence of bytes; for testing only.
   */
  testBytes();

  /**
   * A simple object containing a sequence of bytes; for testing only.
   *
   * \param[in] value_ Bytes.
   */
  explicit testBytes(bytes const &value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1541225250;

  static object_ptr<testBytes> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A simple object containing a number; for testing only.
 */
class testInt final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number.
  int32 value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a number; for testing only.
   */
  testInt();

  /**
   * A simple object containing a number; for testing only.
   *
   * \param[in] value_ Number.
   */
  explicit testInt(int32 value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -574804983;

  static object_ptr<testInt> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A simple object containing a string; for testing only.
 */
class testString final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// String.
  string value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a string; for testing only.
   */
  testString();

  /**
   * A simple object containing a string; for testing only.
   *
   * \param[in] value_ String.
   */
  explicit testString(string const &value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -27891572;

  static object_ptr<testString> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A simple object containing a vector of numbers; for testing only.
 */
class testVectorInt final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of numbers.
  array<int32> value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a vector of numbers; for testing only.
   */
  testVectorInt();

  /**
   * A simple object containing a vector of numbers; for testing only.
   *
   * \param[in] value_ Vector of numbers.
   */
  explicit testVectorInt(array<int32> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 593682027;

  static object_ptr<testVectorInt> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class testInt;

/**
 * A simple object containing a vector of objects that hold a number; for testing only.
 */
class testVectorIntObject final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of objects.
  array<object_ptr<testInt>> value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a vector of objects that hold a number; for testing only.
   */
  testVectorIntObject();

  /**
   * A simple object containing a vector of objects that hold a number; for testing only.
   *
   * \param[in] value_ Vector of objects.
   */
  explicit testVectorIntObject(array<object_ptr<testInt>> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 125891546;

  static object_ptr<testVectorIntObject> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A simple object containing a vector of strings; for testing only.
 */
class testVectorString final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of strings.
  array<string> value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a vector of strings; for testing only.
   */
  testVectorString();

  /**
   * A simple object containing a vector of strings; for testing only.
   *
   * \param[in] value_ Vector of strings.
   */
  explicit testVectorString(array<string> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 79339995;

  static object_ptr<testVectorString> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class testString;

/**
 * A simple object containing a vector of objects that hold a string; for testing only.
 */
class testVectorStringObject final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of objects.
  array<object_ptr<testString>> value_;
  static jfieldID value_fieldID;

  /**
   * A simple object containing a vector of objects that hold a string; for testing only.
   */
  testVectorStringObject();

  /**
   * A simple object containing a vector of objects that hold a string; for testing only.
   *
   * \param[in] value_ Vector of objects.
   */
  explicit testVectorStringObject(array<object_ptr<testString>> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 80780537;

  static object_ptr<testVectorStringObject> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains some text.
 */
class text final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Contains some text.
   */
  text();

  /**
   * Contains some text.
   *
   * \param[in] text_ Text.
   */
  explicit text(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 578181272;

  static object_ptr<text> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class textCompositionStyleExample;

/**
 * Describes a style that can be used to compose a text.
 */
class textCompositionStyle final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;
  /// Identifier of the custom emoji corresponding to the style; 0 if none.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;
  /// Title of the style in the user application's language.
  string title_;
  static jfieldID title_fieldID;
  /// True, if the style is created by a user.
  bool is_custom_;
  static jfieldID is_custom_fieldID;
  /// True, if the user is creator of the style.
  bool is_creator_;
  static jfieldID is_creator_fieldID;
  /// Number of users that installed the style; for created custom styles only; 0 if unknown.
  int32 install_count_;
  static jfieldID install_count_fieldID;
  /// Prompt of the style; for created custom styles only.
  string prompt_;
  static jfieldID prompt_fieldID;
  /// User identifier of the creator of the style; 0 if none of unknown.
  int53 creator_user_id_;
  static jfieldID creator_user_id_fieldID;
  /// Example of the style usage in English; may be null if unknown.
  object_ptr<textCompositionStyleExample> english_example_;
  static jfieldID english_example_fieldID;

  /**
   * Describes a style that can be used to compose a text.
   */
  textCompositionStyle();

  /**
   * Describes a style that can be used to compose a text.
   *
   * \param[in] name_ Name of the style.
   * \param[in] custom_emoji_id_ Identifier of the custom emoji corresponding to the style; 0 if none.
   * \param[in] title_ Title of the style in the user application's language.
   * \param[in] is_custom_ True, if the style is created by a user.
   * \param[in] is_creator_ True, if the user is creator of the style.
   * \param[in] install_count_ Number of users that installed the style; for created custom styles only; 0 if unknown.
   * \param[in] prompt_ Prompt of the style; for created custom styles only.
   * \param[in] creator_user_id_ User identifier of the creator of the style; 0 if none of unknown.
   * \param[in] english_example_ Example of the style usage in English; may be null if unknown.
   */
  textCompositionStyle(string const &name_, int64 custom_emoji_id_, string const &title_, bool is_custom_, bool is_creator_, int32 install_count_, string const &prompt_, int53 creator_user_id_, object_ptr<textCompositionStyleExample> &&english_example_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -171516397;

  static object_ptr<textCompositionStyle> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Contains an example of text composition style usage.
 */
class textCompositionStyleExample final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Source text.
  object_ptr<formattedText> source_text_;
  static jfieldID source_text_fieldID;
  /// The text after the style was applied to the source text.
  object_ptr<formattedText> result_text_;
  static jfieldID result_text_fieldID;

  /**
   * Contains an example of text composition style usage.
   */
  textCompositionStyleExample();

  /**
   * Contains an example of text composition style usage.
   *
   * \param[in] source_text_ Source text.
   * \param[in] result_text_ The text after the style was applied to the source text.
   */
  textCompositionStyleExample(object_ptr<formattedText> &&source_text_, object_ptr<formattedText> &&result_text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -43329922;

  static object_ptr<textCompositionStyleExample> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class textEntity;

/**
 * Contains a list of text entities.
 */
class textEntities final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of text entities.
  array<object_ptr<textEntity>> entities_;
  static jfieldID entities_fieldID;

  /**
   * Contains a list of text entities.
   */
  textEntities();

  /**
   * Contains a list of text entities.
   *
   * \param[in] entities_ List of text entities.
   */
  explicit textEntities(array<object_ptr<textEntity>> &&entities_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -933199172;

  static object_ptr<textEntities> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class TextEntityType;

/**
 * Represents a part of the text that needs to be formatted in some unusual way.
 */
class textEntity final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Offset of the entity, in UTF-16 code units.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// Length of the entity, in UTF-16 code units.
  int32 length_;
  static jfieldID length_fieldID;
  /// Type of the entity.
  object_ptr<TextEntityType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a part of the text that needs to be formatted in some unusual way.
   */
  textEntity();

  /**
   * Represents a part of the text that needs to be formatted in some unusual way.
   *
   * \param[in] offset_ Offset of the entity, in UTF-16 code units.
   * \param[in] length_ Length of the entity, in UTF-16 code units.
   * \param[in] type_ Type of the entity.
   */
  textEntity(int32 offset_, int32 length_, object_ptr<TextEntityType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1951688280;

  static object_ptr<textEntity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class DateTimeFormattingType;

/**
 * This class is an abstract base class.
 * Represents a part of the text which must be formatted differently.
 */
class TextEntityType: public Object {
 public:
  static jclass Class;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A mention of a user, a supergroup, or a channel by their username.
 */
class textEntityTypeMention final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A mention of a user, a supergroup, or a channel by their username.
   */
  textEntityTypeMention();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 934535013;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A hashtag text, beginning with &quot;\#&quot; and optionally containing a chat username at the end.
 */
class textEntityTypeHashtag final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A hashtag text, beginning with &quot;\#&quot; and optionally containing a chat username at the end.
   */
  textEntityTypeHashtag();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1023958307;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A cashtag text, beginning with &quot;$&quot;, consisting of capital English letters (e.g., &quot;$USD&quot;), and optionally containing a chat username at the end.
 */
class textEntityTypeCashtag final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A cashtag text, beginning with &quot;$&quot;, consisting of capital English letters (e.g., &quot;$USD&quot;), and optionally containing a chat username at the end.
   */
  textEntityTypeCashtag();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1222915915;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bot command, beginning with &quot;/&quot;.
 */
class textEntityTypeBotCommand final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A bot command, beginning with &quot;/&quot;.
   */
  textEntityTypeBotCommand();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1150997581;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An HTTP URL.
 */
class textEntityTypeUrl final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An HTTP URL.
   */
  textEntityTypeUrl();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1312762756;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An email address.
 */
class textEntityTypeEmailAddress final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An email address.
   */
  textEntityTypeEmailAddress();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1425545249;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A phone number.
 */
class textEntityTypePhoneNumber final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A phone number.
   */
  textEntityTypePhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1160140246;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bank card number. The getBankCardInfo method can be used to get information about the bank card.
 */
class textEntityTypeBankCardNumber final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A bank card number. The getBankCardInfo method can be used to get information about the bank card.
   */
  textEntityTypeBankCardNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 105986320;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bold text.
 */
class textEntityTypeBold final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A bold text.
   */
  textEntityTypeBold();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1128210000;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An italic text.
 */
class textEntityTypeItalic final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An italic text.
   */
  textEntityTypeItalic();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -118253987;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An underlined text.
 */
class textEntityTypeUnderline final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * An underlined text.
   */
  textEntityTypeUnderline();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 792317842;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A strikethrough text.
 */
class textEntityTypeStrikethrough final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A strikethrough text.
   */
  textEntityTypeStrikethrough();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 961529082;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A spoiler text.
 */
class textEntityTypeSpoiler final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A spoiler text.
   */
  textEntityTypeSpoiler();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 544019899;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Text that must be formatted as if inside a code HTML tag.
 */
class textEntityTypeCode final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Text that must be formatted as if inside a code HTML tag.
   */
  textEntityTypeCode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -974534326;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Text that must be formatted as if inside a pre HTML tag.
 */
class textEntityTypePre final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Text that must be formatted as if inside a pre HTML tag.
   */
  textEntityTypePre();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1648958606;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Text that must be formatted as if inside pre, and code HTML tags.
 */
class textEntityTypePreCode final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Programming language of the code; as defined by the sender.
  string language_;
  static jfieldID language_fieldID;

  /**
   * Text that must be formatted as if inside pre, and code HTML tags.
   */
  textEntityTypePreCode();

  /**
   * Text that must be formatted as if inside pre, and code HTML tags.
   *
   * \param[in] language_ Programming language of the code; as defined by the sender.
   */
  explicit textEntityTypePreCode(string const &language_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -945325397;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Text that must be formatted as if inside a blockquote HTML tag; not supported in secret chats.
 */
class textEntityTypeBlockQuote final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Text that must be formatted as if inside a blockquote HTML tag; not supported in secret chats.
   */
  textEntityTypeBlockQuote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1003999032;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Text that must be formatted as if inside a blockquote HTML tag and collapsed by default to 3 lines with the ability to show full text; not supported in secret chats.
 */
class textEntityTypeExpandableBlockQuote final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Text that must be formatted as if inside a blockquote HTML tag and collapsed by default to 3 lines with the ability to show full text; not supported in secret chats.
   */
  textEntityTypeExpandableBlockQuote();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 36572261;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A text description shown instead of a raw URL.
 */
class textEntityTypeTextUrl final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// HTTP or tg:// URL to be opened when the link is clicked.
  string url_;
  static jfieldID url_fieldID;

  /**
   * A text description shown instead of a raw URL.
   */
  textEntityTypeTextUrl();

  /**
   * A text description shown instead of a raw URL.
   *
   * \param[in] url_ HTTP or tg:// URL to be opened when the link is clicked.
   */
  explicit textEntityTypeTextUrl(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 445719651;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A text shows instead of a raw mention of the user (e.g., when the user has no username).
 */
class textEntityTypeMentionName final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the mentioned user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * A text shows instead of a raw mention of the user (e.g., when the user has no username).
   */
  textEntityTypeMentionName();

  /**
   * A text shows instead of a raw mention of the user (e.g., when the user has no username).
   *
   * \param[in] user_id_ Identifier of the mentioned user.
   */
  explicit textEntityTypeMentionName(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1570974289;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A custom emoji. The text behind a custom emoji must be an emoji. Only premium users can use premium custom emoji.
 */
class textEntityTypeCustomEmoji final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the custom emoji.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * A custom emoji. The text behind a custom emoji must be an emoji. Only premium users can use premium custom emoji.
   */
  textEntityTypeCustomEmoji();

  /**
   * A custom emoji. The text behind a custom emoji must be an emoji. Only premium users can use premium custom emoji.
   *
   * \param[in] custom_emoji_id_ Unique identifier of the custom emoji.
   */
  explicit textEntityTypeCustomEmoji(int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1724820677;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A media timestamp.
 */
class textEntityTypeMediaTimestamp final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Timestamp from which a video/audio/video note/voice note/story playing must start, in seconds. The media can be in the content or the link preview of the current message, or in the same places in the replied message.
  int32 media_timestamp_;
  static jfieldID media_timestamp_fieldID;

  /**
   * A media timestamp.
   */
  textEntityTypeMediaTimestamp();

  /**
   * A media timestamp.
   *
   * \param[in] media_timestamp_ Timestamp from which a video/audio/video note/voice note/story playing must start, in seconds. The media can be in the content or the link preview of the current message, or in the same places in the replied message.
   */
  explicit textEntityTypeMediaTimestamp(int32 media_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1841898992;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A date and time.
 */
class textEntityTypeDateTime final : public TextEntityType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) representing the date and time.
  int32 unix_time_;
  static jfieldID unix_time_fieldID;
  /// Date and time formatting type; may be null if none and the original text must not be changed.
  object_ptr<DateTimeFormattingType> formatting_type_;
  static jfieldID formatting_type_fieldID;

  /**
   * A date and time.
   */
  textEntityTypeDateTime();

  /**
   * A date and time.
   *
   * \param[in] unix_time_ Point in time (Unix timestamp) representing the date and time.
   * \param[in] formatting_type_ Date and time formatting type; may be null if none and the original text must not be changed.
   */
  textEntityTypeDateTime(int32 unix_time_, object_ptr<DateTimeFormattingType> &&formatting_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1544268588;

  static object_ptr<TextEntityType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the way the text needs to be parsed for text entities.
 */
class TextParseMode: public Object {
 public:
  static jclass Class;

  static object_ptr<TextParseMode> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The text uses Markdown-style formatting.
 */
class textParseModeMarkdown final : public TextParseMode {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Version of the parser: 0 or 1 - Telegram Bot API &quot;Markdown&quot; parse mode, 2 - Telegram Bot API &quot;MarkdownV2&quot; parse mode.
  int32 version_;
  static jfieldID version_fieldID;

  /**
   * The text uses Markdown-style formatting.
   */
  textParseModeMarkdown();

  /**
   * The text uses Markdown-style formatting.
   *
   * \param[in] version_ Version of the parser: 0 or 1 - Telegram Bot API &quot;Markdown&quot; parse mode, 2 - Telegram Bot API &quot;MarkdownV2&quot; parse mode.
   */
  explicit textParseModeMarkdown(int32 version_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 360073407;

  static object_ptr<TextParseMode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The text uses HTML-style formatting. The same as Telegram Bot API &quot;HTML&quot; parse mode.
 */
class textParseModeHTML final : public TextParseMode {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The text uses HTML-style formatting. The same as Telegram Bot API &quot;HTML&quot; parse mode.
   */
  textParseModeHTML();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1660208627;

  static object_ptr<TextParseMode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Describes manually or automatically chosen quote from another message.
 */
class textQuote final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities can be present in the text.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Approximate quote position in the original message in UTF-16 code units as specified by the message sender.
  int32 position_;
  static jfieldID position_fieldID;
  /// True, if the quote was manually chosen by the message sender.
  bool is_manual_;
  static jfieldID is_manual_fieldID;

  /**
   * Describes manually or automatically chosen quote from another message.
   */
  textQuote();

  /**
   * Describes manually or automatically chosen quote from another message.
   *
   * \param[in] text_ Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities can be present in the text.
   * \param[in] position_ Approximate quote position in the original message in UTF-16 code units as specified by the message sender.
   * \param[in] is_manual_ True, if the quote was manually chosen by the message sender.
   */
  textQuote(object_ptr<formattedText> &&text_, int32 position_, bool is_manual_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2039105358;

  static object_ptr<textQuote> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains parameters of the application theme.
 */
class themeParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A color of the background in the RGB format.
  int32 background_color_;
  static jfieldID background_color_fieldID;
  /// A secondary color for the background in the RGB format.
  int32 secondary_background_color_;
  static jfieldID secondary_background_color_fieldID;
  /// A color of the header background in the RGB format.
  int32 header_background_color_;
  static jfieldID header_background_color_fieldID;
  /// A color of the bottom bar background in the RGB format.
  int32 bottom_bar_background_color_;
  static jfieldID bottom_bar_background_color_fieldID;
  /// A color of the section background in the RGB format.
  int32 section_background_color_;
  static jfieldID section_background_color_fieldID;
  /// A color of the section separator in the RGB format.
  int32 section_separator_color_;
  static jfieldID section_separator_color_fieldID;
  /// A color of text in the RGB format.
  int32 text_color_;
  static jfieldID text_color_fieldID;
  /// An accent color of the text in the RGB format.
  int32 accent_text_color_;
  static jfieldID accent_text_color_fieldID;
  /// A color of text on the section headers in the RGB format.
  int32 section_header_text_color_;
  static jfieldID section_header_text_color_fieldID;
  /// A color of the subtitle text in the RGB format.
  int32 subtitle_text_color_;
  static jfieldID subtitle_text_color_fieldID;
  /// A color of the text for destructive actions in the RGB format.
  int32 destructive_text_color_;
  static jfieldID destructive_text_color_fieldID;
  /// A color of hints in the RGB format.
  int32 hint_color_;
  static jfieldID hint_color_fieldID;
  /// A color of links in the RGB format.
  int32 link_color_;
  static jfieldID link_color_fieldID;
  /// A color of the buttons in the RGB format.
  int32 button_color_;
  static jfieldID button_color_fieldID;
  /// A color of text on the buttons in the RGB format.
  int32 button_text_color_;
  static jfieldID button_text_color_fieldID;

  /**
   * Contains parameters of the application theme.
   */
  themeParameters();

  /**
   * Contains parameters of the application theme.
   *
   * \param[in] background_color_ A color of the background in the RGB format.
   * \param[in] secondary_background_color_ A secondary color for the background in the RGB format.
   * \param[in] header_background_color_ A color of the header background in the RGB format.
   * \param[in] bottom_bar_background_color_ A color of the bottom bar background in the RGB format.
   * \param[in] section_background_color_ A color of the section background in the RGB format.
   * \param[in] section_separator_color_ A color of the section separator in the RGB format.
   * \param[in] text_color_ A color of text in the RGB format.
   * \param[in] accent_text_color_ An accent color of the text in the RGB format.
   * \param[in] section_header_text_color_ A color of text on the section headers in the RGB format.
   * \param[in] subtitle_text_color_ A color of the subtitle text in the RGB format.
   * \param[in] destructive_text_color_ A color of the text for destructive actions in the RGB format.
   * \param[in] hint_color_ A color of hints in the RGB format.
   * \param[in] link_color_ A color of links in the RGB format.
   * \param[in] button_color_ A color of the buttons in the RGB format.
   * \param[in] button_text_color_ A color of text on the buttons in the RGB format.
   */
  themeParameters(int32 background_color_, int32 secondary_background_color_, int32 header_background_color_, int32 bottom_bar_background_color_, int32 section_background_color_, int32 section_separator_color_, int32 text_color_, int32 accent_text_color_, int32 section_header_text_color_, int32 subtitle_text_color_, int32 destructive_text_color_, int32 hint_color_, int32 link_color_, int32 button_color_, int32 button_text_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -276589137;

  static object_ptr<themeParameters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundFill;

class BuiltInTheme;

class background;

/**
 * Describes theme settings.
 */
class themeSettings final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Base theme for this theme.
  object_ptr<BuiltInTheme> base_theme_;
  static jfieldID base_theme_fieldID;
  /// Theme accent color in ARGB format.
  int32 accent_color_;
  static jfieldID accent_color_fieldID;
  /// The background to be used in chats; may be null.
  object_ptr<background> background_;
  static jfieldID background_fieldID;
  /// The fill to be used as a background for outgoing messages; may be null if the fill from the base theme must be used instead.
  object_ptr<BackgroundFill> outgoing_message_fill_;
  static jfieldID outgoing_message_fill_fieldID;
  /// If true, the freeform gradient fill needs to be animated on every sent message.
  bool animate_outgoing_message_fill_;
  static jfieldID animate_outgoing_message_fill_fieldID;
  /// Accent color of outgoing messages in ARGB format.
  int32 outgoing_message_accent_color_;
  static jfieldID outgoing_message_accent_color_fieldID;

  /**
   * Describes theme settings.
   */
  themeSettings();

  /**
   * Describes theme settings.
   *
   * \param[in] base_theme_ Base theme for this theme.
   * \param[in] accent_color_ Theme accent color in ARGB format.
   * \param[in] background_ The background to be used in chats; may be null.
   * \param[in] outgoing_message_fill_ The fill to be used as a background for outgoing messages; may be null if the fill from the base theme must be used instead.
   * \param[in] animate_outgoing_message_fill_ If true, the freeform gradient fill needs to be animated on every sent message.
   * \param[in] outgoing_message_accent_color_ Accent color of outgoing messages in ARGB format.
   */
  themeSettings(object_ptr<BuiltInTheme> &&base_theme_, int32 accent_color_, object_ptr<background> &&background_, object_ptr<BackgroundFill> &&outgoing_message_fill_, bool animate_outgoing_message_fill_, int32 outgoing_message_accent_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1935106938;

  static object_ptr<themeSettings> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ThumbnailFormat;

class file;

/**
 * Represents a thumbnail.
 */
class thumbnail final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Thumbnail format.
  object_ptr<ThumbnailFormat> format_;
  static jfieldID format_fieldID;
  /// Thumbnail width.
  int32 width_;
  static jfieldID width_fieldID;
  /// Thumbnail height.
  int32 height_;
  static jfieldID height_fieldID;
  /// The thumbnail.
  object_ptr<file> file_;
  static jfieldID file_fieldID;

  /**
   * Represents a thumbnail.
   */
  thumbnail();

  /**
   * Represents a thumbnail.
   *
   * \param[in] format_ Thumbnail format.
   * \param[in] width_ Thumbnail width.
   * \param[in] height_ Thumbnail height.
   * \param[in] file_ The thumbnail.
   */
  thumbnail(object_ptr<ThumbnailFormat> &&format_, int32 width_, int32 height_, object_ptr<file> &&file_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1243275371;

  static object_ptr<thumbnail> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes format of a thumbnail.
 */
class ThumbnailFormat: public Object {
 public:
  static jclass Class;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in JPEG format.
 */
class thumbnailFormatJpeg final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in JPEG format.
   */
  thumbnailFormatJpeg();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -653503352;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in static GIF format. It will be used only for some bot inline query results.
 */
class thumbnailFormatGif final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in static GIF format. It will be used only for some bot inline query results.
   */
  thumbnailFormatGif();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1252205962;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in MPEG4 format. It will be used only for some animations and videos.
 */
class thumbnailFormatMpeg4 final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in MPEG4 format. It will be used only for some animations and videos.
   */
  thumbnailFormatMpeg4();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 278616062;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in PNG format. It will be used only for background patterns.
 */
class thumbnailFormatPng final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in PNG format. It will be used only for background patterns.
   */
  thumbnailFormatPng();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1577490421;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in TGS format. It will be used only for sticker sets.
 */
class thumbnailFormatTgs final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in TGS format. It will be used only for sticker sets.
   */
  thumbnailFormatTgs();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1315522642;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in WEBM format. It will be used only for sticker sets.
 */
class thumbnailFormatWebm final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in WEBM format. It will be used only for sticker sets.
   */
  thumbnailFormatWebm();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -660084953;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The thumbnail is in WEBP format. It will be used only for some stickers and sticker sets.
 */
class thumbnailFormatWebp final : public ThumbnailFormat {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The thumbnail is in WEBP format. It will be used only for some stickers and sticker sets.
   */
  thumbnailFormatWebp();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -53588974;

  static object_ptr<ThumbnailFormat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes a time zone.
 */
class timeZone final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique time zone identifier.
  string id_;
  static jfieldID id_fieldID;
  /// Time zone name.
  string name_;
  static jfieldID name_fieldID;
  /// Current UTC time offset for the time zone.
  int32 utc_time_offset_;
  static jfieldID utc_time_offset_fieldID;

  /**
   * Describes a time zone.
   */
  timeZone();

  /**
   * Describes a time zone.
   *
   * \param[in] id_ Unique time zone identifier.
   * \param[in] name_ Time zone name.
   * \param[in] utc_time_offset_ Current UTC time offset for the time zone.
   */
  timeZone(string const &id_, string const &name_, int32 utc_time_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1189481763;

  static object_ptr<timeZone> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class timeZone;

/**
 * Contains a list of time zones.
 */
class timeZones final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of time zones.
  array<object_ptr<timeZone>> time_zones_;
  static jfieldID time_zones_fieldID;

  /**
   * Contains a list of time zones.
   */
  timeZones();

  /**
   * Contains a list of time zones.
   *
   * \param[in] time_zones_ A list of time zones.
   */
  explicit timeZones(array<object_ptr<timeZone>> &&time_zones_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -334655570;

  static object_ptr<timeZones> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

class tonRevenueStatus;

/**
 * A detailed statistics about Toncoins earned by the current user.
 */
class tonRevenueStatistics final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A graph containing amount of revenue in a given day.
  object_ptr<StatisticalGraph> revenue_by_day_graph_;
  static jfieldID revenue_by_day_graph_fieldID;
  /// Amount of earned revenue.
  object_ptr<tonRevenueStatus> status_;
  static jfieldID status_fieldID;
  /// Current conversion rate of nanotoncoin to USD cents.
  double usd_rate_;
  static jfieldID usd_rate_fieldID;

  /**
   * A detailed statistics about Toncoins earned by the current user.
   */
  tonRevenueStatistics();

  /**
   * A detailed statistics about Toncoins earned by the current user.
   *
   * \param[in] revenue_by_day_graph_ A graph containing amount of revenue in a given day.
   * \param[in] status_ Amount of earned revenue.
   * \param[in] usd_rate_ Current conversion rate of nanotoncoin to USD cents.
   */
  tonRevenueStatistics(object_ptr<StatisticalGraph> &&revenue_by_day_graph_, object_ptr<tonRevenueStatus> &&status_, double usd_rate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 565933594;

  static object_ptr<tonRevenueStatistics> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about Toncoins earned by the current user.
 */
class tonRevenueStatus final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total Toncoin amount earned; in the smallest units of the cryptocurrency.
  int64 total_amount_;
  static jfieldID total_amount_fieldID;
  /// The Toncoin amount that isn't withdrawn yet; in the smallest units of the cryptocurrency.
  int64 balance_amount_;
  static jfieldID balance_amount_fieldID;
  /// The Toncoin amount that is available for withdrawal; in the smallest units of the cryptocurrency.
  int64 available_amount_;
  static jfieldID available_amount_fieldID;
  /// True, if Toncoins can be withdrawn.
  bool withdrawal_enabled_;
  static jfieldID withdrawal_enabled_fieldID;

  /**
   * Contains information about Toncoins earned by the current user.
   */
  tonRevenueStatus();

  /**
   * Contains information about Toncoins earned by the current user.
   *
   * \param[in] total_amount_ Total Toncoin amount earned; in the smallest units of the cryptocurrency.
   * \param[in] balance_amount_ The Toncoin amount that isn't withdrawn yet; in the smallest units of the cryptocurrency.
   * \param[in] available_amount_ The Toncoin amount that is available for withdrawal; in the smallest units of the cryptocurrency.
   * \param[in] withdrawal_enabled_ True, if Toncoins can be withdrawn.
   */
  tonRevenueStatus(int64 total_amount_, int64 balance_amount_, int64 available_amount_, bool withdrawal_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1437514030;

  static object_ptr<tonRevenueStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class TonTransactionType;

/**
 * Represents a transaction changing the amount of owned Toncoins.
 */
class tonTransaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the transaction.
  string id_;
  static jfieldID id_fieldID;
  /// The amount of added owned Toncoins; negative for outgoing transactions.
  int53 ton_amount_;
  static jfieldID ton_amount_fieldID;
  /// True, if the transaction is a refund of a previous transaction.
  bool is_refund_;
  static jfieldID is_refund_fieldID;
  /// Point in time (Unix timestamp) when the transaction was completed.
  int32 date_;
  static jfieldID date_fieldID;
  /// Type of the transaction.
  object_ptr<TonTransactionType> type_;
  static jfieldID type_fieldID;

  /**
   * Represents a transaction changing the amount of owned Toncoins.
   */
  tonTransaction();

  /**
   * Represents a transaction changing the amount of owned Toncoins.
   *
   * \param[in] id_ Unique identifier of the transaction.
   * \param[in] ton_amount_ The amount of added owned Toncoins; negative for outgoing transactions.
   * \param[in] is_refund_ True, if the transaction is a refund of a previous transaction.
   * \param[in] date_ Point in time (Unix timestamp) when the transaction was completed.
   * \param[in] type_ Type of the transaction.
   */
  tonTransaction(string const &id_, int53 ton_amount_, bool is_refund_, int32 date_, object_ptr<TonTransactionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1562036527;

  static object_ptr<tonTransaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class RevenueWithdrawalState;

class sticker;

class upgradedGift;

/**
 * This class is an abstract base class.
 * Describes type of transaction with Toncoins.
 */
class TonTransactionType: public Object {
 public:
  static jclass Class;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a deposit of Toncoins from Fragment.
 */
class tonTransactionTypeFragmentDeposit final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the transaction is a gift from another user.
  bool is_gift_;
  static jfieldID is_gift_fieldID;
  /// The sticker to be shown in the transaction information; may be null if unknown.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * The transaction is a deposit of Toncoins from Fragment.
   */
  tonTransactionTypeFragmentDeposit();

  /**
   * The transaction is a deposit of Toncoins from Fragment.
   *
   * \param[in] is_gift_ True, if the transaction is a gift from another user.
   * \param[in] sticker_ The sticker to be shown in the transaction information; may be null if unknown.
   */
  tonTransactionTypeFragmentDeposit(bool is_gift_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1395530668;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a withdrawal of earned Toncoins to Fragment.
 */
class tonTransactionTypeFragmentWithdrawal final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// State of the withdrawal; may be null for refunds from Fragment.
  object_ptr<RevenueWithdrawalState> withdrawal_state_;
  static jfieldID withdrawal_state_fieldID;

  /**
   * The transaction is a withdrawal of earned Toncoins to Fragment.
   */
  tonTransactionTypeFragmentWithdrawal();

  /**
   * The transaction is a withdrawal of earned Toncoins to Fragment.
   *
   * \param[in] withdrawal_state_ State of the withdrawal; may be null for refunds from Fragment.
   */
  explicit tonTransactionTypeFragmentWithdrawal(object_ptr<RevenueWithdrawalState> &&withdrawal_state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1410960428;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a payment for a suggested post.
 */
class tonTransactionTypeSuggestedPostPayment final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat that posted the post.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * The transaction is a payment for a suggested post.
   */
  tonTransactionTypeSuggestedPostPayment();

  /**
   * The transaction is a payment for a suggested post.
   *
   * \param[in] chat_id_ Identifier of the channel chat that posted the post.
   */
  explicit tonTransactionTypeSuggestedPostPayment(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -396472561;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is an offer of gift purchase.
 */
class tonTransactionTypeGiftPurchaseOffer final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is an offer of gift purchase.
   */
  tonTransactionTypeGiftPurchaseOffer();

  /**
   * The transaction is an offer of gift purchase.
   *
   * \param[in] gift_ The gift.
   */
  explicit tonTransactionTypeGiftPurchaseOffer(object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1754409273;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a purchase of an upgraded gift for some user or channel.
 */
class tonTransactionTypeUpgradedGiftPurchase final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who sold the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;

  /**
   * The transaction is a purchase of an upgraded gift for some user or channel.
   */
  tonTransactionTypeUpgradedGiftPurchase();

  /**
   * The transaction is a purchase of an upgraded gift for some user or channel.
   *
   * \param[in] user_id_ Identifier of the user who sold the gift.
   * \param[in] gift_ The gift.
   */
  tonTransactionTypeUpgradedGiftPurchase(int53 user_id_, object_ptr<upgradedGift> &&gift_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2007364707;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a sale of an upgraded gift.
 */
class tonTransactionTypeUpgradedGiftSale final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who bought the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// The number of Toncoins received by the Telegram for each 1000 Toncoins received by the seller of the gift.
  int32 commission_per_mille_;
  static jfieldID commission_per_mille_fieldID;
  /// The Toncoin amount that was received by the Telegram; in the smallest units of the currency.
  int53 commission_toncoin_amount_;
  static jfieldID commission_toncoin_amount_fieldID;
  /// True, if the gift was sold through a purchase offer.
  bool via_offer_;
  static jfieldID via_offer_fieldID;

  /**
   * The transaction is a sale of an upgraded gift.
   */
  tonTransactionTypeUpgradedGiftSale();

  /**
   * The transaction is a sale of an upgraded gift.
   *
   * \param[in] user_id_ Identifier of the user who bought the gift.
   * \param[in] gift_ The gift.
   * \param[in] commission_per_mille_ The number of Toncoins received by the Telegram for each 1000 Toncoins received by the seller of the gift.
   * \param[in] commission_toncoin_amount_ The Toncoin amount that was received by the Telegram; in the smallest units of the currency.
   * \param[in] via_offer_ True, if the gift was sold through a purchase offer.
   */
  tonTransactionTypeUpgradedGiftSale(int53 user_id_, object_ptr<upgradedGift> &&gift_, int32 commission_per_mille_, int53 commission_toncoin_amount_, bool via_offer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1162099275;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a payment for stake dice throw.
 */
class tonTransactionTypeStakeDiceStake final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a payment for stake dice throw.
   */
  tonTransactionTypeStakeDiceStake();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1789542822;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a payment for successful stake dice throw.
 */
class tonTransactionTypeStakeDicePayout final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a payment for successful stake dice throw.
   */
  tonTransactionTypeStakeDicePayout();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -25462760;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is a transaction of an unsupported type.
 */
class tonTransactionTypeUnsupported final : public TonTransactionType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is a transaction of an unsupported type.
   */
  tonTransactionTypeUnsupported();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1747387269;

  static object_ptr<TonTransactionType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class tonTransaction;

/**
 * Represents a list of Toncoin transactions.
 */
class tonTransactions final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The total amount of owned Toncoins.
  int53 ton_amount_;
  static jfieldID ton_amount_fieldID;
  /// List of Toncoin transactions.
  array<object_ptr<tonTransaction>> transactions_;
  static jfieldID transactions_fieldID;
  /// The offset for the next request. If empty, then there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Represents a list of Toncoin transactions.
   */
  tonTransactions();

  /**
   * Represents a list of Toncoin transactions.
   *
   * \param[in] ton_amount_ The total amount of owned Toncoins.
   * \param[in] transactions_ List of Toncoin transactions.
   * \param[in] next_offset_ The offset for the next request. If empty, then there are no more results.
   */
  tonTransactions(int53 ton_amount_, array<object_ptr<tonTransaction>> &&transactions_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1317235021;

  static object_ptr<tonTransactions> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the categories of chats for which a list of frequently used chats can be retrieved.
 */
class TopChatCategory: public Object {
 public:
  static jclass Class;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used private chats with non-bot users.
 */
class topChatCategoryUsers final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used private chats with non-bot users.
   */
  topChatCategoryUsers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1026706816;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used private chats with bot users.
 */
class topChatCategoryBots final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used private chats with bot users.
   */
  topChatCategoryBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1577129195;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used basic groups and supergroups.
 */
class topChatCategoryGroups final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used basic groups and supergroups.
   */
  topChatCategoryGroups();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1530056846;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used channels.
 */
class topChatCategoryChannels final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used channels.
   */
  topChatCategoryChannels();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -500825885;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used chats with inline bots sorted by their usage in inline mode.
 */
class topChatCategoryInlineBots final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used chats with inline bots sorted by their usage in inline mode.
   */
  topChatCategoryInlineBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 377023356;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used chats with bots, which were used as guest bots.
 */
class topChatCategoryGuestBots final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used chats with bots, which were used as guest bots.
   */
  topChatCategoryGuestBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1792882579;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used chats with bots, which Web Apps were opened.
 */
class topChatCategoryWebAppBots final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used chats with bots, which Web Apps were opened.
   */
  topChatCategoryWebAppBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 100062973;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used chats used for calls.
 */
class topChatCategoryCalls final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used chats used for calls.
   */
  topChatCategoryCalls();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 356208861;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A category containing frequently used chats used to forward messages.
 */
class topChatCategoryForwardChats final : public TopChatCategory {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A category containing frequently used chats used to forward messages.
   */
  topChatCategoryForwardChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1695922133;

  static object_ptr<TopChatCategory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes direction of transactions in a transaction list.
 */
class TransactionDirection: public Object {
 public:
  static jclass Class;

  static object_ptr<TransactionDirection> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is incoming and increases the amount of owned currency.
 */
class transactionDirectionIncoming final : public TransactionDirection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is incoming and increases the amount of owned currency.
   */
  transactionDirectionIncoming();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -271074103;

  static object_ptr<TransactionDirection> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The transaction is outgoing and decreases the amount of owned currency.
 */
class transactionDirectionOutgoing final : public TransactionDirection {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The transaction is outgoing and decreases the amount of owned currency.
   */
  transactionDirectionOutgoing();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1638241254;

  static object_ptr<TransactionDirection> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class stickerSetInfo;

/**
 * Represents a list of trending sticker sets.
 */
class trendingStickerSets final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of trending sticker sets.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of trending sticker sets.
  array<object_ptr<stickerSetInfo>> sets_;
  static jfieldID sets_fieldID;
  /// True, if the list contains sticker sets with premium stickers.
  bool is_premium_;
  static jfieldID is_premium_fieldID;

  /**
   * Represents a list of trending sticker sets.
   */
  trendingStickerSets();

  /**
   * Represents a list of trending sticker sets.
   *
   * \param[in] total_count_ Approximate total number of trending sticker sets.
   * \param[in] sets_ List of trending sticker sets.
   * \param[in] is_premium_ True, if the list contains sticker sets with premium stickers.
   */
  trendingStickerSets(int32 total_count_, array<object_ptr<stickerSetInfo>> &&sets_, bool is_premium_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 41028940;

  static object_ptr<trendingStickerSets> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about an unconfirmed session.
 */
class unconfirmedSession final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Session identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Point in time (Unix timestamp) when the user has logged in.
  int32 log_in_date_;
  static jfieldID log_in_date_fieldID;
  /// Model of the device that was used for the session creation, as provided by the application.
  string device_model_;
  static jfieldID device_model_fieldID;
  /// A human-readable description of the location from which the session was created, based on the IP address.
  string location_;
  static jfieldID location_fieldID;

  /**
   * Contains information about an unconfirmed session.
   */
  unconfirmedSession();

  /**
   * Contains information about an unconfirmed session.
   *
   * \param[in] id_ Session identifier.
   * \param[in] log_in_date_ Point in time (Unix timestamp) when the user has logged in.
   * \param[in] device_model_ Model of the device that was used for the session creation, as provided by the application.
   * \param[in] location_ A human-readable description of the location from which the session was created, based on the IP address.
   */
  unconfirmedSession(int64 id_, int32 log_in_date_, string const &device_model_, string const &location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2062726663;

  static object_ptr<unconfirmedSession> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ReactionType;

/**
 * Contains information about an unread reaction to a message.
 */
class unreadReaction final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the reaction.
  object_ptr<ReactionType> type_;
  static jfieldID type_fieldID;
  /// Identifier of the sender, added the reaction.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// True, if the reaction was added with a big animation.
  bool is_big_;
  static jfieldID is_big_fieldID;

  /**
   * Contains information about an unread reaction to a message.
   */
  unreadReaction();

  /**
   * Contains information about an unread reaction to a message.
   *
   * \param[in] type_ Type of the reaction.
   * \param[in] sender_id_ Identifier of the sender, added the reaction.
   * \param[in] is_big_ True, if the reaction was added with a big animation.
   */
  unreadReaction(object_ptr<ReactionType> &&type_, object_ptr<MessageSender> &&sender_id_, bool is_big_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1940178046;

  static object_ptr<unreadReaction> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class AuthorizationState;

class AutosaveSettingsScope;

class BlockList;

class CallbackQueryPayload;

class CanPostStoryResult;

class ChatAction;

class ChatActionBar;

class ChatAvailableReactions;

class ChatList;

class ChatTheme;

class ChatType;

class ConnectionState;

class MessageContent;

class MessageSender;

class MessageTopic;

class NotificationGroupType;

class NotificationSettingsScope;

class OptionValue;

class PaidReactionType;

class ReactionType;

class ReplyMarkup;

class StickerType;

class StoryList;

class SuggestedAction;

class UserPrivacySetting;

class UserStatus;

class accentColor;

class address;

class ageVerificationParameters;

class attachmentMenuBot;

class background;

class basicGroup;

class basicGroupFullInfo;

class businessBotManageBar;

class businessConnection;

class businessMessage;

class call;

class chat;

class chatActiveStories;

class chatBackground;

class chatBoost;

class chatFolderInfo;

class chatInviteLink;

class chatJoinRequest;

class chatJoinRequestsInfo;

class chatMember;

class chatNotificationSettings;

class chatPermissions;

class chatPhotoInfo;

class chatPosition;

class chatRevenueAmount;

class closeBirthdayUser;

class directMessagesChatTopic;

class downloadedFileCounts;

class draftMessage;

class emojiChatTheme;

class emojiStatus;

class error;

class factCheck;

class file;

class fileDownload;

class formattedText;

class forumTopicInfo;

class giftAuctionState;

class groupCall;

class groupCallMessage;

class groupCallMessageLevel;

class groupCallParticipant;

class languagePackString;

class liveStoryDonors;

class location;

class message;

class messageInteractionInfo;

class messageReaction;

class notification;

class notificationGroup;

class orderInfo;

class poll;

class profileAccentColor;

class quickReplyMessage;

class quickReplyShortcut;

class reactionNotificationSettings;

class savedMessagesTags;

class savedMessagesTopic;

class scopeAutosaveSettings;

class scopeNotificationSettings;

class secretChat;

class stakeDiceState;

class starAmount;

class starRevenueStatus;

class sticker;

class stickerSet;

class story;

class suggestedPostInfo;

class supergroup;

class supergroupFullInfo;

class termsOfService;

class textCompositionStyle;

class tonRevenueStatus;

class trendingStickerSets;

class unconfirmedSession;

class unreadReaction;

class upgradedGiftColors;

class user;

class userFullInfo;

class userPrivacySettingRules;

class videoChat;

/**
 * This class is an abstract base class.
 * Contains notifications about data changes.
 */
class Update: public Object {
 public:
  static jclass Class;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user authorization state has changed.
 */
class updateAuthorizationState final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New authorization state.
  object_ptr<AuthorizationState> authorization_state_;
  static jfieldID authorization_state_fieldID;

  /**
   * The user authorization state has changed.
   */
  updateAuthorizationState();

  /**
   * The user authorization state has changed.
   *
   * \param[in] authorization_state_ New authorization state.
   */
  explicit updateAuthorizationState(object_ptr<AuthorizationState> &&authorization_state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1622347490;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new message was received; can also be an outgoing message.
 */
class updateNewMessage final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;

  /**
   * A new message was received; can also be an outgoing message.
   */
  updateNewMessage();

  /**
   * A new message was received; can also be an outgoing message.
   *
   * \param[in] message_ The new message.
   */
  explicit updateNewMessage(object_ptr<message> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -563105266;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully. This update is sent only if the option &quot;use_quick_ack&quot; is set to true. This update may be sent multiple times for the same message.
 */
class updateMessageSendAcknowledged final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat identifier of the sent message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// A temporary message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully. This update is sent only if the option &quot;use_quick_ack&quot; is set to true. This update may be sent multiple times for the same message.
   */
  updateMessageSendAcknowledged();

  /**
   * A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully. This update is sent only if the option &quot;use_quick_ack&quot; is set to true. This update may be sent multiple times for the same message.
   *
   * \param[in] chat_id_ The chat identifier of the sent message.
   * \param[in] message_id_ A temporary message identifier.
   */
  updateMessageSendAcknowledged(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1302843961;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message has been successfully sent.
 */
class updateMessageSendSucceeded final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The sent message. Almost any field of the new message can be different from the corresponding field of the original message. For example, the field scheduling_state may change, making the message scheduled, or non-scheduled.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// The previous temporary message identifier.
  int53 old_message_id_;
  static jfieldID old_message_id_fieldID;

  /**
   * A message has been successfully sent.
   */
  updateMessageSendSucceeded();

  /**
   * A message has been successfully sent.
   *
   * \param[in] message_ The sent message. Almost any field of the new message can be different from the corresponding field of the original message. For example, the field scheduling_state may change, making the message scheduled, or non-scheduled.
   * \param[in] old_message_id_ The previous temporary message identifier.
   */
  updateMessageSendSucceeded(object_ptr<message> &&message_, int53 old_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1815715197;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update.
 */
class updateMessageSendFailed final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The failed to send message.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// The previous temporary message identifier.
  int53 old_message_id_;
  static jfieldID old_message_id_fieldID;
  /// The cause of the message sending failure.
  object_ptr<error> error_;
  static jfieldID error_fieldID;

  /**
   * A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update.
   */
  updateMessageSendFailed();

  /**
   * A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update.
   *
   * \param[in] message_ The failed to send message.
   * \param[in] old_message_id_ The previous temporary message identifier.
   * \param[in] error_ The cause of the message sending failure.
   */
  updateMessageSendFailed(object_ptr<message> &&message_, int53 old_message_id_, object_ptr<error> &&error_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -635701017;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message content has changed.
 */
class updateMessageContent final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// New message content.
  object_ptr<MessageContent> new_content_;
  static jfieldID new_content_fieldID;

  /**
   * The message content has changed.
   */
  updateMessageContent();

  /**
   * The message content has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] new_content_ New message content.
   */
  updateMessageContent(int53 chat_id_, int53 message_id_, object_ptr<MessageContent> &&new_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 506903332;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message was edited. Changes in the message content will come in a separate updateMessageContent.
 */
class updateMessageEdited final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Point in time (Unix timestamp) when the message was edited.
  int32 edit_date_;
  static jfieldID edit_date_fieldID;
  /// New message reply markup; may be null.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * A message was edited. Changes in the message content will come in a separate updateMessageContent.
   */
  updateMessageEdited();

  /**
   * A message was edited. Changes in the message content will come in a separate updateMessageContent.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] edit_date_ Point in time (Unix timestamp) when the message was edited.
   * \param[in] reply_markup_ New message reply markup; may be null.
   */
  updateMessageEdited(int53 chat_id_, int53 message_id_, int32 edit_date_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -559545626;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message pinned state was changed.
 */
class updateMessageIsPinned final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// True, if the message is pinned.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * The message pinned state was changed.
   */
  updateMessageIsPinned();

  /**
   * The message pinned state was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ The message identifier.
   * \param[in] is_pinned_ True, if the message is pinned.
   */
  updateMessageIsPinned(int53 chat_id_, int53 message_id_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1102848829;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The information about interactions with a message has changed.
 */
class updateMessageInteractionInfo final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// New information about interactions with the message; may be null.
  object_ptr<messageInteractionInfo> interaction_info_;
  static jfieldID interaction_info_fieldID;

  /**
   * The information about interactions with a message has changed.
   */
  updateMessageInteractionInfo();

  /**
   * The information about interactions with a message has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] interaction_info_ New information about interactions with the message; may be null.
   */
  updateMessageInteractionInfo(int53 chat_id_, int53 message_id_, object_ptr<messageInteractionInfo> &&interaction_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1417659394;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message content was opened. Updates voice note messages to &quot;listened&quot;, video note messages to &quot;viewed&quot; and starts the self-destruct timer.
 */
class updateMessageContentOpened final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * The message content was opened. Updates voice note messages to &quot;listened&quot;, video note messages to &quot;viewed&quot; and starts the self-destruct timer.
   */
  updateMessageContentOpened();

  /**
   * The message content was opened. Updates voice note messages to &quot;listened&quot;, video note messages to &quot;viewed&quot; and starts the self-destruct timer.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   */
  updateMessageContentOpened(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1520523131;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with an unread mention was read.
 */
class updateMessageMentionRead final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new number of unread mention messages left in the chat.
  int32 unread_mention_count_;
  static jfieldID unread_mention_count_fieldID;

  /**
   * A message with an unread mention was read.
   */
  updateMessageMentionRead();

  /**
   * A message with an unread mention was read.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] unread_mention_count_ The new number of unread mention messages left in the chat.
   */
  updateMessageMentionRead(int53 chat_id_, int53 message_id_, int32 unread_mention_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -252228282;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of unread reactions added to a message was changed.
 */
class updateMessageUnreadReactions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new list of unread reactions.
  array<object_ptr<unreadReaction>> unread_reactions_;
  static jfieldID unread_reactions_fieldID;
  /// The new number of messages with unread reactions in the chat.
  int32 unread_reaction_count_;
  static jfieldID unread_reaction_count_fieldID;

  /**
   * The list of unread reactions added to a message was changed.
   */
  updateMessageUnreadReactions();

  /**
   * The list of unread reactions added to a message was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] unread_reactions_ The new list of unread reactions.
   * \param[in] unread_reaction_count_ The new number of messages with unread reactions in the chat.
   */
  updateMessageUnreadReactions(int53 chat_id_, int53 message_id_, array<object_ptr<unreadReaction>> &&unread_reactions_, int32 unread_reaction_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 942840008;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Unread votes were added or removed from a poll message.
 */
class updateMessageContainsUnreadPollVotes final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// True, if the message is a poll message with unread votes.
  bool contains_unread_poll_votes_;
  static jfieldID contains_unread_poll_votes_fieldID;
  /// The new number of messages with unread poll votes in the chat.
  int32 unread_poll_vote_count_;
  static jfieldID unread_poll_vote_count_fieldID;

  /**
   * Unread votes were added or removed from a poll message.
   */
  updateMessageContainsUnreadPollVotes();

  /**
   * Unread votes were added or removed from a poll message.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] contains_unread_poll_votes_ True, if the message is a poll message with unread votes.
   * \param[in] unread_poll_vote_count_ The new number of messages with unread poll votes in the chat.
   */
  updateMessageContainsUnreadPollVotes(int53 chat_id_, int53 message_id_, bool contains_unread_poll_votes_, int32 unread_poll_vote_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1708270285;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A fact-check added to a message was changed.
 */
class updateMessageFactCheck final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new fact-check.
  object_ptr<factCheck> fact_check_;
  static jfieldID fact_check_fieldID;

  /**
   * A fact-check added to a message was changed.
   */
  updateMessageFactCheck();

  /**
   * A fact-check added to a message was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] fact_check_ The new fact-check.
   */
  updateMessageFactCheck(int53 chat_id_, int53 message_id_, object_ptr<factCheck> &&fact_check_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1014561538;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about suggested post of a message was changed.
 */
class updateMessageSuggestedPostInfo final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new information about the suggested post.
  object_ptr<suggestedPostInfo> suggested_post_info_;
  static jfieldID suggested_post_info_fieldID;

  /**
   * Information about suggested post of a message was changed.
   */
  updateMessageSuggestedPostInfo();

  /**
   * Information about suggested post of a message was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] suggested_post_info_ The new information about the suggested post.
   */
  updateMessageSuggestedPostInfo(int53 chat_id_, int53 message_id_, object_ptr<suggestedPostInfo> &&suggested_post_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 194418186;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message with a live location was viewed. When the update is received, the application is expected to update the live location.
 */
class updateMessageLiveLocationViewed final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the live location message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with live location.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * A message with a live location was viewed. When the update is received, the application is expected to update the live location.
   */
  updateMessageLiveLocationViewed();

  /**
   * A message with a live location was viewed. When the update is received, the application is expected to update the live location.
   *
   * \param[in] chat_id_ Identifier of the chat with the live location message.
   * \param[in] message_id_ Identifier of the message with live location.
   */
  updateMessageLiveLocationViewed(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1308260971;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An automatically scheduled message with video has been successfully sent after conversion.
 */
class updateVideoPublished final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the sent message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * An automatically scheduled message with video has been successfully sent after conversion.
   */
  updateVideoPublished();

  /**
   * An automatically scheduled message with video has been successfully sent after conversion.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the sent message.
   */
  updateVideoPublished(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -352575406;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates.
 */
class updateNewChat final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat.
  object_ptr<chat> chat_;
  static jfieldID chat_fieldID;

  /**
   * A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates.
   */
  updateNewChat();

  /**
   * A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates.
   *
   * \param[in] chat_ The chat.
   */
  explicit updateNewChat(object_ptr<chat> &&chat_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2075757773;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The title of a chat was changed.
 */
class updateChatTitle final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new chat title.
  string title_;
  static jfieldID title_fieldID;

  /**
   * The title of a chat was changed.
   */
  updateChatTitle();

  /**
   * The title of a chat was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] title_ The new chat title.
   */
  updateChatTitle(int53 chat_id_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -175405660;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat photo was changed.
 */
class updateChatPhoto final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new chat photo; may be null.
  object_ptr<chatPhotoInfo> photo_;
  static jfieldID photo_fieldID;

  /**
   * A chat photo was changed.
   */
  updateChatPhoto();

  /**
   * A chat photo was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] photo_ The new chat photo; may be null.
   */
  updateChatPhoto(int53 chat_id_, object_ptr<chatPhotoInfo> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -324713921;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Chat accent colors have changed.
 */
class updateChatAccentColors final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new chat accent color identifier.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// The new identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
  int64 background_custom_emoji_id_;
  static jfieldID background_custom_emoji_id_fieldID;
  /// Color scheme based on an upgraded gift to be used for the chat instead of accent_color_id and background_custom_emoji_id; may be null if none.
  object_ptr<upgradedGiftColors> upgraded_gift_colors_;
  static jfieldID upgraded_gift_colors_fieldID;
  /// The new chat profile accent color identifier; -1 if none.
  int32 profile_accent_color_id_;
  static jfieldID profile_accent_color_id_fieldID;
  /// The new identifier of a custom emoji to be shown on the profile background; 0 if none.
  int64 profile_background_custom_emoji_id_;
  static jfieldID profile_background_custom_emoji_id_fieldID;

  /**
   * Chat accent colors have changed.
   */
  updateChatAccentColors();

  /**
   * Chat accent colors have changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] accent_color_id_ The new chat accent color identifier.
   * \param[in] background_custom_emoji_id_ The new identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
   * \param[in] upgraded_gift_colors_ Color scheme based on an upgraded gift to be used for the chat instead of accent_color_id and background_custom_emoji_id; may be null if none.
   * \param[in] profile_accent_color_id_ The new chat profile accent color identifier; -1 if none.
   * \param[in] profile_background_custom_emoji_id_ The new identifier of a custom emoji to be shown on the profile background; 0 if none.
   */
  updateChatAccentColors(int53 chat_id_, int32 accent_color_id_, int64 background_custom_emoji_id_, object_ptr<upgradedGiftColors> &&upgraded_gift_colors_, int32 profile_accent_color_id_, int64 profile_background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 874004198;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Chat permissions were changed.
 */
class updateChatPermissions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new chat permissions.
  object_ptr<chatPermissions> permissions_;
  static jfieldID permissions_fieldID;

  /**
   * Chat permissions were changed.
   */
  updateChatPermissions();

  /**
   * Chat permissions were changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] permissions_ The new chat permissions.
   */
  updateChatPermissions(int53 chat_id_, object_ptr<chatPermissions> &&permissions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1622010003;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The last message of a chat was changed.
 */
class updateChatLastMessage final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new last message in the chat; may be null if the last message became unknown. While the last message is unknown, new messages can be added to the chat without corresponding updateNewMessage update.
  object_ptr<message> last_message_;
  static jfieldID last_message_fieldID;
  /// The new chat positions in the chat lists.
  array<object_ptr<chatPosition>> positions_;
  static jfieldID positions_fieldID;

  /**
   * The last message of a chat was changed.
   */
  updateChatLastMessage();

  /**
   * The last message of a chat was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] last_message_ The new last message in the chat; may be null if the last message became unknown. While the last message is unknown, new messages can be added to the chat without corresponding updateNewMessage update.
   * \param[in] positions_ The new chat positions in the chat lists.
   */
  updateChatLastMessage(int53 chat_id_, object_ptr<message> &&last_message_, array<object_ptr<chatPosition>> &&positions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -923244537;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update.
 */
class updateChatPosition final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New chat position. If new order is 0, then the chat needs to be removed from the list.
  object_ptr<chatPosition> position_;
  static jfieldID position_fieldID;

  /**
   * The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update.
   */
  updateChatPosition();

  /**
   * The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] position_ New chat position. If new order is 0, then the chat needs to be removed from the list.
   */
  updateChatPosition(int53 chat_id_, object_ptr<chatPosition> &&position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -8979849;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat was added to a chat list.
 */
class updateChatAddedToList final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The chat list to which the chat was added.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;

  /**
   * A chat was added to a chat list.
   */
  updateChatAddedToList();

  /**
   * A chat was added to a chat list.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] chat_list_ The chat list to which the chat was added.
   */
  updateChatAddedToList(int53 chat_id_, object_ptr<ChatList> &&chat_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1418722068;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat was removed from a chat list.
 */
class updateChatRemovedFromList final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The chat list from which the chat was removed.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;

  /**
   * A chat was removed from a chat list.
   */
  updateChatRemovedFromList();

  /**
   * A chat was removed from a chat list.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] chat_list_ The chat list from which the chat was removed.
   */
  updateChatRemovedFromList(int53 chat_id_, object_ptr<ChatList> &&chat_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1294647836;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Incoming messages were read or the number of unread messages has been changed.
 */
class updateChatReadInbox final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  static jfieldID last_read_inbox_message_id_fieldID;
  /// The number of unread messages left in the chat.
  int32 unread_count_;
  static jfieldID unread_count_fieldID;

  /**
   * Incoming messages were read or the number of unread messages has been changed.
   */
  updateChatReadInbox();

  /**
   * Incoming messages were read or the number of unread messages has been changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] last_read_inbox_message_id_ Identifier of the last read incoming message.
   * \param[in] unread_count_ The number of unread messages left in the chat.
   */
  updateChatReadInbox(int53 chat_id_, int53 last_read_inbox_message_id_, int32 unread_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -797952281;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Outgoing messages were read.
 */
class updateChatReadOutbox final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of last read outgoing message.
  int53 last_read_outbox_message_id_;
  static jfieldID last_read_outbox_message_id_fieldID;

  /**
   * Outgoing messages were read.
   */
  updateChatReadOutbox();

  /**
   * Outgoing messages were read.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] last_read_outbox_message_id_ Identifier of last read outgoing message.
   */
  updateChatReadOutbox(int53 chat_id_, int53 last_read_outbox_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 708334213;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat action bar was changed.
 */
class updateChatActionBar final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new value of the action bar; may be null.
  object_ptr<ChatActionBar> action_bar_;
  static jfieldID action_bar_fieldID;

  /**
   * The chat action bar was changed.
   */
  updateChatActionBar();

  /**
   * The chat action bar was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] action_bar_ The new value of the action bar; may be null.
   */
  updateChatActionBar(int53 chat_id_, object_ptr<ChatActionBar> &&action_bar_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -643671870;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The bar for managing business bot was changed in a chat.
 */
class updateChatBusinessBotManageBar final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new value of the business bot manage bar; may be null.
  object_ptr<businessBotManageBar> business_bot_manage_bar_;
  static jfieldID business_bot_manage_bar_fieldID;

  /**
   * The bar for managing business bot was changed in a chat.
   */
  updateChatBusinessBotManageBar();

  /**
   * The bar for managing business bot was changed in a chat.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] business_bot_manage_bar_ The new value of the business bot manage bar; may be null.
   */
  updateChatBusinessBotManageBar(int53 chat_id_, object_ptr<businessBotManageBar> &&business_bot_manage_bar_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1104091145;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat available reactions were changed.
 */
class updateChatAvailableReactions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new reactions, available in the chat.
  object_ptr<ChatAvailableReactions> available_reactions_;
  static jfieldID available_reactions_fieldID;

  /**
   * The chat available reactions were changed.
   */
  updateChatAvailableReactions();

  /**
   * The chat available reactions were changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] available_reactions_ The new reactions, available in the chat.
   */
  updateChatAvailableReactions(int53 chat_id_, object_ptr<ChatAvailableReactions> &&available_reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1967909895;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied.
 */
class updateChatDraftMessage final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new draft message; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;
  /// The new chat positions in the chat lists.
  array<object_ptr<chatPosition>> positions_;
  static jfieldID positions_fieldID;

  /**
   * A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied.
   */
  updateChatDraftMessage();

  /**
   * A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] draft_message_ The new draft message; may be null if none.
   * \param[in] positions_ The new chat positions in the chat lists.
   */
  updateChatDraftMessage(int53 chat_id_, object_ptr<draftMessage> &&draft_message_, array<object_ptr<chatPosition>> &&positions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1455190380;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Chat emoji status has changed.
 */
class updateChatEmojiStatus final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new chat emoji status; may be null.
  object_ptr<emojiStatus> emoji_status_;
  static jfieldID emoji_status_fieldID;

  /**
   * Chat emoji status has changed.
   */
  updateChatEmojiStatus();

  /**
   * Chat emoji status has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] emoji_status_ The new chat emoji status; may be null.
   */
  updateChatEmojiStatus(int53 chat_id_, object_ptr<emojiStatus> &&emoji_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2004444432;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message sender that is selected to send messages in a chat has changed.
 */
class updateChatMessageSender final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of message_sender_id; may be null if the user can't change message sender.
  object_ptr<MessageSender> message_sender_id_;
  static jfieldID message_sender_id_fieldID;

  /**
   * The message sender that is selected to send messages in a chat has changed.
   */
  updateChatMessageSender();

  /**
   * The message sender that is selected to send messages in a chat has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_sender_id_ New value of message_sender_id; may be null if the user can't change message sender.
   */
  updateChatMessageSender(int53 chat_id_, object_ptr<MessageSender> &&message_sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2003849793;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The message auto-delete or self-destruct timer setting for a chat was changed.
 */
class updateChatMessageAutoDeleteTime final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of message_auto_delete_time.
  int32 message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;

  /**
   * The message auto-delete or self-destruct timer setting for a chat was changed.
   */
  updateChatMessageAutoDeleteTime();

  /**
   * The message auto-delete or self-destruct timer setting for a chat was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_auto_delete_time_ New value of message_auto_delete_time.
   */
  updateChatMessageAutoDeleteTime(int53 chat_id_, int32 message_auto_delete_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1900174821;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notification settings for a chat were changed.
 */
class updateChatNotificationSettings final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new notification settings.
  object_ptr<chatNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Notification settings for a chat were changed.
   */
  updateChatNotificationSettings();

  /**
   * Notification settings for a chat were changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] notification_settings_ The new notification settings.
   */
  updateChatNotificationSettings(int53 chat_id_, object_ptr<chatNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -803163050;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat pending join requests were changed.
 */
class updateChatPendingJoinRequests final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new data about pending join requests; may be null.
  object_ptr<chatJoinRequestsInfo> pending_join_requests_;
  static jfieldID pending_join_requests_fieldID;

  /**
   * The chat pending join requests were changed.
   */
  updateChatPendingJoinRequests();

  /**
   * The chat pending join requests were changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] pending_join_requests_ The new data about pending join requests; may be null.
   */
  updateChatPendingJoinRequests(int53 chat_id_, object_ptr<chatJoinRequestsInfo> &&pending_join_requests_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 348578785;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat reply markup was changed.
 */
class updateChatReplyMarkup final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The message from which the reply markup must be used; may be null if there is no default reply markup in the chat.
  object_ptr<message> reply_markup_message_;
  static jfieldID reply_markup_message_fieldID;

  /**
   * The chat reply markup was changed.
   */
  updateChatReplyMarkup();

  /**
   * The chat reply markup was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] reply_markup_message_ The message from which the reply markup must be used; may be null if there is no default reply markup in the chat.
   */
  updateChatReplyMarkup(int53 chat_id_, object_ptr<message> &&reply_markup_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -714111887;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat background was changed.
 */
class updateChatBackground final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new chat background; may be null if background was reset to default.
  object_ptr<chatBackground> background_;
  static jfieldID background_fieldID;

  /**
   * The chat background was changed.
   */
  updateChatBackground();

  /**
   * The chat background was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] background_ The new chat background; may be null if background was reset to default.
   */
  updateChatBackground(int53 chat_id_, object_ptr<chatBackground> &&background_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -6473549;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat theme was changed.
 */
class updateChatTheme final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new theme of the chat; may be null if theme was reset to default.
  object_ptr<ChatTheme> theme_;
  static jfieldID theme_fieldID;

  /**
   * The chat theme was changed.
   */
  updateChatTheme();

  /**
   * The chat theme was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] theme_ The new theme of the chat; may be null if theme was reset to default.
   */
  updateChatTheme(int53 chat_id_, object_ptr<ChatTheme> &&theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1625214435;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat unread_mention_count has changed.
 */
class updateChatUnreadMentionCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The number of unread mention messages left in the chat.
  int32 unread_mention_count_;
  static jfieldID unread_mention_count_fieldID;

  /**
   * The chat unread_mention_count has changed.
   */
  updateChatUnreadMentionCount();

  /**
   * The chat unread_mention_count has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] unread_mention_count_ The number of unread mention messages left in the chat.
   */
  updateChatUnreadMentionCount(int53 chat_id_, int32 unread_mention_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2131461348;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat unread_reaction_count has changed.
 */
class updateChatUnreadReactionCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The number of messages with unread reactions left in the chat.
  int32 unread_reaction_count_;
  static jfieldID unread_reaction_count_fieldID;

  /**
   * The chat unread_reaction_count has changed.
   */
  updateChatUnreadReactionCount();

  /**
   * The chat unread_reaction_count has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] unread_reaction_count_ The number of messages with unread reactions left in the chat.
   */
  updateChatUnreadReactionCount(int53 chat_id_, int32 unread_reaction_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2124399395;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The chat unread_poll_vote_count has changed.
 */
class updateChatUnreadPollVoteCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The number of messages with unread poll votes left in the chat.
  int32 unread_poll_vote_count_;
  static jfieldID unread_poll_vote_count_fieldID;

  /**
   * The chat unread_poll_vote_count has changed.
   */
  updateChatUnreadPollVoteCount();

  /**
   * The chat unread_poll_vote_count has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] unread_poll_vote_count_ The number of messages with unread poll votes left in the chat.
   */
  updateChatUnreadPollVoteCount(int53 chat_id_, int32 unread_poll_vote_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1720127450;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat video chat state has changed.
 */
class updateChatVideoChat final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of video_chat.
  object_ptr<videoChat> video_chat_;
  static jfieldID video_chat_fieldID;

  /**
   * A chat video chat state has changed.
   */
  updateChatVideoChat();

  /**
   * A chat video chat state has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] video_chat_ New value of video_chat.
   */
  updateChatVideoChat(int53 chat_id_, object_ptr<videoChat> &&video_chat_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 637226150;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The value of the default disable_notification parameter, used when a message is sent to the chat, was changed.
 */
class updateChatDefaultDisableNotification final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new default_disable_notification value.
  bool default_disable_notification_;
  static jfieldID default_disable_notification_fieldID;

  /**
   * The value of the default disable_notification parameter, used when a message is sent to the chat, was changed.
   */
  updateChatDefaultDisableNotification();

  /**
   * The value of the default disable_notification parameter, used when a message is sent to the chat, was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] default_disable_notification_ The new default_disable_notification value.
   */
  updateChatDefaultDisableNotification(int53 chat_id_, bool default_disable_notification_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 464087707;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat content was allowed or restricted for saving.
 */
class updateChatHasProtectedContent final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of has_protected_content.
  bool has_protected_content_;
  static jfieldID has_protected_content_fieldID;

  /**
   * A chat content was allowed or restricted for saving.
   */
  updateChatHasProtectedContent();

  /**
   * A chat content was allowed or restricted for saving.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] has_protected_content_ New value of has_protected_content.
   */
  updateChatHasProtectedContent(int53 chat_id_, bool has_protected_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1800406811;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Translation of chat messages was enabled or disabled.
 */
class updateChatIsTranslatable final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of is_translatable.
  bool is_translatable_;
  static jfieldID is_translatable_fieldID;

  /**
   * Translation of chat messages was enabled or disabled.
   */
  updateChatIsTranslatable();

  /**
   * Translation of chat messages was enabled or disabled.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_translatable_ New value of is_translatable.
   */
  updateChatIsTranslatable(int53 chat_id_, bool is_translatable_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2063799831;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat was marked as unread or was read.
 */
class updateChatIsMarkedAsUnread final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of is_marked_as_unread.
  bool is_marked_as_unread_;
  static jfieldID is_marked_as_unread_fieldID;

  /**
   * A chat was marked as unread or was read.
   */
  updateChatIsMarkedAsUnread();

  /**
   * A chat was marked as unread or was read.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_marked_as_unread_ New value of is_marked_as_unread.
   */
  updateChatIsMarkedAsUnread(int53 chat_id_, bool is_marked_as_unread_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1468347188;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat default appearance has changed.
 */
class updateChatViewAsTopics final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of view_as_topics.
  bool view_as_topics_;
  static jfieldID view_as_topics_fieldID;

  /**
   * A chat default appearance has changed.
   */
  updateChatViewAsTopics();

  /**
   * A chat default appearance has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] view_as_topics_ New value of view_as_topics.
   */
  updateChatViewAsTopics(int53 chat_id_, bool view_as_topics_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1543444029;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat was blocked or unblocked.
 */
class updateChatBlockList final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Block list to which the chat is added; may be null if none.
  object_ptr<BlockList> block_list_;
  static jfieldID block_list_fieldID;

  /**
   * A chat was blocked or unblocked.
   */
  updateChatBlockList();

  /**
   * A chat was blocked or unblocked.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] block_list_ Block list to which the chat is added; may be null if none.
   */
  updateChatBlockList(int53 chat_id_, object_ptr<BlockList> &&block_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2027228018;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat's has_scheduled_messages field has changed.
 */
class updateChatHasScheduledMessages final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of has_scheduled_messages.
  bool has_scheduled_messages_;
  static jfieldID has_scheduled_messages_fieldID;

  /**
   * A chat's has_scheduled_messages field has changed.
   */
  updateChatHasScheduledMessages();

  /**
   * A chat's has_scheduled_messages field has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] has_scheduled_messages_ New value of has_scheduled_messages.
   */
  updateChatHasScheduledMessages(int53 chat_id_, bool has_scheduled_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2064958167;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of chat folders or a chat folder has changed.
 */
class updateChatFolders final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of chat folders.
  array<object_ptr<chatFolderInfo>> chat_folders_;
  static jfieldID chat_folders_fieldID;
  /// Position of the main chat list among chat folders, 0-based.
  int32 main_chat_list_position_;
  static jfieldID main_chat_list_position_fieldID;
  /// True, if folder tags are enabled.
  bool are_tags_enabled_;
  static jfieldID are_tags_enabled_fieldID;

  /**
   * The list of chat folders or a chat folder has changed.
   */
  updateChatFolders();

  /**
   * The list of chat folders or a chat folder has changed.
   *
   * \param[in] chat_folders_ The new list of chat folders.
   * \param[in] main_chat_list_position_ Position of the main chat list among chat folders, 0-based.
   * \param[in] are_tags_enabled_ True, if folder tags are enabled.
   */
  updateChatFolders(array<object_ptr<chatFolderInfo>> &&chat_folders_, int32 main_chat_list_position_, bool are_tags_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1998101395;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it is sent just after the number of online users has changed.
 */
class updateChatOnlineMemberCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New number of online members in the chat, or 0 if unknown.
  int32 online_member_count_;
  static jfieldID online_member_count_fieldID;

  /**
   * The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it is sent just after the number of online users has changed.
   */
  updateChatOnlineMemberCount();

  /**
   * The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it is sent just after the number of online users has changed.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] online_member_count_ New number of online members in the chat, or 0 if unknown.
   */
  updateChatOnlineMemberCount(int53 chat_id_, int32 online_member_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 487369373;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application.
 */
class updateSavedMessagesTopic final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the topic.
  object_ptr<savedMessagesTopic> topic_;
  static jfieldID topic_fieldID;

  /**
   * Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application.
   */
  updateSavedMessagesTopic();

  /**
   * Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application.
   *
   * \param[in] topic_ New data about the topic.
   */
  explicit updateSavedMessagesTopic(object_ptr<savedMessagesTopic> &&topic_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1618855120;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Number of Saved Messages topics has changed.
 */
class updateSavedMessagesTopicCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of Saved Messages topics.
  int32 topic_count_;
  static jfieldID topic_count_fieldID;

  /**
   * Number of Saved Messages topics has changed.
   */
  updateSavedMessagesTopicCount();

  /**
   * Number of Saved Messages topics has changed.
   *
   * \param[in] topic_count_ Approximate total number of Saved Messages topics.
   */
  explicit updateSavedMessagesTopicCount(int32 topic_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -70092335;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Basic information about a topic in a channel direct messages chat administered by the current user has changed. This update is guaranteed to come before the topic identifier is returned to the application.
 */
class updateDirectMessagesChatTopic final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the topic.
  object_ptr<directMessagesChatTopic> topic_;
  static jfieldID topic_fieldID;

  /**
   * Basic information about a topic in a channel direct messages chat administered by the current user has changed. This update is guaranteed to come before the topic identifier is returned to the application.
   */
  updateDirectMessagesChatTopic();

  /**
   * Basic information about a topic in a channel direct messages chat administered by the current user has changed. This update is guaranteed to come before the topic identifier is returned to the application.
   *
   * \param[in] topic_ New data about the topic.
   */
  explicit updateDirectMessagesChatTopic(object_ptr<directMessagesChatTopic> &&topic_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -683346963;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Number of messages in a topic has changed; for Saved Messages and channel direct messages chat topics only.
 */
class updateTopicMessageCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in topic of which the number of messages has changed.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Approximate number of messages in the topic.
  int32 message_count_;
  static jfieldID message_count_fieldID;

  /**
   * Number of messages in a topic has changed; for Saved Messages and channel direct messages chat topics only.
   */
  updateTopicMessageCount();

  /**
   * Number of messages in a topic has changed; for Saved Messages and channel direct messages chat topics only.
   *
   * \param[in] chat_id_ Identifier of the chat in topic of which the number of messages has changed.
   * \param[in] topic_id_ Identifier of the topic.
   * \param[in] message_count_ Approximate number of messages in the topic.
   */
  updateTopicMessageCount(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, int32 message_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1591525479;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application.
 */
class updateQuickReplyShortcut final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the shortcut.
  object_ptr<quickReplyShortcut> shortcut_;
  static jfieldID shortcut_fieldID;

  /**
   * Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application.
   */
  updateQuickReplyShortcut();

  /**
   * Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application.
   *
   * \param[in] shortcut_ New data about the shortcut.
   */
  explicit updateQuickReplyShortcut(object_ptr<quickReplyShortcut> &&shortcut_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -963430193;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A quick reply shortcut and all its messages were deleted.
 */
class updateQuickReplyShortcutDeleted final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the deleted shortcut.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;

  /**
   * A quick reply shortcut and all its messages were deleted.
   */
  updateQuickReplyShortcutDeleted();

  /**
   * A quick reply shortcut and all its messages were deleted.
   *
   * \param[in] shortcut_id_ The identifier of the deleted shortcut.
   */
  explicit updateQuickReplyShortcutDeleted(int32 shortcut_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -390480838;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of quick reply shortcuts has changed.
 */
class updateQuickReplyShortcuts final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of identifiers of quick reply shortcuts.
  array<int32> shortcut_ids_;
  static jfieldID shortcut_ids_fieldID;

  /**
   * The list of quick reply shortcuts has changed.
   */
  updateQuickReplyShortcuts();

  /**
   * The list of quick reply shortcuts has changed.
   *
   * \param[in] shortcut_ids_ The new list of identifiers of quick reply shortcuts.
   */
  explicit updateQuickReplyShortcuts(array<int32> &&shortcut_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1994849731;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of quick reply shortcut messages has changed.
 */
class updateQuickReplyShortcutMessages final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the shortcut.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// The new list of quick reply messages for the shortcut in order from the first to the last sent.
  array<object_ptr<quickReplyMessage>> messages_;
  static jfieldID messages_fieldID;

  /**
   * The list of quick reply shortcut messages has changed.
   */
  updateQuickReplyShortcutMessages();

  /**
   * The list of quick reply shortcut messages has changed.
   *
   * \param[in] shortcut_id_ The identifier of the shortcut.
   * \param[in] messages_ The new list of quick reply messages for the shortcut in order from the first to the last sent.
   */
  updateQuickReplyShortcutMessages(int32 shortcut_id_, array<object_ptr<quickReplyMessage>> &&messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1396685225;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Basic information about a topic in a forum chat was changed.
 */
class updateForumTopicInfo final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New information about the topic.
  object_ptr<forumTopicInfo> info_;
  static jfieldID info_fieldID;

  /**
   * Basic information about a topic in a forum chat was changed.
   */
  updateForumTopicInfo();

  /**
   * Basic information about a topic in a forum chat was changed.
   *
   * \param[in] info_ New information about the topic.
   */
  explicit updateForumTopicInfo(object_ptr<forumTopicInfo> &&info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1420762696;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about a topic in a forum chat was changed.
 */
class updateForumTopic final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier of the topic.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// True, if the topic is pinned in the topic list.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;
  /// Identifier of the last read incoming message.
  int53 last_read_inbox_message_id_;
  static jfieldID last_read_inbox_message_id_fieldID;
  /// Identifier of the last read outgoing message.
  int53 last_read_outbox_message_id_;
  static jfieldID last_read_outbox_message_id_fieldID;
  /// Number of unread messages with a mention/reply in the topic.
  int32 unread_mention_count_;
  static jfieldID unread_mention_count_fieldID;
  /// Number of messages with unread reactions in the topic.
  int32 unread_reaction_count_;
  static jfieldID unread_reaction_count_fieldID;
  /// Number of messages with unread poll votes in the topic.
  int32 unread_poll_vote_count_;
  static jfieldID unread_poll_vote_count_fieldID;
  /// Notification settings for the topic.
  object_ptr<chatNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;
  /// A draft of a message in the topic; may be null if none.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;

  /**
   * Information about a topic in a forum chat was changed.
   */
  updateForumTopic();

  /**
   * Information about a topic in a forum chat was changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier of the topic.
   * \param[in] is_pinned_ True, if the topic is pinned in the topic list.
   * \param[in] last_read_inbox_message_id_ Identifier of the last read incoming message.
   * \param[in] last_read_outbox_message_id_ Identifier of the last read outgoing message.
   * \param[in] unread_mention_count_ Number of unread messages with a mention/reply in the topic.
   * \param[in] unread_reaction_count_ Number of messages with unread reactions in the topic.
   * \param[in] unread_poll_vote_count_ Number of messages with unread poll votes in the topic.
   * \param[in] notification_settings_ Notification settings for the topic.
   * \param[in] draft_message_ A draft of a message in the topic; may be null if none.
   */
  updateForumTopic(int53 chat_id_, int32 forum_topic_id_, bool is_pinned_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, int32 unread_reaction_count_, int32 unread_poll_vote_count_, object_ptr<chatNotificationSettings> &&notification_settings_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1851967925;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notification settings for some type of chats were updated.
 */
class updateScopeNotificationSettings final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Types of chats for which notification settings were updated.
  object_ptr<NotificationSettingsScope> scope_;
  static jfieldID scope_fieldID;
  /// The new notification settings.
  object_ptr<scopeNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Notification settings for some type of chats were updated.
   */
  updateScopeNotificationSettings();

  /**
   * Notification settings for some type of chats were updated.
   *
   * \param[in] scope_ Types of chats for which notification settings were updated.
   * \param[in] notification_settings_ The new notification settings.
   */
  updateScopeNotificationSettings(object_ptr<NotificationSettingsScope> &&scope_, object_ptr<scopeNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1203975309;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Notification settings for reactions were updated.
 */
class updateReactionNotificationSettings final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new notification settings.
  object_ptr<reactionNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Notification settings for reactions were updated.
   */
  updateReactionNotificationSettings();

  /**
   * Notification settings for reactions were updated.
   *
   * \param[in] notification_settings_ The new notification settings.
   */
  explicit updateReactionNotificationSettings(object_ptr<reactionNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -447932436;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A notification was changed.
 */
class updateNotification final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique notification group identifier.
  int32 notification_group_id_;
  static jfieldID notification_group_id_fieldID;
  /// Changed notification.
  object_ptr<notification> notification_;
  static jfieldID notification_fieldID;

  /**
   * A notification was changed.
   */
  updateNotification();

  /**
   * A notification was changed.
   *
   * \param[in] notification_group_id_ Unique notification group identifier.
   * \param[in] notification_ Changed notification.
   */
  updateNotification(int32 notification_group_id_, object_ptr<notification> &&notification_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1897496876;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A list of active notifications in a notification group has changed.
 */
class updateNotificationGroup final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique notification group identifier.
  int32 notification_group_id_;
  static jfieldID notification_group_id_fieldID;
  /// New type of the notification group.
  object_ptr<NotificationGroupType> type_;
  static jfieldID type_fieldID;
  /// Identifier of a chat to which all notifications in the group belong.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Chat identifier, which notification settings must be applied to the added notifications.
  int53 notification_settings_chat_id_;
  static jfieldID notification_settings_chat_id_fieldID;
  /// Identifier of the notification sound to be played; 0 if sound is disabled.
  int64 notification_sound_id_;
  static jfieldID notification_sound_id_fieldID;
  /// Total number of unread notifications in the group, can be bigger than number of active notifications.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// List of added group notifications, sorted by notification identifier.
  array<object_ptr<notification>> added_notifications_;
  static jfieldID added_notifications_fieldID;
  /// Identifiers of removed group notifications, sorted by notification identifier.
  array<int32> removed_notification_ids_;
  static jfieldID removed_notification_ids_fieldID;

  /**
   * A list of active notifications in a notification group has changed.
   */
  updateNotificationGroup();

  /**
   * A list of active notifications in a notification group has changed.
   *
   * \param[in] notification_group_id_ Unique notification group identifier.
   * \param[in] type_ New type of the notification group.
   * \param[in] chat_id_ Identifier of a chat to which all notifications in the group belong.
   * \param[in] notification_settings_chat_id_ Chat identifier, which notification settings must be applied to the added notifications.
   * \param[in] notification_sound_id_ Identifier of the notification sound to be played; 0 if sound is disabled.
   * \param[in] total_count_ Total number of unread notifications in the group, can be bigger than number of active notifications.
   * \param[in] added_notifications_ List of added group notifications, sorted by notification identifier.
   * \param[in] removed_notification_ids_ Identifiers of removed group notifications, sorted by notification identifier.
   */
  updateNotificationGroup(int32 notification_group_id_, object_ptr<NotificationGroupType> &&type_, int53 chat_id_, int53 notification_settings_chat_id_, int64 notification_sound_id_, int32 total_count_, array<object_ptr<notification>> &&added_notifications_, array<int32> &&removed_notification_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1381081378;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update.
 */
class updateActiveNotifications final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Lists of active notification groups.
  array<object_ptr<notificationGroup>> groups_;
  static jfieldID groups_fieldID;

  /**
   * Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update.
   */
  updateActiveNotifications();

  /**
   * Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update.
   *
   * \param[in] groups_ Lists of active notification groups.
   */
  explicit updateActiveNotifications(array<object_ptr<notificationGroup>> &&groups_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1306672221;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications.
 */
class updateHavePendingNotifications final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if there are some delayed notification updates, which will be sent soon.
  bool have_delayed_notifications_;
  static jfieldID have_delayed_notifications_fieldID;
  /// True, if there can be some yet unreceived notifications, which are being fetched from the server.
  bool have_unreceived_notifications_;
  static jfieldID have_unreceived_notifications_fieldID;

  /**
   * Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications.
   */
  updateHavePendingNotifications();

  /**
   * Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications.
   *
   * \param[in] have_delayed_notifications_ True, if there are some delayed notification updates, which will be sent soon.
   * \param[in] have_unreceived_notifications_ True, if there can be some yet unreceived notifications, which are being fetched from the server.
   */
  updateHavePendingNotifications(bool have_delayed_notifications_, bool have_unreceived_notifications_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 179233243;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some messages were deleted.
 */
class updateDeleteMessages final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifiers of the deleted messages.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;
  /// True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible).
  bool is_permanent_;
  static jfieldID is_permanent_fieldID;
  /// True, if the messages are deleted only from the cache and can possibly be retrieved again in the future.
  bool from_cache_;
  static jfieldID from_cache_fieldID;

  /**
   * Some messages were deleted.
   */
  updateDeleteMessages();

  /**
   * Some messages were deleted.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_ids_ Identifiers of the deleted messages.
   * \param[in] is_permanent_ True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible).
   * \param[in] from_cache_ True, if the messages are deleted only from the cache and can possibly be retrieved again in the future.
   */
  updateDeleteMessages(int53 chat_id_, array<int53> &&message_ids_, bool is_permanent_, bool from_cache_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1669252686;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message sender activity in the chat has changed.
 */
class updateChatAction final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the specific topic in which the action was performed; may be null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Identifier of a message sender performing the action.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// The action.
  object_ptr<ChatAction> action_;
  static jfieldID action_fieldID;

  /**
   * A message sender activity in the chat has changed.
   */
  updateChatAction();

  /**
   * A message sender activity in the chat has changed.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] topic_id_ Identifier of the specific topic in which the action was performed; may be null if none.
   * \param[in] sender_id_ Identifier of a message sender performing the action.
   * \param[in] action_ The action.
   */
  updateChatAction(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<MessageSender> &&sender_id_, object_ptr<ChatAction> &&action_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1140846612;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new pending text message was received in a chat with a bot. The message must be shown in the chat for at most getOption(&quot;pending_text_message_period&quot;) seconds, replace any other pending message with the same draft_id, and be deleted whenever any incoming message from the bot in the message thread is received.
 */
class updatePendingTextMessage final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The forum topic identifier in which the message will be sent; 0 if none.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// Unique identifier of the message draft within the message thread.
  int64 draft_id_;
  static jfieldID draft_id_fieldID;
  /// Text of the pending message.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * A new pending text message was received in a chat with a bot. The message must be shown in the chat for at most getOption(&quot;pending_text_message_period&quot;) seconds, replace any other pending message with the same draft_id, and be deleted whenever any incoming message from the bot in the message thread is received.
   */
  updatePendingTextMessage();

  /**
   * A new pending text message was received in a chat with a bot. The message must be shown in the chat for at most getOption(&quot;pending_text_message_period&quot;) seconds, replace any other pending message with the same draft_id, and be deleted whenever any incoming message from the bot in the message thread is received.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ The forum topic identifier in which the message will be sent; 0 if none.
   * \param[in] draft_id_ Unique identifier of the message draft within the message thread.
   * \param[in] text_ Text of the pending message.
   */
  updatePendingTextMessage(int53 chat_id_, int32 forum_topic_id_, int64 draft_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1076298155;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user went online or offline.
 */
class updateUserStatus final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// New status of the user.
  object_ptr<UserStatus> status_;
  static jfieldID status_fieldID;

  /**
   * The user went online or offline.
   */
  updateUserStatus();

  /**
   * The user went online or offline.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] status_ New status of the user.
   */
  updateUserStatus(int53 user_id_, object_ptr<UserStatus> &&status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 958468625;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application.
 */
class updateUser final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the user.
  object_ptr<user> user_;
  static jfieldID user_fieldID;

  /**
   * Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application.
   */
  updateUser();

  /**
   * Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application.
   *
   * \param[in] user_ New data about the user.
   */
  explicit updateUser(object_ptr<user> &&user_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1183394041;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application.
 */
class updateBasicGroup final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the group.
  object_ptr<basicGroup> basic_group_;
  static jfieldID basic_group_fieldID;

  /**
   * Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application.
   */
  updateBasicGroup();

  /**
   * Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application.
   *
   * \param[in] basic_group_ New data about the group.
   */
  explicit updateBasicGroup(object_ptr<basicGroup> &&basic_group_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1003239581;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application.
 */
class updateSupergroup final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the supergroup.
  object_ptr<supergroup> supergroup_;
  static jfieldID supergroup_fieldID;

  /**
   * Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application.
   */
  updateSupergroup();

  /**
   * Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application.
   *
   * \param[in] supergroup_ New data about the supergroup.
   */
  explicit updateSupergroup(object_ptr<supergroup> &&supergroup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -76782300;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application.
 */
class updateSecretChat final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the secret chat.
  object_ptr<secretChat> secret_chat_;
  static jfieldID secret_chat_fieldID;

  /**
   * Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application.
   */
  updateSecretChat();

  /**
   * Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application.
   *
   * \param[in] secret_chat_ New data about the secret chat.
   */
  explicit updateSecretChat(object_ptr<secretChat> &&secret_chat_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1666903253;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data in userFullInfo has been changed.
 */
class updateUserFullInfo final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// New full information about the user.
  object_ptr<userFullInfo> user_full_info_;
  static jfieldID user_full_info_fieldID;

  /**
   * Some data in userFullInfo has been changed.
   */
  updateUserFullInfo();

  /**
   * Some data in userFullInfo has been changed.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] user_full_info_ New full information about the user.
   */
  updateUserFullInfo(int53 user_id_, object_ptr<userFullInfo> &&user_full_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -51197161;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data in basicGroupFullInfo has been changed.
 */
class updateBasicGroupFullInfo final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a basic group.
  int53 basic_group_id_;
  static jfieldID basic_group_id_fieldID;
  /// New full information about the group.
  object_ptr<basicGroupFullInfo> basic_group_full_info_;
  static jfieldID basic_group_full_info_fieldID;

  /**
   * Some data in basicGroupFullInfo has been changed.
   */
  updateBasicGroupFullInfo();

  /**
   * Some data in basicGroupFullInfo has been changed.
   *
   * \param[in] basic_group_id_ Identifier of a basic group.
   * \param[in] basic_group_full_info_ New full information about the group.
   */
  updateBasicGroupFullInfo(int53 basic_group_id_, object_ptr<basicGroupFullInfo> &&basic_group_full_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1391881151;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some data in supergroupFullInfo has been changed.
 */
class updateSupergroupFullInfo final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New full information about the supergroup.
  object_ptr<supergroupFullInfo> supergroup_full_info_;
  static jfieldID supergroup_full_info_fieldID;

  /**
   * Some data in supergroupFullInfo has been changed.
   */
  updateSupergroupFullInfo();

  /**
   * Some data in supergroupFullInfo has been changed.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   * \param[in] supergroup_full_info_ New full information about the supergroup.
   */
  updateSupergroupFullInfo(int53 supergroup_id_, object_ptr<supergroupFullInfo> &&supergroup_full_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 435539214;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification.
 */
class updateServiceNotification final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Notification type. If type begins with &quot;AUTH_KEY_DROP_&quot;, then two buttons &quot;Cancel&quot; and &quot;Log out&quot; must be shown under notification; if user presses the second, all local data must be destroyed using Destroy method.
  string type_;
  static jfieldID type_fieldID;
  /// Notification content.
  object_ptr<MessageContent> content_;
  static jfieldID content_fieldID;

  /**
   * A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification.
   */
  updateServiceNotification();

  /**
   * A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification.
   *
   * \param[in] type_ Notification type. If type begins with &quot;AUTH_KEY_DROP_&quot;, then two buttons &quot;Cancel&quot; and &quot;Log out&quot; must be shown under notification; if user presses the second, all local data must be destroyed using Destroy method.
   * \param[in] content_ Notification content.
   */
  updateServiceNotification(string const &type_, object_ptr<MessageContent> &&content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1318622637;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An OAuth authorization request was received.
 */
class updateNewOauthRequest final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A domain of the URL where the user authorizes.
  string domain_;
  static jfieldID domain_fieldID;
  /// Human-readable description of a country and a region from which the authorization is performed, based on the IP address.
  string location_;
  static jfieldID location_fieldID;
  /// The URL to pass to getOauthLinkInfo; the link is valid for 60 seconds.
  string url_;
  static jfieldID url_fieldID;

  /**
   * An OAuth authorization request was received.
   */
  updateNewOauthRequest();

  /**
   * An OAuth authorization request was received.
   *
   * \param[in] domain_ A domain of the URL where the user authorizes.
   * \param[in] location_ Human-readable description of a country and a region from which the authorization is performed, based on the IP address.
   * \param[in] url_ The URL to pass to getOauthLinkInfo; the link is valid for 60 seconds.
   */
  updateNewOauthRequest(string const &domain_, string const &location_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 248383005;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about a file was updated.
 */
class updateFile final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the file.
  object_ptr<file> file_;
  static jfieldID file_fieldID;

  /**
   * Information about a file was updated.
   */
  updateFile();

  /**
   * Information about a file was updated.
   *
   * \param[in] file_ New data about the file.
   */
  explicit updateFile(object_ptr<file> &&file_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 114132831;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The file generation process needs to be started by the application. Use setFileGenerationProgress and finishFileGeneration to generate the file.
 */
class updateFileGenerationStart final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the generation process.
  int64 generation_id_;
  static jfieldID generation_id_fieldID;
  /// The original path specified by the application in inputFileGenerated.
  string original_path_;
  static jfieldID original_path_fieldID;
  /// The path to a file that must be created and where the new file must be generated by the application. If the application has no access to the path, it can use writeGeneratedFilePart to generate the file.
  string destination_path_;
  static jfieldID destination_path_fieldID;
  /// If the conversion is &quot;\#url\#&quot; than original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. Otherwise, this is the conversion specified by the application in inputFileGenerated.
  string conversion_;
  static jfieldID conversion_fieldID;

  /**
   * The file generation process needs to be started by the application. Use setFileGenerationProgress and finishFileGeneration to generate the file.
   */
  updateFileGenerationStart();

  /**
   * The file generation process needs to be started by the application. Use setFileGenerationProgress and finishFileGeneration to generate the file.
   *
   * \param[in] generation_id_ Unique identifier for the generation process.
   * \param[in] original_path_ The original path specified by the application in inputFileGenerated.
   * \param[in] destination_path_ The path to a file that must be created and where the new file must be generated by the application. If the application has no access to the path, it can use writeGeneratedFilePart to generate the file.
   * \param[in] conversion_ If the conversion is &quot;\#url\#&quot; than original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. Otherwise, this is the conversion specified by the application in inputFileGenerated.
   */
  updateFileGenerationStart(int64 generation_id_, string const &original_path_, string const &destination_path_, string const &conversion_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 216817388;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * File generation is no longer needed.
 */
class updateFileGenerationStop final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the generation process.
  int64 generation_id_;
  static jfieldID generation_id_fieldID;

  /**
   * File generation is no longer needed.
   */
  updateFileGenerationStop();

  /**
   * File generation is no longer needed.
   *
   * \param[in] generation_id_ Unique identifier for the generation process.
   */
  explicit updateFileGenerationStop(int64 generation_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1894449685;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The state of the file download list has changed.
 */
class updateFileDownloads final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Total size of files in the file download list, in bytes.
  int53 total_size_;
  static jfieldID total_size_fieldID;
  /// Total number of files in the file download list.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Total downloaded size of files in the file download list, in bytes.
  int53 downloaded_size_;
  static jfieldID downloaded_size_fieldID;

  /**
   * The state of the file download list has changed.
   */
  updateFileDownloads();

  /**
   * The state of the file download list has changed.
   *
   * \param[in] total_size_ Total size of files in the file download list, in bytes.
   * \param[in] total_count_ Total number of files in the file download list.
   * \param[in] downloaded_size_ Total downloaded size of files in the file download list, in bytes.
   */
  updateFileDownloads(int53 total_size_, int32 total_count_, int53 downloaded_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -389213497;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file was added to the file download list. This update is sent only after file download list is loaded for the first time.
 */
class updateFileAddedToDownloads final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The added file download.
  object_ptr<fileDownload> file_download_;
  static jfieldID file_download_fieldID;
  /// New number of being downloaded and recently downloaded files found.
  object_ptr<downloadedFileCounts> counts_;
  static jfieldID counts_fieldID;

  /**
   * A file was added to the file download list. This update is sent only after file download list is loaded for the first time.
   */
  updateFileAddedToDownloads();

  /**
   * A file was added to the file download list. This update is sent only after file download list is loaded for the first time.
   *
   * \param[in] file_download_ The added file download.
   * \param[in] counts_ New number of being downloaded and recently downloaded files found.
   */
  updateFileAddedToDownloads(object_ptr<fileDownload> &&file_download_, object_ptr<downloadedFileCounts> &&counts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1609929242;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file download was changed. This update is sent only after file download list is loaded for the first time.
 */
class updateFileDownload final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File identifier.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed.
  int32 complete_date_;
  static jfieldID complete_date_fieldID;
  /// True, if downloading of the file is paused.
  bool is_paused_;
  static jfieldID is_paused_fieldID;
  /// New number of being downloaded and recently downloaded files found.
  object_ptr<downloadedFileCounts> counts_;
  static jfieldID counts_fieldID;

  /**
   * A file download was changed. This update is sent only after file download list is loaded for the first time.
   */
  updateFileDownload();

  /**
   * A file download was changed. This update is sent only after file download list is loaded for the first time.
   *
   * \param[in] file_id_ File identifier.
   * \param[in] complete_date_ Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed.
   * \param[in] is_paused_ True, if downloading of the file is paused.
   * \param[in] counts_ New number of being downloaded and recently downloaded files found.
   */
  updateFileDownload(int32 file_id_, int32 complete_date_, bool is_paused_, object_ptr<downloadedFileCounts> &&counts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 875529162;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A file was removed from the file download list. This update is sent only after file download list is loaded for the first time.
 */
class updateFileRemovedFromDownloads final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File identifier.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// New number of being downloaded and recently downloaded files found.
  object_ptr<downloadedFileCounts> counts_;
  static jfieldID counts_fieldID;

  /**
   * A file was removed from the file download list. This update is sent only after file download list is loaded for the first time.
   */
  updateFileRemovedFromDownloads();

  /**
   * A file was removed from the file download list. This update is sent only after file download list is loaded for the first time.
   *
   * \param[in] file_id_ File identifier.
   * \param[in] counts_ New number of being downloaded and recently downloaded files found.
   */
  updateFileRemovedFromDownloads(int32 file_id_, object_ptr<downloadedFileCounts> &&counts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1853625576;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A request can't be completed unless application verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed.
 */
class updateApplicationVerificationRequired final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the verification process.
  int53 verification_id_;
  static jfieldID verification_id_fieldID;
  /// Unique base64url-encoded nonce for the classic Play Integrity verification (https://developer.android.com/google/play/integrity/classic) for Android, or a unique string to compare with verify_nonce field from a push notification for iOS.
  string nonce_;
  static jfieldID nonce_fieldID;
  /// Cloud project number to pass to the Play Integrity API on Android.
  int64 cloud_project_number_;
  static jfieldID cloud_project_number_fieldID;

  /**
   * A request can't be completed unless application verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed.
   */
  updateApplicationVerificationRequired();

  /**
   * A request can't be completed unless application verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed.
   *
   * \param[in] verification_id_ Unique identifier for the verification process.
   * \param[in] nonce_ Unique base64url-encoded nonce for the classic Play Integrity verification (https://developer.android.com/google/play/integrity/classic) for Android, or a unique string to compare with verify_nonce field from a push notification for iOS.
   * \param[in] cloud_project_number_ Cloud project number to pass to the Play Integrity API on Android.
   */
  updateApplicationVerificationRequired(int53 verification_id_, string const &nonce_, int64 cloud_project_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -979607081;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A request can't be completed unless reCAPTCHA verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed.
 */
class updateApplicationRecaptchaVerificationRequired final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the verification process.
  int53 verification_id_;
  static jfieldID verification_id_fieldID;
  /// The action for the check.
  string action_;
  static jfieldID action_fieldID;
  /// Identifier of the reCAPTCHA key.
  string recaptcha_key_id_;
  static jfieldID recaptcha_key_id_fieldID;

  /**
   * A request can't be completed unless reCAPTCHA verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed.
   */
  updateApplicationRecaptchaVerificationRequired();

  /**
   * A request can't be completed unless reCAPTCHA verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed.
   *
   * \param[in] verification_id_ Unique identifier for the verification process.
   * \param[in] action_ The action for the check.
   * \param[in] recaptcha_key_id_ Identifier of the reCAPTCHA key.
   */
  updateApplicationRecaptchaVerificationRequired(int53 verification_id_, string const &action_, string const &recaptcha_key_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1796351554;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New call was created or information about a call was updated.
 */
class updateCall final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about a call.
  object_ptr<call> call_;
  static jfieldID call_fieldID;

  /**
   * New call was created or information about a call was updated.
   */
  updateCall();

  /**
   * New call was created or information about a call was updated.
   *
   * \param[in] call_ New data about a call.
   */
  explicit updateCall(object_ptr<call> &&call_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1337184477;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about a group call was updated.
 */
class updateGroupCall final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the group call.
  object_ptr<groupCall> group_call_;
  static jfieldID group_call_fieldID;

  /**
   * Information about a group call was updated.
   */
  updateGroupCall();

  /**
   * Information about a group call was updated.
   *
   * \param[in] group_call_ New data about the group call.
   */
  explicit updateGroupCall(object_ptr<groupCall> &&group_call_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 808603136;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined.
 */
class updateGroupCallParticipant final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New data about the participant.
  object_ptr<groupCallParticipant> participant_;
  static jfieldID participant_fieldID;

  /**
   * Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined.
   */
  updateGroupCallParticipant();

  /**
   * Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] participant_ New data about the participant.
   */
  updateGroupCallParticipant(int32 group_call_id_, object_ptr<groupCallParticipant> &&participant_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -803128071;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of group call participants that can send and receive encrypted call data has changed; for group calls not bound to a chat only.
 */
class updateGroupCallParticipants final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New list of group call participant user identifiers. The identifiers may be invalid or the corresponding users may be unknown. The participants must be shown in the list of group call participants even if there is no information about them.
  array<int64> participant_user_ids_;
  static jfieldID participant_user_ids_fieldID;

  /**
   * The list of group call participants that can send and receive encrypted call data has changed; for group calls not bound to a chat only.
   */
  updateGroupCallParticipants();

  /**
   * The list of group call participants that can send and receive encrypted call data has changed; for group calls not bound to a chat only.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] participant_user_ids_ New list of group call participant user identifiers. The identifiers may be invalid or the corresponding users may be unknown. The participants must be shown in the list of group call participants even if there is no information about them.
   */
  updateGroupCallParticipants(int32 group_call_id_, array<int64> &&participant_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1874006374;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The verification state of an encrypted group call has changed; for group calls not bound to a chat only.
 */
class updateGroupCallVerificationState final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// The call state generation to which the emoji corresponds. If generation is different for two users, then their emoji may be also different.
  int32 generation_;
  static jfieldID generation_fieldID;
  /// Group call state fingerprint represented as 4 emoji; may be empty if the state isn't verified yet.
  array<string> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * The verification state of an encrypted group call has changed; for group calls not bound to a chat only.
   */
  updateGroupCallVerificationState();

  /**
   * The verification state of an encrypted group call has changed; for group calls not bound to a chat only.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] generation_ The call state generation to which the emoji corresponds. If generation is different for two users, then their emoji may be also different.
   * \param[in] emojis_ Group call state fingerprint represented as 4 emoji; may be empty if the state isn't verified yet.
   */
  updateGroupCallVerificationState(int32 group_call_id_, int32 generation_, array<string> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 682965060;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new message was received in a group call.
 */
class updateNewGroupCallMessage final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// The message.
  object_ptr<groupCallMessage> message_;
  static jfieldID message_fieldID;

  /**
   * A new message was received in a group call.
   */
  updateNewGroupCallMessage();

  /**
   * A new message was received in a group call.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] message_ The message.
   */
  updateNewGroupCallMessage(int32 group_call_id_, object_ptr<groupCallMessage> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2072291743;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new paid reaction was received in a live story group call.
 */
class updateNewGroupCallPaidReaction final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifier of the sender of the reaction.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// The number of Telegram Stars that were paid to send the reaction.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * A new paid reaction was received in a live story group call.
   */
  updateNewGroupCallPaidReaction();

  /**
   * A new paid reaction was received in a live story group call.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] sender_id_ Identifier of the sender of the reaction.
   * \param[in] star_count_ The number of Telegram Stars that were paid to send the reaction.
   */
  updateNewGroupCallPaidReaction(int32 group_call_id_, object_ptr<MessageSender> &&sender_id_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -189233012;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A group call message failed to send.
 */
class updateGroupCallMessageSendFailed final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Message identifier.
  int32 message_id_;
  static jfieldID message_id_fieldID;
  /// The cause of the message sending failure.
  object_ptr<error> error_;
  static jfieldID error_fieldID;

  /**
   * A group call message failed to send.
   */
  updateGroupCallMessageSendFailed();

  /**
   * A group call message failed to send.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] message_id_ Message identifier.
   * \param[in] error_ The cause of the message sending failure.
   */
  updateGroupCallMessageSendFailed(int32 group_call_id_, int32 message_id_, object_ptr<error> &&error_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 472432559;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some group call messages were deleted.
 */
class updateGroupCallMessagesDeleted final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifiers of the deleted messages.
  array<int32> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Some group call messages were deleted.
   */
  updateGroupCallMessagesDeleted();

  /**
   * Some group call messages were deleted.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] message_ids_ Identifiers of the deleted messages.
   */
  updateGroupCallMessagesDeleted(int32 group_call_id_, array<int32> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1275517315;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of top donors in live story group call has changed.
 */
class updateLiveStoryTopDonors final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the group call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New list of live story donors.
  object_ptr<liveStoryDonors> donors_;
  static jfieldID donors_fieldID;

  /**
   * The list of top donors in live story group call has changed.
   */
  updateLiveStoryTopDonors();

  /**
   * The list of top donors in live story group call has changed.
   *
   * \param[in] group_call_id_ Identifier of the group call.
   * \param[in] donors_ New list of live story donors.
   */
  updateLiveStoryTopDonors(int32 group_call_id_, object_ptr<liveStoryDonors> &&donors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -715693884;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New call signaling data arrived.
 */
class updateNewCallSignalingData final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The call identifier.
  int32 call_id_;
  static jfieldID call_id_fieldID;
  /// The data.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * New call signaling data arrived.
   */
  updateNewCallSignalingData();

  /**
   * New call signaling data arrived.
   *
   * \param[in] call_id_ The call identifier.
   * \param[in] data_ The data.
   */
  updateNewCallSignalingData(int32 call_id_, bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 583634317;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * State of a gift auction was updated.
 */
class updateGiftAuctionState final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New state of the auction.
  object_ptr<giftAuctionState> state_;
  static jfieldID state_fieldID;

  /**
   * State of a gift auction was updated.
   */
  updateGiftAuctionState();

  /**
   * State of a gift auction was updated.
   *
   * \param[in] state_ New state of the auction.
   */
  explicit updateGiftAuctionState(object_ptr<giftAuctionState> &&state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1864542270;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of auctions in which participate the current user has changed.
 */
class updateActiveGiftAuctions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New states of the auctions.
  array<object_ptr<giftAuctionState>> states_;
  static jfieldID states_fieldID;

  /**
   * The list of auctions in which participate the current user has changed.
   */
  updateActiveGiftAuctions();

  /**
   * The list of auctions in which participate the current user has changed.
   *
   * \param[in] states_ New states of the auctions.
   */
  explicit updateActiveGiftAuctions(array<object_ptr<giftAuctionState>> &&states_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -521505204;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some privacy setting rules have been changed.
 */
class updateUserPrivacySettingRules final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The privacy setting.
  object_ptr<UserPrivacySetting> setting_;
  static jfieldID setting_fieldID;
  /// New privacy rules.
  object_ptr<userPrivacySettingRules> rules_;
  static jfieldID rules_fieldID;

  /**
   * Some privacy setting rules have been changed.
   */
  updateUserPrivacySettingRules();

  /**
   * Some privacy setting rules have been changed.
   *
   * \param[in] setting_ The privacy setting.
   * \param[in] rules_ New privacy rules.
   */
  updateUserPrivacySettingRules(object_ptr<UserPrivacySetting> &&setting_, object_ptr<userPrivacySettingRules> &&rules_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -912960778;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Number of unread messages in a chat list has changed. This update is sent only if the message database is used.
 */
class updateUnreadMessageCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat list with changed number of unread messages.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// Total number of unread messages.
  int32 unread_count_;
  static jfieldID unread_count_fieldID;
  /// Total number of unread messages in unmuted chats.
  int32 unread_unmuted_count_;
  static jfieldID unread_unmuted_count_fieldID;

  /**
   * Number of unread messages in a chat list has changed. This update is sent only if the message database is used.
   */
  updateUnreadMessageCount();

  /**
   * Number of unread messages in a chat list has changed. This update is sent only if the message database is used.
   *
   * \param[in] chat_list_ The chat list with changed number of unread messages.
   * \param[in] unread_count_ Total number of unread messages.
   * \param[in] unread_unmuted_count_ Total number of unread messages in unmuted chats.
   */
  updateUnreadMessageCount(object_ptr<ChatList> &&chat_list_, int32 unread_count_, int32 unread_unmuted_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 78987721;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used.
 */
class updateUnreadChatCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat list with changed number of unread messages.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// Approximate total number of chats in the chat list.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// Total number of unread chats.
  int32 unread_count_;
  static jfieldID unread_count_fieldID;
  /// Total number of unread unmuted chats.
  int32 unread_unmuted_count_;
  static jfieldID unread_unmuted_count_fieldID;
  /// Total number of chats marked as unread.
  int32 marked_as_unread_count_;
  static jfieldID marked_as_unread_count_fieldID;
  /// Total number of unmuted chats marked as unread.
  int32 marked_as_unread_unmuted_count_;
  static jfieldID marked_as_unread_unmuted_count_fieldID;

  /**
   * Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used.
   */
  updateUnreadChatCount();

  /**
   * Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used.
   *
   * \param[in] chat_list_ The chat list with changed number of unread messages.
   * \param[in] total_count_ Approximate total number of chats in the chat list.
   * \param[in] unread_count_ Total number of unread chats.
   * \param[in] unread_unmuted_count_ Total number of unread unmuted chats.
   * \param[in] marked_as_unread_count_ Total number of chats marked as unread.
   * \param[in] marked_as_unread_unmuted_count_ Total number of unmuted chats marked as unread.
   */
  updateUnreadChatCount(object_ptr<ChatList> &&chat_list_, int32 total_count_, int32 unread_count_, int32 unread_unmuted_count_, int32 marked_as_unread_count_, int32 marked_as_unread_unmuted_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1994494530;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story was changed.
 */
class updateStory final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new information about the story.
  object_ptr<story> story_;
  static jfieldID story_fieldID;

  /**
   * A story was changed.
   */
  updateStory();

  /**
   * A story was changed.
   *
   * \param[in] story_ The new information about the story.
   */
  explicit updateStory(object_ptr<story> &&story_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 419845935;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story became inaccessible.
 */
class updateStoryDeleted final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * A story became inaccessible.
   */
  updateStoryDeleted();

  /**
   * A story became inaccessible.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   */
  updateStoryDeleted(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -582743166;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story has been successfully posted.
 */
class updateStoryPostSucceeded final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The posted story.
  object_ptr<story> story_;
  static jfieldID story_fieldID;
  /// The previous temporary story identifier.
  int32 old_story_id_;
  static jfieldID old_story_id_fieldID;

  /**
   * A story has been successfully posted.
   */
  updateStoryPostSucceeded();

  /**
   * A story has been successfully posted.
   *
   * \param[in] story_ The posted story.
   * \param[in] old_story_id_ The previous temporary story identifier.
   */
  updateStoryPostSucceeded(object_ptr<story> &&story_, int32 old_story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1712432318;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A story failed to post. If the story posting is canceled, then updateStoryDeleted will be received instead of this update.
 */
class updateStoryPostFailed final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The failed to post story.
  object_ptr<story> story_;
  static jfieldID story_fieldID;
  /// The cause of the story posting failure.
  object_ptr<error> error_;
  static jfieldID error_fieldID;
  /// Type of the error; may be null if unknown.
  object_ptr<CanPostStoryResult> error_type_;
  static jfieldID error_type_fieldID;

  /**
   * A story failed to post. If the story posting is canceled, then updateStoryDeleted will be received instead of this update.
   */
  updateStoryPostFailed();

  /**
   * A story failed to post. If the story posting is canceled, then updateStoryDeleted will be received instead of this update.
   *
   * \param[in] story_ The failed to post story.
   * \param[in] error_ The cause of the story posting failure.
   * \param[in] error_type_ Type of the error; may be null if unknown.
   */
  updateStoryPostFailed(object_ptr<story> &&story_, object_ptr<error> &&error_, object_ptr<CanPostStoryResult> &&error_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1248168444;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of active stories posted by a specific chat has changed.
 */
class updateChatActiveStories final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of active stories.
  object_ptr<chatActiveStories> active_stories_;
  static jfieldID active_stories_fieldID;

  /**
   * The list of active stories posted by a specific chat has changed.
   */
  updateChatActiveStories();

  /**
   * The list of active stories posted by a specific chat has changed.
   *
   * \param[in] active_stories_ The new list of active stories.
   */
  explicit updateChatActiveStories(object_ptr<chatActiveStories> &&active_stories_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2037935148;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Number of chats in a story list has changed.
 */
class updateStoryListChatCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The story list.
  object_ptr<StoryList> story_list_;
  static jfieldID story_list_fieldID;
  /// Approximate total number of chats with active stories in the list.
  int32 chat_count_;
  static jfieldID chat_count_fieldID;

  /**
   * Number of chats in a story list has changed.
   */
  updateStoryListChatCount();

  /**
   * Number of chats in a story list has changed.
   *
   * \param[in] story_list_ The story list.
   * \param[in] chat_count_ Approximate total number of chats with active stories in the list.
   */
  updateStoryListChatCount(object_ptr<StoryList> &&story_list_, int32 chat_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2009871041;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Story stealth mode settings have changed.
 */
class updateStoryStealthMode final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) until stealth mode is active; 0 if it is disabled.
  int32 active_until_date_;
  static jfieldID active_until_date_fieldID;
  /// Point in time (Unix timestamp) when stealth mode can be enabled again; 0 if there is no active cooldown.
  int32 cooldown_until_date_;
  static jfieldID cooldown_until_date_fieldID;

  /**
   * Story stealth mode settings have changed.
   */
  updateStoryStealthMode();

  /**
   * Story stealth mode settings have changed.
   *
   * \param[in] active_until_date_ Point in time (Unix timestamp) until stealth mode is active; 0 if it is disabled.
   * \param[in] cooldown_until_date_ Point in time (Unix timestamp) when stealth mode can be enabled again; 0 if there is no active cooldown.
   */
  updateStoryStealthMode(int32 active_until_date_, int32 cooldown_until_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1878506778;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Lists of bots which Mini Apps must be allowed to read text from clipboard and must be opened without a warning.
 */
class updateTrustedMiniAppBots final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of user identifiers of the bots; the corresponding users may not be sent using updateUser updates and may not be accessible.
  array<int53> bot_user_ids_;
  static jfieldID bot_user_ids_fieldID;

  /**
   * Lists of bots which Mini Apps must be allowed to read text from clipboard and must be opened without a warning.
   */
  updateTrustedMiniAppBots();

  /**
   * Lists of bots which Mini Apps must be allowed to read text from clipboard and must be opened without a warning.
   *
   * \param[in] bot_user_ids_ List of user identifiers of the bots; the corresponding users may not be sent using updateUser updates and may not be accessible.
   */
  explicit updateTrustedMiniAppBots(array<int53> &&bot_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1733723438;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * An option changed its value.
 */
class updateOption final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The option name.
  string name_;
  static jfieldID name_fieldID;
  /// The new option value.
  object_ptr<OptionValue> value_;
  static jfieldID value_fieldID;

  /**
   * An option changed its value.
   */
  updateOption();

  /**
   * An option changed its value.
   *
   * \param[in] name_ The option name.
   * \param[in] value_ The new option value.
   */
  updateOption(string const &name_, object_ptr<OptionValue> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 900822020;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A sticker set has changed.
 */
class updateStickerSet final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The sticker set.
  object_ptr<stickerSet> sticker_set_;
  static jfieldID sticker_set_fieldID;

  /**
   * A sticker set has changed.
   */
  updateStickerSet();

  /**
   * A sticker set has changed.
   *
   * \param[in] sticker_set_ The sticker set.
   */
  explicit updateStickerSet(object_ptr<stickerSet> &&sticker_set_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1879268812;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of installed sticker sets was updated.
 */
class updateInstalledStickerSets final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the affected stickers.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// The new list of installed ordinary sticker sets.
  array<int64> sticker_set_ids_;
  static jfieldID sticker_set_ids_fieldID;

  /**
   * The list of installed sticker sets was updated.
   */
  updateInstalledStickerSets();

  /**
   * The list of installed sticker sets was updated.
   *
   * \param[in] sticker_type_ Type of the affected stickers.
   * \param[in] sticker_set_ids_ The new list of installed ordinary sticker sets.
   */
  updateInstalledStickerSets(object_ptr<StickerType> &&sticker_type_, array<int64> &&sticker_set_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1735084182;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of trending sticker sets was updated or some of them were viewed.
 */
class updateTrendingStickerSets final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the affected stickers.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// The prefix of the list of trending sticker sets with the newest trending sticker sets.
  object_ptr<trendingStickerSets> sticker_sets_;
  static jfieldID sticker_sets_fieldID;

  /**
   * The list of trending sticker sets was updated or some of them were viewed.
   */
  updateTrendingStickerSets();

  /**
   * The list of trending sticker sets was updated or some of them were viewed.
   *
   * \param[in] sticker_type_ Type of the affected stickers.
   * \param[in] sticker_sets_ The prefix of the list of trending sticker sets with the newest trending sticker sets.
   */
  updateTrendingStickerSets(object_ptr<StickerType> &&sticker_type_, object_ptr<trendingStickerSets> &&sticker_sets_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1266307239;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of recently used stickers was updated.
 */
class updateRecentStickers final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the list of stickers attached to photo or video files was updated; otherwise, the list of sent stickers is updated.
  bool is_attached_;
  static jfieldID is_attached_fieldID;
  /// The new list of file identifiers of recently used stickers.
  array<int32> sticker_ids_;
  static jfieldID sticker_ids_fieldID;

  /**
   * The list of recently used stickers was updated.
   */
  updateRecentStickers();

  /**
   * The list of recently used stickers was updated.
   *
   * \param[in] is_attached_ True, if the list of stickers attached to photo or video files was updated; otherwise, the list of sent stickers is updated.
   * \param[in] sticker_ids_ The new list of file identifiers of recently used stickers.
   */
  updateRecentStickers(bool is_attached_, array<int32> &&sticker_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1906403540;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of favorite stickers was updated.
 */
class updateFavoriteStickers final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of file identifiers of favorite stickers.
  array<int32> sticker_ids_;
  static jfieldID sticker_ids_fieldID;

  /**
   * The list of favorite stickers was updated.
   */
  updateFavoriteStickers();

  /**
   * The list of favorite stickers was updated.
   *
   * \param[in] sticker_ids_ The new list of file identifiers of favorite stickers.
   */
  explicit updateFavoriteStickers(array<int32> &&sticker_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1662240999;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of saved animations was updated.
 */
class updateSavedAnimations final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of file identifiers of saved animations.
  array<int32> animation_ids_;
  static jfieldID animation_ids_fieldID;

  /**
   * The list of saved animations was updated.
   */
  updateSavedAnimations();

  /**
   * The list of saved animations was updated.
   *
   * \param[in] animation_ids_ The new list of file identifiers of saved animations.
   */
  explicit updateSavedAnimations(array<int32> &&animation_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 65563814;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time.
 */
class updateSavedNotificationSounds final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of identifiers of saved notification sounds.
  array<int64> notification_sound_ids_;
  static jfieldID notification_sound_ids_fieldID;

  /**
   * The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time.
   */
  updateSavedNotificationSounds();

  /**
   * The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time.
   *
   * \param[in] notification_sound_ids_ The new list of identifiers of saved notification sounds.
   */
  explicit updateSavedNotificationSounds(array<int64> &&notification_sound_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1052725698;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The default background has changed.
 */
class updateDefaultBackground final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if default background for dark theme has changed.
  bool for_dark_theme_;
  static jfieldID for_dark_theme_fieldID;
  /// The new default background; may be null.
  object_ptr<background> background_;
  static jfieldID background_fieldID;

  /**
   * The default background has changed.
   */
  updateDefaultBackground();

  /**
   * The default background has changed.
   *
   * \param[in] for_dark_theme_ True, if default background for dark theme has changed.
   * \param[in] background_ The new default background; may be null.
   */
  updateDefaultBackground(bool for_dark_theme_, object_ptr<background> &&background_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -716139217;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of available emoji chat themes has changed.
 */
class updateEmojiChatThemes final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of emoji chat themes.
  array<object_ptr<emojiChatTheme>> chat_themes_;
  static jfieldID chat_themes_fieldID;

  /**
   * The list of available emoji chat themes has changed.
   */
  updateEmojiChatThemes();

  /**
   * The list of available emoji chat themes has changed.
   *
   * \param[in] chat_themes_ The new list of emoji chat themes.
   */
  explicit updateEmojiChatThemes(array<object_ptr<emojiChatTheme>> &&chat_themes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1021628745;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of supported accent colors has changed.
 */
class updateAccentColors final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about supported colors; colors with identifiers 0 (red), 1 (orange), 2 (purple/violet), 3 (green), 4 (cyan), 5 (blue), 6 (pink) must always be supported and aren't included in the list. The exact colors for the accent colors with identifiers 0-6 must be taken from the application theme.
  array<object_ptr<accentColor>> colors_;
  static jfieldID colors_fieldID;
  /// The list of accent color identifiers, which can be set through setAccentColor and setChatAccentColor. The colors must be shown in the specified order.
  array<int32> available_accent_color_ids_;
  static jfieldID available_accent_color_ids_fieldID;

  /**
   * The list of supported accent colors has changed.
   */
  updateAccentColors();

  /**
   * The list of supported accent colors has changed.
   *
   * \param[in] colors_ Information about supported colors; colors with identifiers 0 (red), 1 (orange), 2 (purple/violet), 3 (green), 4 (cyan), 5 (blue), 6 (pink) must always be supported and aren't included in the list. The exact colors for the accent colors with identifiers 0-6 must be taken from the application theme.
   * \param[in] available_accent_color_ids_ The list of accent color identifiers, which can be set through setAccentColor and setChatAccentColor. The colors must be shown in the specified order.
   */
  updateAccentColors(array<object_ptr<accentColor>> &&colors_, array<int32> &&available_accent_color_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1197047738;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of supported accent colors for user profiles has changed.
 */
class updateProfileAccentColors final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about supported colors.
  array<object_ptr<profileAccentColor>> colors_;
  static jfieldID colors_fieldID;
  /// The list of accent color identifiers, which can be set through setProfileAccentColor and setChatProfileAccentColor. The colors must be shown in the specified order.
  array<int32> available_accent_color_ids_;
  static jfieldID available_accent_color_ids_fieldID;

  /**
   * The list of supported accent colors for user profiles has changed.
   */
  updateProfileAccentColors();

  /**
   * The list of supported accent colors for user profiles has changed.
   *
   * \param[in] colors_ Information about supported colors.
   * \param[in] available_accent_color_ids_ The list of accent color identifiers, which can be set through setProfileAccentColor and setChatProfileAccentColor. The colors must be shown in the specified order.
   */
  updateProfileAccentColors(array<object_ptr<profileAccentColor>> &&colors_, array<int32> &&available_accent_color_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 605202104;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some language pack strings have been updated.
 */
class updateLanguagePackStrings final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Localization target to which the language pack belongs.
  string localization_target_;
  static jfieldID localization_target_fieldID;
  /// Identifier of the updated language pack.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;
  /// List of changed language pack strings; empty if all strings have changed.
  array<object_ptr<languagePackString>> strings_;
  static jfieldID strings_fieldID;

  /**
   * Some language pack strings have been updated.
   */
  updateLanguagePackStrings();

  /**
   * Some language pack strings have been updated.
   *
   * \param[in] localization_target_ Localization target to which the language pack belongs.
   * \param[in] language_pack_id_ Identifier of the updated language pack.
   * \param[in] strings_ List of changed language pack strings; empty if all strings have changed.
   */
  updateLanguagePackStrings(string const &localization_target_, string const &language_pack_id_, array<object_ptr<languagePackString>> &&strings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1056319886;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The connection state has changed. This update must be used only to show a human-readable description of the connection state.
 */
class updateConnectionState final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new connection state.
  object_ptr<ConnectionState> state_;
  static jfieldID state_fieldID;

  /**
   * The connection state has changed. This update must be used only to show a human-readable description of the connection state.
   */
  updateConnectionState();

  /**
   * The connection state has changed. This update must be used only to show a human-readable description of the connection state.
   *
   * \param[in] state_ The new connection state.
   */
  explicit updateConnectionState(object_ptr<ConnectionState> &&state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1469292078;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The freeze state of the current user's account has changed.
 */
class updateFreezeState final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the account is frozen.
  bool is_frozen_;
  static jfieldID is_frozen_fieldID;
  /// Point in time (Unix timestamp) when the account was frozen; 0 if the account isn't frozen.
  int32 freezing_date_;
  static jfieldID freezing_date_fieldID;
  /// Point in time (Unix timestamp) when the account will be deleted and can't be unfrozen; 0 if the account isn't frozen.
  int32 deletion_date_;
  static jfieldID deletion_date_fieldID;
  /// The link to open to send an appeal to unfreeze the account.
  string appeal_link_;
  static jfieldID appeal_link_fieldID;

  /**
   * The freeze state of the current user's account has changed.
   */
  updateFreezeState();

  /**
   * The freeze state of the current user's account has changed.
   *
   * \param[in] is_frozen_ True, if the account is frozen.
   * \param[in] freezing_date_ Point in time (Unix timestamp) when the account was frozen; 0 if the account isn't frozen.
   * \param[in] deletion_date_ Point in time (Unix timestamp) when the account will be deleted and can't be unfrozen; 0 if the account isn't frozen.
   * \param[in] appeal_link_ The link to open to send an appeal to unfreeze the account.
   */
  updateFreezeState(bool is_frozen_, int32 freezing_date_, int32 deletion_date_, string const &appeal_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1692410540;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The parameters for age verification of the current user's account has changed.
 */
class updateAgeVerificationParameters final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Parameters for the age verification; may be null if age verification isn't needed.
  object_ptr<ageVerificationParameters> parameters_;
  static jfieldID parameters_fieldID;

  /**
   * The parameters for age verification of the current user's account has changed.
   */
  updateAgeVerificationParameters();

  /**
   * The parameters for age verification of the current user's account has changed.
   *
   * \param[in] parameters_ Parameters for the age verification; may be null if age verification isn't needed.
   */
  explicit updateAgeVerificationParameters(object_ptr<ageVerificationParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -49283131;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason &quot;Decline ToS update&quot;.
 */
class updateTermsOfService final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the terms of service.
  string terms_of_service_id_;
  static jfieldID terms_of_service_id_fieldID;
  /// The new terms of service.
  object_ptr<termsOfService> terms_of_service_;
  static jfieldID terms_of_service_fieldID;

  /**
   * New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason &quot;Decline ToS update&quot;.
   */
  updateTermsOfService();

  /**
   * New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason &quot;Decline ToS update&quot;.
   *
   * \param[in] terms_of_service_id_ Identifier of the terms of service.
   * \param[in] terms_of_service_ The new terms of service.
   */
  updateTermsOfService(string const &terms_of_service_id_, object_ptr<termsOfService> &&terms_of_service_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1304640162;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The first unconfirmed session has changed.
 */
class updateUnconfirmedSession final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The unconfirmed session; may be null if none.
  object_ptr<unconfirmedSession> session_;
  static jfieldID session_fieldID;

  /**
   * The first unconfirmed session has changed.
   */
  updateUnconfirmedSession();

  /**
   * The first unconfirmed session has changed.
   *
   * \param[in] session_ The unconfirmed session; may be null if none.
   */
  explicit updateUnconfirmedSession(object_ptr<unconfirmedSession> &&session_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -22673268;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of bots added to attachment or side menu has changed.
 */
class updateAttachmentMenuBots final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of bots. The bots must not be shown on scheduled messages screen.
  array<object_ptr<attachmentMenuBot>> bots_;
  static jfieldID bots_fieldID;

  /**
   * The list of bots added to attachment or side menu has changed.
   */
  updateAttachmentMenuBots();

  /**
   * The list of bots added to attachment or side menu has changed.
   *
   * \param[in] bots_ The new list of bots. The bots must not be shown on scheduled messages screen.
   */
  explicit updateAttachmentMenuBots(array<object_ptr<attachmentMenuBot>> &&bots_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 291369922;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message was sent by an opened Web App, so the Web App needs to be closed.
 */
class updateWebAppMessageSent final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Web App launch.
  int64 web_app_launch_id_;
  static jfieldID web_app_launch_id_fieldID;

  /**
   * A message was sent by an opened Web App, so the Web App needs to be closed.
   */
  updateWebAppMessageSent();

  /**
   * A message was sent by an opened Web App, so the Web App needs to be closed.
   *
   * \param[in] web_app_launch_id_ Identifier of Web App launch.
   */
  explicit updateWebAppMessageSent(int64 web_app_launch_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1480790569;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of active emoji reactions has changed.
 */
class updateActiveEmojiReactions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of active emoji reactions.
  array<string> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * The list of active emoji reactions has changed.
   */
  updateActiveEmojiReactions();

  /**
   * The list of active emoji reactions has changed.
   *
   * \param[in] emojis_ The new list of active emoji reactions.
   */
  explicit updateActiveEmojiReactions(array<string> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 77556818;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of available message effects has changed.
 */
class updateAvailableMessageEffects final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of available message effects from emoji reactions.
  array<int64> reaction_effect_ids_;
  static jfieldID reaction_effect_ids_fieldID;
  /// The new list of available message effects from Premium stickers.
  array<int64> sticker_effect_ids_;
  static jfieldID sticker_effect_ids_fieldID;

  /**
   * The list of available message effects has changed.
   */
  updateAvailableMessageEffects();

  /**
   * The list of available message effects has changed.
   *
   * \param[in] reaction_effect_ids_ The new list of available message effects from emoji reactions.
   * \param[in] sticker_effect_ids_ The new list of available message effects from Premium stickers.
   */
  updateAvailableMessageEffects(array<int64> &&reaction_effect_ids_, array<int64> &&sticker_effect_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1964701061;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The type of default reaction has changed.
 */
class updateDefaultReactionType final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new type of the default reaction.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;

  /**
   * The type of default reaction has changed.
   */
  updateDefaultReactionType();

  /**
   * The type of default reaction has changed.
   *
   * \param[in] reaction_type_ The new type of the default reaction.
   */
  explicit updateDefaultReactionType(object_ptr<ReactionType> &&reaction_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1264668933;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The type of default paid reaction has changed.
 */
class updateDefaultPaidReactionType final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new type of the default paid reaction.
  object_ptr<PaidReactionType> type_;
  static jfieldID type_fieldID;

  /**
   * The type of default paid reaction has changed.
   */
  updateDefaultPaidReactionType();

  /**
   * The type of default paid reaction has changed.
   *
   * \param[in] type_ The new type of the default paid reaction.
   */
  explicit updateDefaultPaidReactionType(object_ptr<PaidReactionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 38198599;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Tags used in Saved Messages or a Saved Messages topic have changed.
 */
class updateSavedMessagesTags final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;
  /// The new tags.
  object_ptr<savedMessagesTags> tags_;
  static jfieldID tags_fieldID;

  /**
   * Tags used in Saved Messages or a Saved Messages topic have changed.
   */
  updateSavedMessagesTags();

  /**
   * Tags used in Saved Messages or a Saved Messages topic have changed.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed.
   * \param[in] tags_ The new tags.
   */
  updateSavedMessagesTags(int53 saved_messages_topic_id_, object_ptr<savedMessagesTags> &&tags_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1938178634;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of messages with active live location that need to be updated by the application has changed. The list is persistent across application restarts only if the message database is used.
 */
class updateActiveLiveLocationMessages final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of messages with active live locations.
  array<object_ptr<message>> messages_;
  static jfieldID messages_fieldID;

  /**
   * The list of messages with active live location that need to be updated by the application has changed. The list is persistent across application restarts only if the message database is used.
   */
  updateActiveLiveLocationMessages();

  /**
   * The list of messages with active live location that need to be updated by the application has changed. The list is persistent across application restarts only if the message database is used.
   *
   * \param[in] messages_ The list of messages with active live locations.
   */
  explicit updateActiveLiveLocationMessages(array<object_ptr<message>> &&messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1308142440;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The number of Telegram Stars owned by the current user has changed.
 */
class updateOwnedStarCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new amount of owned Telegram Stars.
  object_ptr<starAmount> star_amount_;
  static jfieldID star_amount_fieldID;

  /**
   * The number of Telegram Stars owned by the current user has changed.
   */
  updateOwnedStarCount();

  /**
   * The number of Telegram Stars owned by the current user has changed.
   *
   * \param[in] star_amount_ The new amount of owned Telegram Stars.
   */
  explicit updateOwnedStarCount(object_ptr<starAmount> &&star_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1350647928;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The number of Toncoins owned by the current user has changed.
 */
class updateOwnedTonCount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new amount of owned Toncoins; in the smallest units of the cryptocurrency.
  int53 ton_amount_;
  static jfieldID ton_amount_fieldID;

  /**
   * The number of Toncoins owned by the current user has changed.
   */
  updateOwnedTonCount();

  /**
   * The number of Toncoins owned by the current user has changed.
   *
   * \param[in] ton_amount_ The new amount of owned Toncoins; in the smallest units of the cryptocurrency.
   */
  explicit updateOwnedTonCount(int53 ton_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1102136345;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions.
 */
class updateChatRevenueAmount final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New amount of earned revenue.
  object_ptr<chatRevenueAmount> revenue_amount_;
  static jfieldID revenue_amount_fieldID;

  /**
   * The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions.
   */
  updateChatRevenueAmount();

  /**
   * The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] revenue_amount_ New amount of earned revenue.
   */
  updateChatRevenueAmount(int53 chat_id_, object_ptr<chatRevenueAmount> &&revenue_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -959857468;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Telegram Star revenue earned by a user or a chat has changed. If Telegram Star transaction screen of the chat is opened, then getStarTransactions may be called to fetch new transactions.
 */
class updateStarRevenueStatus final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owner of the Telegram Stars.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// New Telegram Star revenue status.
  object_ptr<starRevenueStatus> status_;
  static jfieldID status_fieldID;

  /**
   * The Telegram Star revenue earned by a user or a chat has changed. If Telegram Star transaction screen of the chat is opened, then getStarTransactions may be called to fetch new transactions.
   */
  updateStarRevenueStatus();

  /**
   * The Telegram Star revenue earned by a user or a chat has changed. If Telegram Star transaction screen of the chat is opened, then getStarTransactions may be called to fetch new transactions.
   *
   * \param[in] owner_id_ Identifier of the owner of the Telegram Stars.
   * \param[in] status_ New Telegram Star revenue status.
   */
  updateStarRevenueStatus(object_ptr<MessageSender> &&owner_id_, object_ptr<starRevenueStatus> &&status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -280232757;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Toncoin revenue earned by the current user has changed. If Toncoin transaction screen of the chat is opened, then getTonTransactions may be called to fetch new transactions.
 */
class updateTonRevenueStatus final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New Toncoin revenue status.
  object_ptr<tonRevenueStatus> status_;
  static jfieldID status_fieldID;

  /**
   * The Toncoin revenue earned by the current user has changed. If Toncoin transaction screen of the chat is opened, then getTonTransactions may be called to fetch new transactions.
   */
  updateTonRevenueStatus();

  /**
   * The Toncoin revenue earned by the current user has changed. If Toncoin transaction screen of the chat is opened, then getTonTransactions may be called to fetch new transactions.
   *
   * \param[in] status_ New Toncoin revenue status.
   */
  explicit updateTonRevenueStatus(object_ptr<tonRevenueStatus> &&status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1832579994;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The parameters of speech recognition without Telegram Premium subscription has changed.
 */
class updateSpeechRecognitionTrial final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum allowed duration of media for speech recognition without Telegram Premium subscription, in seconds.
  int32 max_media_duration_;
  static jfieldID max_media_duration_fieldID;
  /// The total number of allowed speech recognitions per week; 0 if none.
  int32 weekly_count_;
  static jfieldID weekly_count_fieldID;
  /// Number of left speech recognition attempts this week.
  int32 left_count_;
  static jfieldID left_count_fieldID;
  /// Point in time (Unix timestamp) when the weekly number of tries will reset; 0 if unknown.
  int32 next_reset_date_;
  static jfieldID next_reset_date_fieldID;

  /**
   * The parameters of speech recognition without Telegram Premium subscription has changed.
   */
  updateSpeechRecognitionTrial();

  /**
   * The parameters of speech recognition without Telegram Premium subscription has changed.
   *
   * \param[in] max_media_duration_ The maximum allowed duration of media for speech recognition without Telegram Premium subscription, in seconds.
   * \param[in] weekly_count_ The total number of allowed speech recognitions per week; 0 if none.
   * \param[in] left_count_ Number of left speech recognition attempts this week.
   * \param[in] next_reset_date_ Point in time (Unix timestamp) when the weekly number of tries will reset; 0 if unknown.
   */
  updateSpeechRecognitionTrial(int32 max_media_duration_, int32 weekly_count_, int32 left_count_, int32 next_reset_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -11600703;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The levels of live story group call messages have changed.
 */
class updateGroupCallMessageLevels final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New description of the levels in decreasing order of groupCallMessageLevel.min_star_count.
  array<object_ptr<groupCallMessageLevel>> levels_;
  static jfieldID levels_fieldID;

  /**
   * The levels of live story group call messages have changed.
   */
  updateGroupCallMessageLevels();

  /**
   * The levels of live story group call messages have changed.
   *
   * \param[in] levels_ New description of the levels in decreasing order of groupCallMessageLevel.min_star_count.
   */
  explicit updateGroupCallMessageLevels(array<object_ptr<groupCallMessageLevel>> &&levels_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -882998951;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of supported dice emojis has changed.
 */
class updateDiceEmojis final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of supported dice emojis.
  array<string> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * The list of supported dice emojis has changed.
   */
  updateDiceEmojis();

  /**
   * The list of supported dice emojis has changed.
   *
   * \param[in] emojis_ The new list of supported dice emojis.
   */
  explicit updateDiceEmojis(array<string> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1069066940;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The stake dice state has changed.
 */
class updateStakeDiceState final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new state. The state can be used only if it was received recently enough. Otherwise, a new state must be requested using getStakeDiceState.
  object_ptr<stakeDiceState> state_;
  static jfieldID state_fieldID;

  /**
   * The stake dice state has changed.
   */
  updateStakeDiceState();

  /**
   * The stake dice state has changed.
   *
   * \param[in] state_ The new state. The state can be used only if it was received recently enough. Otherwise, a new state must be requested using getStakeDiceState.
   */
  explicit updateStakeDiceState(object_ptr<stakeDiceState> &&state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -739631973;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played.
 */
class updateAnimatedEmojiMessageClicked final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The animated sticker to be played.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played.
   */
  updateAnimatedEmojiMessageClicked();

  /**
   * Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] sticker_ The animated sticker to be played.
   */
  updateAnimatedEmojiMessageClicked(int53 chat_id_, int53 message_id_, object_ptr<sticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1558809595;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The parameters of animation search through getOption(&quot;animation_search_bot_username&quot;) bot has changed.
 */
class updateAnimationSearchParameters final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the animation search provider.
  string provider_;
  static jfieldID provider_fieldID;
  /// The new list of emojis suggested for searching.
  array<string> emojis_;
  static jfieldID emojis_fieldID;

  /**
   * The parameters of animation search through getOption(&quot;animation_search_bot_username&quot;) bot has changed.
   */
  updateAnimationSearchParameters();

  /**
   * The parameters of animation search through getOption(&quot;animation_search_bot_username&quot;) bot has changed.
   *
   * \param[in] provider_ Name of the animation search provider.
   * \param[in] emojis_ The new list of emojis suggested for searching.
   */
  updateAnimationSearchParameters(string const &provider_, array<string> &&emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1144983202;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The styles supported for text composition have changed.
 */
class updateTextCompositionStyles final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of supported styles.
  array<object_ptr<textCompositionStyle>> styles_;
  static jfieldID styles_fieldID;

  /**
   * The styles supported for text composition have changed.
   */
  updateTextCompositionStyles();

  /**
   * The styles supported for text composition have changed.
   *
   * \param[in] styles_ The new list of supported styles.
   */
  explicit updateTextCompositionStyles(array<object_ptr<textCompositionStyle>> &&styles_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -481267771;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of suggested to the user actions has changed.
 */
class updateSuggestedActions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Added suggested actions.
  array<object_ptr<SuggestedAction>> added_actions_;
  static jfieldID added_actions_fieldID;
  /// Removed suggested actions.
  array<object_ptr<SuggestedAction>> removed_actions_;
  static jfieldID removed_actions_fieldID;

  /**
   * The list of suggested to the user actions has changed.
   */
  updateSuggestedActions();

  /**
   * The list of suggested to the user actions has changed.
   *
   * \param[in] added_actions_ Added suggested actions.
   * \param[in] removed_actions_ Removed suggested actions.
   */
  updateSuggestedActions(array<object_ptr<SuggestedAction>> &&added_actions_, array<object_ptr<SuggestedAction>> &&removed_actions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1459452346;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Download or upload file speed for the user was limited, but it can be restored by subscription to Telegram Premium. The notification can be postponed until a being downloaded or uploaded file is visible to the user. Use getOption(&quot;premium_download_speedup&quot;) or getOption(&quot;premium_upload_speedup&quot;) to get expected speedup after subscription to Telegram Premium.
 */
class updateSpeedLimitNotification final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if upload speed was limited; false, if download speed was limited.
  bool is_upload_;
  static jfieldID is_upload_fieldID;

  /**
   * Download or upload file speed for the user was limited, but it can be restored by subscription to Telegram Premium. The notification can be postponed until a being downloaded or uploaded file is visible to the user. Use getOption(&quot;premium_download_speedup&quot;) or getOption(&quot;premium_upload_speedup&quot;) to get expected speedup after subscription to Telegram Premium.
   */
  updateSpeedLimitNotification();

  /**
   * Download or upload file speed for the user was limited, but it can be restored by subscription to Telegram Premium. The notification can be postponed until a being downloaded or uploaded file is visible to the user. Use getOption(&quot;premium_download_speedup&quot;) or getOption(&quot;premium_upload_speedup&quot;) to get expected speedup after subscription to Telegram Premium.
   *
   * \param[in] is_upload_ True, if upload speed was limited; false, if download speed was limited.
   */
  explicit updateSpeedLimitNotification(bool is_upload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -964437912;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The list of contacts that had birthdays recently or will have birthday soon has changed.
 */
class updateContactCloseBirthdays final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of contact users with close birthday.
  array<object_ptr<closeBirthdayUser>> close_birthday_users_;
  static jfieldID close_birthday_users_fieldID;

  /**
   * The list of contacts that had birthdays recently or will have birthday soon has changed.
   */
  updateContactCloseBirthdays();

  /**
   * The list of contacts that had birthdays recently or will have birthday soon has changed.
   *
   * \param[in] close_birthday_users_ List of contact users with close birthday.
   */
  explicit updateContactCloseBirthdays(array<object_ptr<closeBirthdayUser>> &&close_birthday_users_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -36007873;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Autosave settings for some type of chats were updated.
 */
class updateAutosaveSettings final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of chats for which autosave settings were updated.
  object_ptr<AutosaveSettingsScope> scope_;
  static jfieldID scope_fieldID;
  /// The new autosave settings; may be null if the settings are reset to default.
  object_ptr<scopeAutosaveSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Autosave settings for some type of chats were updated.
   */
  updateAutosaveSettings();

  /**
   * Autosave settings for some type of chats were updated.
   *
   * \param[in] scope_ Type of chats for which autosave settings were updated.
   * \param[in] settings_ The new autosave settings; may be null if the settings are reset to default.
   */
  updateAutosaveSettings(object_ptr<AutosaveSettingsScope> &&scope_, object_ptr<scopeAutosaveSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -634958069;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A business connection has changed; for bots only.
 */
class updateBusinessConnection final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the connection.
  object_ptr<businessConnection> connection_;
  static jfieldID connection_fieldID;

  /**
   * A business connection has changed; for bots only.
   */
  updateBusinessConnection();

  /**
   * A business connection has changed; for bots only.
   *
   * \param[in] connection_ New data about the connection.
   */
  explicit updateBusinessConnection(object_ptr<businessConnection> &&connection_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2043480970;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new message was added to a business account; for bots only.
 */
class updateNewBusinessMessage final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the business connection.
  string connection_id_;
  static jfieldID connection_id_fieldID;
  /// The new message.
  object_ptr<businessMessage> message_;
  static jfieldID message_fieldID;

  /**
   * A new message was added to a business account; for bots only.
   */
  updateNewBusinessMessage();

  /**
   * A new message was added to a business account; for bots only.
   *
   * \param[in] connection_id_ Unique identifier of the business connection.
   * \param[in] message_ The new message.
   */
  updateNewBusinessMessage(string const &connection_id_, object_ptr<businessMessage> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2034350524;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A message in a business account was edited; for bots only.
 */
class updateBusinessMessageEdited final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the business connection.
  string connection_id_;
  static jfieldID connection_id_fieldID;
  /// The edited message.
  object_ptr<businessMessage> message_;
  static jfieldID message_fieldID;

  /**
   * A message in a business account was edited; for bots only.
   */
  updateBusinessMessageEdited();

  /**
   * A message in a business account was edited; for bots only.
   *
   * \param[in] connection_id_ Unique identifier of the business connection.
   * \param[in] message_ The edited message.
   */
  updateBusinessMessageEdited(string const &connection_id_, object_ptr<businessMessage> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2119799415;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Messages in a business account were deleted; for bots only.
 */
class updateBusinessMessagesDeleted final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the business connection.
  string connection_id_;
  static jfieldID connection_id_fieldID;
  /// Identifier of a chat in the business account in which messages were deleted.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Unique message identifiers of the deleted messages.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Messages in a business account were deleted; for bots only.
   */
  updateBusinessMessagesDeleted();

  /**
   * Messages in a business account were deleted; for bots only.
   *
   * \param[in] connection_id_ Unique identifier of the business connection.
   * \param[in] chat_id_ Identifier of a chat in the business account in which messages were deleted.
   * \param[in] message_ids_ Unique message identifiers of the deleted messages.
   */
  updateBusinessMessagesDeleted(string const &connection_id_, int53 chat_id_, array<int53> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1106703050;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming inline query; for bots only.
 */
class updateNewInlineQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// User location; may be null.
  object_ptr<location> user_location_;
  static jfieldID user_location_fieldID;
  /// The type of the chat from which the query originated; may be null if unknown.
  object_ptr<ChatType> chat_type_;
  static jfieldID chat_type_fieldID;
  /// Text of the query.
  string query_;
  static jfieldID query_fieldID;
  /// Offset of the first entry to return.
  string offset_;
  static jfieldID offset_fieldID;

  /**
   * A new incoming inline query; for bots only.
   */
  updateNewInlineQuery();

  /**
   * A new incoming inline query; for bots only.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] user_location_ User location; may be null.
   * \param[in] chat_type_ The type of the chat from which the query originated; may be null if unknown.
   * \param[in] query_ Text of the query.
   * \param[in] offset_ Offset of the first entry to return.
   */
  updateNewInlineQuery(int64 id_, int53 sender_user_id_, object_ptr<location> &&user_location_, object_ptr<ChatType> &&chat_type_, string const &query_, string const &offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1903279924;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user has chosen a result of an inline query; for bots only.
 */
class updateNewChosenInlineResult final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// User location; may be null.
  object_ptr<location> user_location_;
  static jfieldID user_location_fieldID;
  /// Text of the query.
  string query_;
  static jfieldID query_fieldID;
  /// Identifier of the chosen result.
  string result_id_;
  static jfieldID result_id_fieldID;
  /// Identifier of the sent inline message, if known.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;

  /**
   * The user has chosen a result of an inline query; for bots only.
   */
  updateNewChosenInlineResult();

  /**
   * The user has chosen a result of an inline query; for bots only.
   *
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] user_location_ User location; may be null.
   * \param[in] query_ Text of the query.
   * \param[in] result_id_ Identifier of the chosen result.
   * \param[in] inline_message_id_ Identifier of the sent inline message, if known.
   */
  updateNewChosenInlineResult(int53 sender_user_id_, object_ptr<location> &&user_location_, string const &query_, string const &result_id_, string const &inline_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -884191395;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming guest query; for bots only.
 */
class updateNewGuestQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// The message with the query.
  object_ptr<message> message_;
  static jfieldID message_fieldID;
  /// The list of reference messages.
  array<object_ptr<message>> reference_messages_;
  static jfieldID reference_messages_fieldID;

  /**
   * A new incoming guest query; for bots only.
   */
  updateNewGuestQuery();

  /**
   * A new incoming guest query; for bots only.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] message_ The message with the query.
   * \param[in] reference_messages_ The list of reference messages.
   */
  updateNewGuestQuery(int64 id_, object_ptr<message> &&message_, array<object_ptr<message>> &&reference_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1489540905;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming callback query; for bots only.
 */
class updateNewCallbackQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// Identifier of the chat where the query was sent.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message from which the query originated.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier that uniquely corresponds to the chat to which the message was sent.
  int64 chat_instance_;
  static jfieldID chat_instance_fieldID;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;
  static jfieldID payload_fieldID;

  /**
   * A new incoming callback query; for bots only.
   */
  updateNewCallbackQuery();

  /**
   * A new incoming callback query; for bots only.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] chat_id_ Identifier of the chat where the query was sent.
   * \param[in] message_id_ Identifier of the message from which the query originated.
   * \param[in] chat_instance_ Identifier that uniquely corresponds to the chat to which the message was sent.
   * \param[in] payload_ Query payload.
   */
  updateNewCallbackQuery(int64 id_, int53 sender_user_id_, int53 chat_id_, int53 message_id_, int64 chat_instance_, object_ptr<CallbackQueryPayload> &&payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1989881762;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming callback query from a message sent via a bot; for bots only.
 */
class updateNewInlineCallbackQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// Identifier of the inline message from which the query originated.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// An identifier uniquely corresponding to the chat a message was sent to.
  int64 chat_instance_;
  static jfieldID chat_instance_fieldID;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;
  static jfieldID payload_fieldID;

  /**
   * A new incoming callback query from a message sent via a bot; for bots only.
   */
  updateNewInlineCallbackQuery();

  /**
   * A new incoming callback query from a message sent via a bot; for bots only.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] inline_message_id_ Identifier of the inline message from which the query originated.
   * \param[in] chat_instance_ An identifier uniquely corresponding to the chat a message was sent to.
   * \param[in] payload_ Query payload.
   */
  updateNewInlineCallbackQuery(int64 id_, int53 sender_user_id_, string const &inline_message_id_, int64 chat_instance_, object_ptr<CallbackQueryPayload> &&payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -319212358;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming callback query from a business message; for bots only.
 */
class updateNewBusinessCallbackQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// Unique identifier of the business connection.
  string connection_id_;
  static jfieldID connection_id_fieldID;
  /// The message from the business account from which the query originated.
  object_ptr<businessMessage> message_;
  static jfieldID message_fieldID;
  /// An identifier uniquely corresponding to the chat a message was sent to.
  int64 chat_instance_;
  static jfieldID chat_instance_fieldID;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;
  static jfieldID payload_fieldID;

  /**
   * A new incoming callback query from a business message; for bots only.
   */
  updateNewBusinessCallbackQuery();

  /**
   * A new incoming callback query from a business message; for bots only.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] connection_id_ Unique identifier of the business connection.
   * \param[in] message_ The message from the business account from which the query originated.
   * \param[in] chat_instance_ An identifier uniquely corresponding to the chat a message was sent to.
   * \param[in] payload_ Query payload.
   */
  updateNewBusinessCallbackQuery(int64 id_, int53 sender_user_id_, string const &connection_id_, object_ptr<businessMessage> &&message_, int64 chat_instance_, object_ptr<CallbackQueryPayload> &&payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 336745316;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming shipping query; for bots only. Only for invoices with flexible price.
 */
class updateNewShippingQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// Invoice payload.
  string invoice_payload_;
  static jfieldID invoice_payload_fieldID;
  /// User shipping address.
  object_ptr<address> shipping_address_;
  static jfieldID shipping_address_fieldID;

  /**
   * A new incoming shipping query; for bots only. Only for invoices with flexible price.
   */
  updateNewShippingQuery();

  /**
   * A new incoming shipping query; for bots only. Only for invoices with flexible price.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] invoice_payload_ Invoice payload.
   * \param[in] shipping_address_ User shipping address.
   */
  updateNewShippingQuery(int64 id_, int53 sender_user_id_, string const &invoice_payload_, object_ptr<address> &&shipping_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 693651058;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming pre-checkout query; for bots only. Contains full information about a checkout.
 */
class updateNewPreCheckoutQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// Identifier of the user who sent the query.
  int53 sender_user_id_;
  static jfieldID sender_user_id_fieldID;
  /// Currency for the product price.
  string currency_;
  static jfieldID currency_fieldID;
  /// Total price for the product, in the smallest units of the currency.
  int53 total_amount_;
  static jfieldID total_amount_fieldID;
  /// Invoice payload.
  bytes invoice_payload_;
  static jfieldID invoice_payload_fieldID;
  /// Identifier of a shipping option chosen by the user; may be empty if not applicable.
  string shipping_option_id_;
  static jfieldID shipping_option_id_fieldID;
  /// Information about the order; may be null.
  object_ptr<orderInfo> order_info_;
  static jfieldID order_info_fieldID;

  /**
   * A new incoming pre-checkout query; for bots only. Contains full information about a checkout.
   */
  updateNewPreCheckoutQuery();

  /**
   * A new incoming pre-checkout query; for bots only. Contains full information about a checkout.
   *
   * \param[in] id_ Unique query identifier.
   * \param[in] sender_user_id_ Identifier of the user who sent the query.
   * \param[in] currency_ Currency for the product price.
   * \param[in] total_amount_ Total price for the product, in the smallest units of the currency.
   * \param[in] invoice_payload_ Invoice payload.
   * \param[in] shipping_option_id_ Identifier of a shipping option chosen by the user; may be empty if not applicable.
   * \param[in] order_info_ Information about the order; may be null.
   */
  updateNewPreCheckoutQuery(int64 id_, int53 sender_user_id_, string const &currency_, int53 total_amount_, bytes const &invoice_payload_, string const &shipping_option_id_, object_ptr<orderInfo> &&order_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 708342217;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming event; for bots only.
 */
class updateNewCustomEvent final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A JSON-serialized event.
  string event_;
  static jfieldID event_fieldID;

  /**
   * A new incoming event; for bots only.
   */
  updateNewCustomEvent();

  /**
   * A new incoming event; for bots only.
   *
   * \param[in] event_ A JSON-serialized event.
   */
  explicit updateNewCustomEvent(string const &event_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1994222092;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A new incoming query; for bots only.
 */
class updateNewCustomQuery final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The query identifier.
  int64 id_;
  static jfieldID id_fieldID;
  /// JSON-serialized query data.
  string data_;
  static jfieldID data_fieldID;
  /// Query timeout.
  int32 timeout_;
  static jfieldID timeout_fieldID;

  /**
   * A new incoming query; for bots only.
   */
  updateNewCustomQuery();

  /**
   * A new incoming query; for bots only.
   *
   * \param[in] id_ The query identifier.
   * \param[in] data_ JSON-serialized query data.
   * \param[in] timeout_ Query timeout.
   */
  updateNewCustomQuery(int64 id_, string const &data_, int32 timeout_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -687670874;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A poll was updated; for bots only.
 */
class updatePoll final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New data about the poll.
  object_ptr<poll> poll_;
  static jfieldID poll_fieldID;

  /**
   * A poll was updated; for bots only.
   */
  updatePoll();

  /**
   * A poll was updated; for bots only.
   *
   * \param[in] poll_ New data about the poll.
   */
  explicit updatePoll(object_ptr<poll> &&poll_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1771342902;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user changed the answer to a poll; for bots only.
 */
class updatePollAnswer final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique poll identifier.
  int64 poll_id_;
  static jfieldID poll_id_fieldID;
  /// Identifier of the message sender that changed the answer to the poll.
  object_ptr<MessageSender> voter_id_;
  static jfieldID voter_id_fieldID;
  /// Unique identifiers of answer options, that were chosen by the user.
  array<string> option_ids_;
  static jfieldID option_ids_fieldID;
  /// 0-based identifiers of answer options, that were chosen by the user.
  array<int32> option_positions_;
  static jfieldID option_positions_fieldID;

  /**
   * A user changed the answer to a poll; for bots only.
   */
  updatePollAnswer();

  /**
   * A user changed the answer to a poll; for bots only.
   *
   * \param[in] poll_id_ Unique poll identifier.
   * \param[in] voter_id_ Identifier of the message sender that changed the answer to the poll.
   * \param[in] option_ids_ Unique identifiers of answer options, that were chosen by the user.
   * \param[in] option_positions_ 0-based identifiers of answer options, that were chosen by the user.
   */
  updatePollAnswer(int64 poll_id_, object_ptr<MessageSender> &&voter_id_, array<string> &&option_ids_, array<int32> &&option_positions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1334893971;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bot that can be managed by the current bot was created or updated; for bots only.
 */
class updateManagedBot final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who created the bot.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Identifier of the created managed bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * A bot that can be managed by the current bot was created or updated; for bots only.
   */
  updateManagedBot();

  /**
   * A bot that can be managed by the current bot was created or updated; for bots only.
   *
   * \param[in] user_id_ Identifier of the user who created the bot.
   * \param[in] bot_user_id_ Identifier of the created managed bot.
   */
  updateManagedBot(int53 user_id_, int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1388678066;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * User rights changed in a chat; for bots only.
 */
class updateChatMember final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the user, changing the rights.
  int53 actor_user_id_;
  static jfieldID actor_user_id_fieldID;
  /// Point in time (Unix timestamp) when the user rights were changed.
  int32 date_;
  static jfieldID date_fieldID;
  /// If user has joined the chat using an invite link, the invite link; may be null.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;
  /// True, if the user has joined the chat after sending a join request and being approved by an administrator.
  bool via_join_request_;
  static jfieldID via_join_request_fieldID;
  /// True, if the user has joined the chat using an invite link for a chat folder.
  bool via_chat_folder_invite_link_;
  static jfieldID via_chat_folder_invite_link_fieldID;
  /// Previous chat member.
  object_ptr<chatMember> old_chat_member_;
  static jfieldID old_chat_member_fieldID;
  /// New chat member.
  object_ptr<chatMember> new_chat_member_;
  static jfieldID new_chat_member_fieldID;

  /**
   * User rights changed in a chat; for bots only.
   */
  updateChatMember();

  /**
   * User rights changed in a chat; for bots only.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] actor_user_id_ Identifier of the user, changing the rights.
   * \param[in] date_ Point in time (Unix timestamp) when the user rights were changed.
   * \param[in] invite_link_ If user has joined the chat using an invite link, the invite link; may be null.
   * \param[in] via_join_request_ True, if the user has joined the chat after sending a join request and being approved by an administrator.
   * \param[in] via_chat_folder_invite_link_ True, if the user has joined the chat using an invite link for a chat folder.
   * \param[in] old_chat_member_ Previous chat member.
   * \param[in] new_chat_member_ New chat member.
   */
  updateChatMember(int53 chat_id_, int53 actor_user_id_, int32 date_, object_ptr<chatInviteLink> &&invite_link_, bool via_join_request_, bool via_chat_folder_invite_link_, object_ptr<chatMember> &&old_chat_member_, object_ptr<chatMember> &&new_chat_member_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1736025145;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A user sent a join request to a chat; for bots only.
 */
class updateNewChatJoinRequest final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Join request.
  object_ptr<chatJoinRequest> request_;
  static jfieldID request_fieldID;
  /// Chat identifier of the private chat with the user.
  int53 user_chat_id_;
  static jfieldID user_chat_id_fieldID;
  /// The invite link, which was used to send join request; may be null.
  object_ptr<chatInviteLink> invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * A user sent a join request to a chat; for bots only.
   */
  updateNewChatJoinRequest();

  /**
   * A user sent a join request to a chat; for bots only.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] request_ Join request.
   * \param[in] user_chat_id_ Chat identifier of the private chat with the user.
   * \param[in] invite_link_ The invite link, which was used to send join request; may be null.
   */
  updateNewChatJoinRequest(int53 chat_id_, object_ptr<chatJoinRequest> &&request_, int53 user_chat_id_, object_ptr<chatInviteLink> &&invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2118694979;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A chat boost has changed; for bots only.
 */
class updateChatBoost final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New information about the boost.
  object_ptr<chatBoost> boost_;
  static jfieldID boost_fieldID;

  /**
   * A chat boost has changed; for bots only.
   */
  updateChatBoost();

  /**
   * A chat boost has changed; for bots only.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] boost_ New information about the boost.
   */
  updateChatBoost(int53 chat_id_, object_ptr<chatBoost> &&boost_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1349680676;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * User changed its reactions on a message with public reactions; for bots only.
 */
class updateMessageReaction final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the user or chat that changed reactions.
  object_ptr<MessageSender> actor_id_;
  static jfieldID actor_id_fieldID;
  /// Point in time (Unix timestamp) when the reactions were changed.
  int32 date_;
  static jfieldID date_fieldID;
  /// Old list of chosen reactions.
  array<object_ptr<ReactionType>> old_reaction_types_;
  static jfieldID old_reaction_types_fieldID;
  /// New list of chosen reactions.
  array<object_ptr<ReactionType>> new_reaction_types_;
  static jfieldID new_reaction_types_fieldID;

  /**
   * User changed its reactions on a message with public reactions; for bots only.
   */
  updateMessageReaction();

  /**
   * User changed its reactions on a message with public reactions; for bots only.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] actor_id_ Identifier of the user or chat that changed reactions.
   * \param[in] date_ Point in time (Unix timestamp) when the reactions were changed.
   * \param[in] old_reaction_types_ Old list of chosen reactions.
   * \param[in] new_reaction_types_ New list of chosen reactions.
   */
  updateMessageReaction(int53 chat_id_, int53 message_id_, object_ptr<MessageSender> &&actor_id_, int32 date_, array<object_ptr<ReactionType>> &&old_reaction_types_, array<object_ptr<ReactionType>> &&new_reaction_types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1084895706;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Reactions added to a message with anonymous reactions have changed; for bots only.
 */
class updateMessageReactions final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Point in time (Unix timestamp) when the reactions were changed.
  int32 date_;
  static jfieldID date_fieldID;
  /// The list of reactions added to the message.
  array<object_ptr<messageReaction>> reactions_;
  static jfieldID reactions_fieldID;

  /**
   * Reactions added to a message with anonymous reactions have changed; for bots only.
   */
  updateMessageReactions();

  /**
   * Reactions added to a message with anonymous reactions have changed; for bots only.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] date_ Point in time (Unix timestamp) when the reactions were changed.
   * \param[in] reactions_ The list of reactions added to the message.
   */
  updateMessageReactions(int53 chat_id_, int53 message_id_, int32 date_, array<object_ptr<messageReaction>> &&reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 955237189;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Paid media were purchased by a user; for bots only.
 */
class updatePaidMediaPurchased final : public Update {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Bot-specified payload for the paid media.
  string payload_;
  static jfieldID payload_fieldID;

  /**
   * Paid media were purchased by a user; for bots only.
   */
  updatePaidMediaPurchased();

  /**
   * Paid media were purchased by a user; for bots only.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] payload_ Bot-specified payload for the paid media.
   */
  updatePaidMediaPurchased(int53 user_id_, string const &payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1542396325;

  static object_ptr<Update> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class Update;

/**
 * Contains a list of updates.
 */
class updates final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of updates.
  array<object_ptr<Update>> updates_;
  static jfieldID updates_fieldID;

  /**
   * Contains a list of updates.
   */
  updates();

  /**
   * Contains a list of updates.
   *
   * \param[in] updates_ List of updates.
   */
  explicit updates(array<object_ptr<Update>> &&updates_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 475842347;

  static object_ptr<updates> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGift;

/**
 * Contains result of gift upgrading.
 */
class upgradeGiftResult final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The upgraded gift.
  object_ptr<upgradedGift> gift_;
  static jfieldID gift_fieldID;
  /// Unique identifier of the received gift for the current user.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// True, if the gift is displayed on the user's or the channel's profile page.
  bool is_saved_;
  static jfieldID is_saved_fieldID;
  /// True, if the gift can be transferred to another owner.
  bool can_be_transferred_;
  static jfieldID can_be_transferred_fieldID;
  /// Number of Telegram Stars that must be paid to transfer the upgraded gift.
  int53 transfer_star_count_;
  static jfieldID transfer_star_count_fieldID;
  /// Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available.
  int53 drop_original_details_star_count_;
  static jfieldID drop_original_details_star_count_fieldID;
  /// Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible.
  int32 next_transfer_date_;
  static jfieldID next_transfer_date_fieldID;
  /// Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift.
  int32 next_resale_date_;
  static jfieldID next_resale_date_fieldID;
  /// Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; can be in the past.
  int32 export_date_;
  static jfieldID export_date_fieldID;

  /**
   * Contains result of gift upgrading.
   */
  upgradeGiftResult();

  /**
   * Contains result of gift upgrading.
   *
   * \param[in] gift_ The upgraded gift.
   * \param[in] received_gift_id_ Unique identifier of the received gift for the current user.
   * \param[in] is_saved_ True, if the gift is displayed on the user's or the channel's profile page.
   * \param[in] can_be_transferred_ True, if the gift can be transferred to another owner.
   * \param[in] transfer_star_count_ Number of Telegram Stars that must be paid to transfer the upgraded gift.
   * \param[in] drop_original_details_star_count_ Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available.
   * \param[in] next_transfer_date_ Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible.
   * \param[in] next_resale_date_ Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift.
   * \param[in] export_date_ Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; can be in the past.
   */
  upgradeGiftResult(object_ptr<upgradedGift> &&gift_, string const &received_gift_id_, bool is_saved_, bool can_be_transferred_, int53 transfer_star_count_, int53 drop_original_details_star_count_, int32 next_transfer_date_, int32 next_resale_date_, int32 export_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 965145418;

  static object_ptr<upgradeGiftResult> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftResaleParameters;

class upgradedGiftBackdrop;

class upgradedGiftColors;

class upgradedGiftModel;

class upgradedGiftOriginalDetails;

class upgradedGiftSymbol;

/**
 * Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
 */
class upgradedGift final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the gift.
  int64 id_;
  static jfieldID id_fieldID;
  /// Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.
  int64 regular_gift_id_;
  static jfieldID regular_gift_id_fieldID;
  /// Identifier of the chat that published the gift; 0 if none.
  int53 publisher_chat_id_;
  static jfieldID publisher_chat_id_fieldID;
  /// The title of the upgraded gift.
  string title_;
  static jfieldID title_fieldID;
  /// Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.
  string name_;
  static jfieldID name_fieldID;
  /// Unique number of the upgraded gift among gifts upgraded from the same gift.
  int32 number_;
  static jfieldID number_fieldID;
  /// Total number of gifts that were upgraded from the same gift.
  int32 total_upgraded_count_;
  static jfieldID total_upgraded_count_fieldID;
  /// The maximum number of gifts that can be upgraded from the same gift.
  int32 max_upgraded_count_;
  static jfieldID max_upgraded_count_fieldID;
  /// True, if the gift was used to craft another gift.
  bool is_burned_;
  static jfieldID is_burned_fieldID;
  /// True, if the gift was craft from another gifts.
  bool is_crafted_;
  static jfieldID is_crafted_fieldID;
  /// True, if the original gift could have been bought only by Telegram Premium subscribers.
  bool is_premium_;
  static jfieldID is_premium_fieldID;
  /// True, if the gift can be used to set a theme in a chat.
  bool is_theme_available_;
  static jfieldID is_theme_available_fieldID;
  /// Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.
  int53 used_theme_chat_id_;
  static jfieldID used_theme_chat_id_fieldID;
  /// Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.
  object_ptr<MessageSender> host_id_;
  static jfieldID host_id_fieldID;
  /// Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption(&quot;ton_blockchain_explorer_url&quot;) to get a link with information about the address.
  string owner_address_;
  static jfieldID owner_address_fieldID;
  /// Name of the owner for the case when owner identifier and address aren't known.
  string owner_name_;
  static jfieldID owner_name_fieldID;
  /// Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption(&quot;ton_blockchain_explorer_url&quot;) to get a link with information about the address.
  string gift_address_;
  static jfieldID gift_address_fieldID;
  /// Model of the upgraded gift.
  object_ptr<upgradedGiftModel> model_;
  static jfieldID model_fieldID;
  /// Symbol of the upgraded gift.
  object_ptr<upgradedGiftSymbol> symbol_;
  static jfieldID symbol_fieldID;
  /// Backdrop of the upgraded gift.
  object_ptr<upgradedGiftBackdrop> backdrop_;
  static jfieldID backdrop_fieldID;
  /// Information about the originally sent gift; may be null if unknown.
  object_ptr<upgradedGiftOriginalDetails> original_details_;
  static jfieldID original_details_fieldID;
  /// Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown.
  object_ptr<upgradedGiftColors> colors_;
  static jfieldID colors_fieldID;
  /// Resale parameters of the gift; may be null if resale isn't possible.
  object_ptr<giftResaleParameters> resale_parameters_;
  static jfieldID resale_parameters_fieldID;
  /// True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.
  bool can_send_purchase_offer_;
  static jfieldID can_send_purchase_offer_fieldID;
  /// Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting.
  int32 craft_probability_per_mille_;
  static jfieldID craft_probability_per_mille_fieldID;
  /// ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.
  string value_currency_;
  static jfieldID value_currency_fieldID;
  /// Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.
  int53 value_amount_;
  static jfieldID value_amount_fieldID;
  /// Estimated value of the gift in USD; in USD cents; 0 if unavailable.
  int53 value_usd_amount_;
  static jfieldID value_usd_amount_fieldID;

  /**
   * Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
   */
  upgradedGift();

  /**
   * Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
   *
   * \param[in] id_ Unique identifier of the gift.
   * \param[in] regular_gift_id_ Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.
   * \param[in] publisher_chat_id_ Identifier of the chat that published the gift; 0 if none.
   * \param[in] title_ The title of the upgraded gift.
   * \param[in] name_ Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.
   * \param[in] number_ Unique number of the upgraded gift among gifts upgraded from the same gift.
   * \param[in] total_upgraded_count_ Total number of gifts that were upgraded from the same gift.
   * \param[in] max_upgraded_count_ The maximum number of gifts that can be upgraded from the same gift.
   * \param[in] is_burned_ True, if the gift was used to craft another gift.
   * \param[in] is_crafted_ True, if the gift was craft from another gifts.
   * \param[in] is_premium_ True, if the original gift could have been bought only by Telegram Premium subscribers.
   * \param[in] is_theme_available_ True, if the gift can be used to set a theme in a chat.
   * \param[in] used_theme_chat_id_ Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.
   * \param[in] host_id_ Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.
   * \param[in] owner_id_ Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.
   * \param[in] owner_address_ Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption(&quot;ton_blockchain_explorer_url&quot;) to get a link with information about the address.
   * \param[in] owner_name_ Name of the owner for the case when owner identifier and address aren't known.
   * \param[in] gift_address_ Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption(&quot;ton_blockchain_explorer_url&quot;) to get a link with information about the address.
   * \param[in] model_ Model of the upgraded gift.
   * \param[in] symbol_ Symbol of the upgraded gift.
   * \param[in] backdrop_ Backdrop of the upgraded gift.
   * \param[in] original_details_ Information about the originally sent gift; may be null if unknown.
   * \param[in] colors_ Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none or unknown.
   * \param[in] resale_parameters_ Resale parameters of the gift; may be null if resale isn't possible.
   * \param[in] can_send_purchase_offer_ True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.
   * \param[in] craft_probability_per_mille_ Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting.
   * \param[in] value_currency_ ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.
   * \param[in] value_amount_ Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.
   * \param[in] value_usd_amount_ Estimated value of the gift in USD; in USD cents; 0 if unavailable.
   */
  upgradedGift(int64 id_, int64 regular_gift_id_, int53 publisher_chat_id_, string const &title_, string const &name_, int32 number_, int32 total_upgraded_count_, int32 max_upgraded_count_, bool is_burned_, bool is_crafted_, bool is_premium_, bool is_theme_available_, int53 used_theme_chat_id_, object_ptr<MessageSender> &&host_id_, object_ptr<MessageSender> &&owner_id_, string const &owner_address_, string const &owner_name_, string const &gift_address_, object_ptr<upgradedGiftModel> &&model_, object_ptr<upgradedGiftSymbol> &&symbol_, object_ptr<upgradedGiftBackdrop> &&backdrop_, object_ptr<upgradedGiftOriginalDetails> &&original_details_, object_ptr<upgradedGiftColors> &&colors_, object_ptr<giftResaleParameters> &&resale_parameters_, bool can_send_purchase_offer_, int32 craft_probability_per_mille_, string const &value_currency_, int53 value_amount_, int53 value_usd_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 239775652;

  static object_ptr<upgradedGift> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Contains identifier of an upgraded gift attribute to search for.
 */
class UpgradedGiftAttributeId: public Object {
 public:
  static jclass Class;

  static object_ptr<UpgradedGiftAttributeId> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Identifier of a gift model.
 */
class upgradedGiftAttributeIdModel final : public UpgradedGiftAttributeId {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker representing the model.
  int64 sticker_id_;
  static jfieldID sticker_id_fieldID;

  /**
   * Identifier of a gift model.
   */
  upgradedGiftAttributeIdModel();

  /**
   * Identifier of a gift model.
   *
   * \param[in] sticker_id_ Identifier of the sticker representing the model.
   */
  explicit upgradedGiftAttributeIdModel(int64 sticker_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1053287307;

  static object_ptr<UpgradedGiftAttributeId> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Identifier of a gift symbol.
 */
class upgradedGiftAttributeIdSymbol final : public UpgradedGiftAttributeId {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker representing the symbol.
  int64 sticker_id_;
  static jfieldID sticker_id_fieldID;

  /**
   * Identifier of a gift symbol.
   */
  upgradedGiftAttributeIdSymbol();

  /**
   * Identifier of a gift symbol.
   *
   * \param[in] sticker_id_ Identifier of the sticker representing the symbol.
   */
  explicit upgradedGiftAttributeIdSymbol(int64 sticker_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1188205608;

  static object_ptr<UpgradedGiftAttributeId> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Identifier of a gift backdrop.
 */
class upgradedGiftAttributeIdBackdrop final : public UpgradedGiftAttributeId {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the backdrop.
  int32 backdrop_id_;
  static jfieldID backdrop_id_fieldID;

  /**
   * Identifier of a gift backdrop.
   */
  upgradedGiftAttributeIdBackdrop();

  /**
   * Identifier of a gift backdrop.
   *
   * \param[in] backdrop_id_ Identifier of the backdrop.
   */
  explicit upgradedGiftAttributeIdBackdrop(int32 backdrop_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1461997935;

  static object_ptr<UpgradedGiftAttributeId> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes rarity of an upgraded gift attribute.
 */
class UpgradedGiftAttributeRarity: public Object {
 public:
  static jclass Class;

  static object_ptr<UpgradedGiftAttributeRarity> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The rarity is represented as the numeric frequency of the model.
 */
class upgradedGiftAttributeRarityPerMille final : public UpgradedGiftAttributeRarity {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of upgraded gifts that receive this attribute for each 1000 gifts upgraded; if 0, then it can be shown as &quot;&lt;0.1%&quot;.
  int32 per_mille_;
  static jfieldID per_mille_fieldID;

  /**
   * The rarity is represented as the numeric frequency of the model.
   */
  upgradedGiftAttributeRarityPerMille();

  /**
   * The rarity is represented as the numeric frequency of the model.
   *
   * \param[in] per_mille_ The number of upgraded gifts that receive this attribute for each 1000 gifts upgraded; if 0, then it can be shown as &quot;&lt;0.1%&quot;.
   */
  explicit upgradedGiftAttributeRarityPerMille(int32 per_mille_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1306052575;

  static object_ptr<UpgradedGiftAttributeRarity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The attribute is uncommon.
 */
class upgradedGiftAttributeRarityUncommon final : public UpgradedGiftAttributeRarity {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The attribute is uncommon.
   */
  upgradedGiftAttributeRarityUncommon();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -203711025;

  static object_ptr<UpgradedGiftAttributeRarity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The attribute is rare.
 */
class upgradedGiftAttributeRarityRare final : public UpgradedGiftAttributeRarity {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The attribute is rare.
   */
  upgradedGiftAttributeRarityRare();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1676142893;

  static object_ptr<UpgradedGiftAttributeRarity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The attribute is epic.
 */
class upgradedGiftAttributeRarityEpic final : public UpgradedGiftAttributeRarity {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The attribute is epic.
   */
  upgradedGiftAttributeRarityEpic();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1206252713;

  static object_ptr<UpgradedGiftAttributeRarity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The attribute is legendary.
 */
class upgradedGiftAttributeRarityLegendary final : public UpgradedGiftAttributeRarity {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The attribute is legendary.
   */
  upgradedGiftAttributeRarityLegendary();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 85089455;

  static object_ptr<UpgradedGiftAttributeRarity> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class UpgradedGiftAttributeRarity;

class upgradedGiftBackdropColors;

/**
 * Describes a backdrop of an upgraded gift.
 */
class upgradedGiftBackdrop final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the backdrop.
  int32 id_;
  static jfieldID id_fieldID;
  /// Name of the backdrop.
  string name_;
  static jfieldID name_fieldID;
  /// Colors of the backdrop.
  object_ptr<upgradedGiftBackdropColors> colors_;
  static jfieldID colors_fieldID;
  /// The rarity of the backdrop.
  object_ptr<UpgradedGiftAttributeRarity> rarity_;
  static jfieldID rarity_fieldID;

  /**
   * Describes a backdrop of an upgraded gift.
   */
  upgradedGiftBackdrop();

  /**
   * Describes a backdrop of an upgraded gift.
   *
   * \param[in] id_ Unique identifier of the backdrop.
   * \param[in] name_ Name of the backdrop.
   * \param[in] colors_ Colors of the backdrop.
   * \param[in] rarity_ The rarity of the backdrop.
   */
  upgradedGiftBackdrop(int32 id_, string const &name_, object_ptr<upgradedGiftBackdropColors> &&colors_, object_ptr<UpgradedGiftAttributeRarity> &&rarity_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -775752215;

  static object_ptr<upgradedGiftBackdrop> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes colors of a backdrop of an upgraded gift.
 */
class upgradedGiftBackdropColors final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A color in the center of the backdrop in the RGB format.
  int32 center_color_;
  static jfieldID center_color_fieldID;
  /// A color on the edges of the backdrop in the RGB format.
  int32 edge_color_;
  static jfieldID edge_color_fieldID;
  /// A color to be applied for the symbol in the RGB format.
  int32 symbol_color_;
  static jfieldID symbol_color_fieldID;
  /// A color for the text on the backdrop in the RGB format.
  int32 text_color_;
  static jfieldID text_color_fieldID;

  /**
   * Describes colors of a backdrop of an upgraded gift.
   */
  upgradedGiftBackdropColors();

  /**
   * Describes colors of a backdrop of an upgraded gift.
   *
   * \param[in] center_color_ A color in the center of the backdrop in the RGB format.
   * \param[in] edge_color_ A color on the edges of the backdrop in the RGB format.
   * \param[in] symbol_color_ A color to be applied for the symbol in the RGB format.
   * \param[in] text_color_ A color for the text on the backdrop in the RGB format.
   */
  upgradedGiftBackdropColors(int32 center_color_, int32 edge_color_, int32 symbol_color_, int32 text_color_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 4227529;

  static object_ptr<upgradedGiftBackdropColors> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGiftBackdrop;

/**
 * Describes a backdrop of an upgraded gift.
 */
class upgradedGiftBackdropCount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The backdrop.
  object_ptr<upgradedGiftBackdrop> backdrop_;
  static jfieldID backdrop_fieldID;
  /// Total number of gifts with the symbol.
  int32 total_count_;
  static jfieldID total_count_fieldID;

  /**
   * Describes a backdrop of an upgraded gift.
   */
  upgradedGiftBackdropCount();

  /**
   * Describes a backdrop of an upgraded gift.
   *
   * \param[in] backdrop_ The backdrop.
   * \param[in] total_count_ Total number of gifts with the symbol.
   */
  upgradedGiftBackdropCount(object_ptr<upgradedGiftBackdrop> &&backdrop_, int32 total_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -562274120;

  static object_ptr<upgradedGiftBackdropCount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about color scheme for user's name, background of empty chat photo, replies to messages and link previews.
 */
class upgradedGiftColors final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the upgraded gift colors.
  int64 id_;
  static jfieldID id_fieldID;
  /// Custom emoji identifier of the model of the upgraded gift.
  int64 model_custom_emoji_id_;
  static jfieldID model_custom_emoji_id_fieldID;
  /// Custom emoji identifier of the symbol of the upgraded gift.
  int64 symbol_custom_emoji_id_;
  static jfieldID symbol_custom_emoji_id_fieldID;
  /// Accent color to use in light themes in RGB format.
  int32 light_theme_accent_color_;
  static jfieldID light_theme_accent_color_fieldID;
  /// The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes.
  array<int32> light_theme_colors_;
  static jfieldID light_theme_colors_fieldID;
  /// Accent color to use in dark themes in RGB format.
  int32 dark_theme_accent_color_;
  static jfieldID dark_theme_accent_color_fieldID;
  /// The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes.
  array<int32> dark_theme_colors_;
  static jfieldID dark_theme_colors_fieldID;

  /**
   * Contains information about color scheme for user's name, background of empty chat photo, replies to messages and link previews.
   */
  upgradedGiftColors();

  /**
   * Contains information about color scheme for user's name, background of empty chat photo, replies to messages and link previews.
   *
   * \param[in] id_ Unique identifier of the upgraded gift colors.
   * \param[in] model_custom_emoji_id_ Custom emoji identifier of the model of the upgraded gift.
   * \param[in] symbol_custom_emoji_id_ Custom emoji identifier of the symbol of the upgraded gift.
   * \param[in] light_theme_accent_color_ Accent color to use in light themes in RGB format.
   * \param[in] light_theme_colors_ The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes.
   * \param[in] dark_theme_accent_color_ Accent color to use in dark themes in RGB format.
   * \param[in] dark_theme_colors_ The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes.
   */
  upgradedGiftColors(int64 id_, int64 model_custom_emoji_id_, int64 symbol_custom_emoji_id_, int32 light_theme_accent_color_, array<int32> &&light_theme_colors_, int32 dark_theme_accent_color_, array<int32> &&dark_theme_colors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 743567702;

  static object_ptr<upgradedGiftColors> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class UpgradedGiftAttributeRarity;

class sticker;

/**
 * Describes a model of an upgraded gift.
 */
class upgradedGiftModel final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the model.
  string name_;
  static jfieldID name_fieldID;
  /// The sticker representing the upgraded gift.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// The rarity of the model.
  object_ptr<UpgradedGiftAttributeRarity> rarity_;
  static jfieldID rarity_fieldID;
  /// True, if the model can be obtained only through gift crafting.
  bool is_crafted_;
  static jfieldID is_crafted_fieldID;

  /**
   * Describes a model of an upgraded gift.
   */
  upgradedGiftModel();

  /**
   * Describes a model of an upgraded gift.
   *
   * \param[in] name_ Name of the model.
   * \param[in] sticker_ The sticker representing the upgraded gift.
   * \param[in] rarity_ The rarity of the model.
   * \param[in] is_crafted_ True, if the model can be obtained only through gift crafting.
   */
  upgradedGiftModel(string const &name_, object_ptr<sticker> &&sticker_, object_ptr<UpgradedGiftAttributeRarity> &&rarity_, bool is_crafted_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1451554959;

  static object_ptr<upgradedGiftModel> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGiftModel;

/**
 * Describes a model of an upgraded gift with the number of gifts found.
 */
class upgradedGiftModelCount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The model.
  object_ptr<upgradedGiftModel> model_;
  static jfieldID model_fieldID;
  /// Total number of gifts with the model.
  int32 total_count_;
  static jfieldID total_count_fieldID;

  /**
   * Describes a model of an upgraded gift with the number of gifts found.
   */
  upgradedGiftModelCount();

  /**
   * Describes a model of an upgraded gift with the number of gifts found.
   *
   * \param[in] model_ The model.
   * \param[in] total_count_ Total number of gifts with the model.
   */
  upgradedGiftModelCount(object_ptr<upgradedGiftModel> &&model_, int32 total_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1127238023;

  static object_ptr<upgradedGiftModelCount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class GiftResalePrice;

/**
 * This class is an abstract base class.
 * Describes origin from which the upgraded gift was obtained.
 */
class UpgradedGiftOrigin: public Object {
 public:
  static jclass Class;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift was obtained by upgrading of a previously received gift.
 */
class upgradedGiftOriginUpgrade final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the regular gift that was upgraded; may be 0 or an identifier of a deleted message.
  int53 gift_message_id_;
  static jfieldID gift_message_id_fieldID;

  /**
   * The gift was obtained by upgrading of a previously received gift.
   */
  upgradedGiftOriginUpgrade();

  /**
   * The gift was obtained by upgrading of a previously received gift.
   *
   * \param[in] gift_message_id_ Identifier of the message with the regular gift that was upgraded; may be 0 or an identifier of a deleted message.
   */
  explicit upgradedGiftOriginUpgrade(int53 gift_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 530003363;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift was transferred from another owner.
 */
class upgradedGiftOriginTransfer final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gift was transferred from another owner.
   */
  upgradedGiftOriginTransfer();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 331458658;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift was bought from another user.
 */
class upgradedGiftOriginResale final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Price paid for the gift.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;

  /**
   * The gift was bought from another user.
   */
  upgradedGiftOriginResale();

  /**
   * The gift was bought from another user.
   *
   * \param[in] price_ Price paid for the gift.
   */
  explicit upgradedGiftOriginResale(object_ptr<GiftResalePrice> &&price_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -989020635;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold or withdrawn to blockchain.
 */
class upgradedGiftOriginBlockchain final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gift was assigned from blockchain and isn't owned by the current user. The gift can't be transferred, resold or withdrawn to blockchain.
   */
  upgradedGiftOriginBlockchain();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2133095888;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The sender or receiver of the message has paid for upgraid of the gift, which has been completed.
 */
class upgradedGiftOriginPrepaidUpgrade final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The sender or receiver of the message has paid for upgraid of the gift, which has been completed.
   */
  upgradedGiftOriginPrepaidUpgrade();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 619653731;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift was bought through an offer.
 */
class upgradedGiftOriginOffer final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Price paid for the gift.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;

  /**
   * The gift was bought through an offer.
   */
  upgradedGiftOriginOffer();

  /**
   * The gift was bought through an offer.
   *
   * \param[in] price_ Price paid for the gift.
   */
  explicit upgradedGiftOriginOffer(object_ptr<GiftResalePrice> &&price_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -182289662;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The gift was crafted from other gifts.
 */
class upgradedGiftOriginCraft final : public UpgradedGiftOrigin {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The gift was crafted from other gifts.
   */
  upgradedGiftOriginCraft();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1827738024;

  static object_ptr<UpgradedGiftOrigin> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class formattedText;

/**
 * Describes the original details about the gift.
 */
class upgradedGiftOriginalDetails final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the chat that sent the gift; may be null if the gift was private.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Identifier of the user or the chat that received the gift.
  object_ptr<MessageSender> receiver_id_;
  static jfieldID receiver_id_fieldID;
  /// Message added to the gift.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Point in time (Unix timestamp) when the gift was sent.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Describes the original details about the gift.
   */
  upgradedGiftOriginalDetails();

  /**
   * Describes the original details about the gift.
   *
   * \param[in] sender_id_ Identifier of the user or the chat that sent the gift; may be null if the gift was private.
   * \param[in] receiver_id_ Identifier of the user or the chat that received the gift.
   * \param[in] text_ Message added to the gift.
   * \param[in] date_ Point in time (Unix timestamp) when the gift was sent.
   */
  upgradedGiftOriginalDetails(object_ptr<MessageSender> &&sender_id_, object_ptr<MessageSender> &&receiver_id_, object_ptr<formattedText> &&text_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 55247728;

  static object_ptr<upgradedGiftOriginalDetails> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class UpgradedGiftAttributeRarity;

class sticker;

/**
 * Describes a symbol shown on the pattern of an upgraded gift.
 */
class upgradedGiftSymbol final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the symbol.
  string name_;
  static jfieldID name_fieldID;
  /// The sticker representing the symbol.
  object_ptr<sticker> sticker_;
  static jfieldID sticker_fieldID;
  /// The rarity of the symbol.
  object_ptr<UpgradedGiftAttributeRarity> rarity_;
  static jfieldID rarity_fieldID;

  /**
   * Describes a symbol shown on the pattern of an upgraded gift.
   */
  upgradedGiftSymbol();

  /**
   * Describes a symbol shown on the pattern of an upgraded gift.
   *
   * \param[in] name_ Name of the symbol.
   * \param[in] sticker_ The sticker representing the symbol.
   * \param[in] rarity_ The rarity of the symbol.
   */
  upgradedGiftSymbol(string const &name_, object_ptr<sticker> &&sticker_, object_ptr<UpgradedGiftAttributeRarity> &&rarity_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 744249151;

  static object_ptr<upgradedGiftSymbol> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGiftSymbol;

/**
 * Describes a symbol shown on the pattern of an upgraded gift.
 */
class upgradedGiftSymbolCount final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The symbol.
  object_ptr<upgradedGiftSymbol> symbol_;
  static jfieldID symbol_fieldID;
  /// Total number of gifts with the symbol.
  int32 total_count_;
  static jfieldID total_count_fieldID;

  /**
   * Describes a symbol shown on the pattern of an upgraded gift.
   */
  upgradedGiftSymbolCount();

  /**
   * Describes a symbol shown on the pattern of an upgraded gift.
   *
   * \param[in] symbol_ The symbol.
   * \param[in] total_count_ Total number of gifts with the symbol.
   */
  upgradedGiftSymbolCount(object_ptr<upgradedGiftSymbol> &&symbol_, int32 total_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -773579874;

  static object_ptr<upgradedGiftSymbolCount> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about value of an upgraded gift.
 */
class upgradedGiftValueInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// ISO 4217 currency code of the currency in which the prices are represented.
  string currency_;
  static jfieldID currency_fieldID;
  /// Estimated value of the gift; in the smallest units of the currency.
  int53 value_;
  static jfieldID value_fieldID;
  /// True, if the value is calculated as average value of similar sold gifts. Otherwise, it is based on the sale price of the gift.
  bool is_value_average_;
  static jfieldID is_value_average_fieldID;
  /// Point in time (Unix timestamp) when the corresponding regular gift was originally purchased.
  int32 initial_sale_date_;
  static jfieldID initial_sale_date_fieldID;
  /// The Telegram Star amount that was paid for the gift.
  int53 initial_sale_star_count_;
  static jfieldID initial_sale_star_count_fieldID;
  /// Initial price of the gift; in the smallest units of the currency.
  int53 initial_sale_price_;
  static jfieldID initial_sale_price_fieldID;
  /// Point in time (Unix timestamp) when the upgraded gift was purchased last time; 0 if never.
  int32 last_sale_date_;
  static jfieldID last_sale_date_fieldID;
  /// Last purchase price of the gift; in the smallest units of the currency; 0 if the gift has never been resold.
  int53 last_sale_price_;
  static jfieldID last_sale_price_fieldID;
  /// True, if the last sale was completed on Fragment.
  bool is_last_sale_on_fragment_;
  static jfieldID is_last_sale_on_fragment_fieldID;
  /// The current minimum price of gifts upgraded from the same gift; in the smallest units of the currency; 0 if there are no such gifts.
  int53 minimum_price_;
  static jfieldID minimum_price_fieldID;
  /// The average sale price in the last month of gifts upgraded from the same gift; in the smallest units of the currency; 0 if there were no such sales.
  int53 average_sale_price_;
  static jfieldID average_sale_price_fieldID;
  /// Number of gifts upgraded from the same gift being resold on Telegram.
  int32 telegram_listed_gift_count_;
  static jfieldID telegram_listed_gift_count_fieldID;
  /// Number of gifts upgraded from the same gift being resold on Fragment.
  int32 fragment_listed_gift_count_;
  static jfieldID fragment_listed_gift_count_fieldID;
  /// The HTTPS link to the Fragment for the gift; may be empty if there are no such gifts being sold on Fragment.
  string fragment_url_;
  static jfieldID fragment_url_fieldID;

  /**
   * Contains information about value of an upgraded gift.
   */
  upgradedGiftValueInfo();

  /**
   * Contains information about value of an upgraded gift.
   *
   * \param[in] currency_ ISO 4217 currency code of the currency in which the prices are represented.
   * \param[in] value_ Estimated value of the gift; in the smallest units of the currency.
   * \param[in] is_value_average_ True, if the value is calculated as average value of similar sold gifts. Otherwise, it is based on the sale price of the gift.
   * \param[in] initial_sale_date_ Point in time (Unix timestamp) when the corresponding regular gift was originally purchased.
   * \param[in] initial_sale_star_count_ The Telegram Star amount that was paid for the gift.
   * \param[in] initial_sale_price_ Initial price of the gift; in the smallest units of the currency.
   * \param[in] last_sale_date_ Point in time (Unix timestamp) when the upgraded gift was purchased last time; 0 if never.
   * \param[in] last_sale_price_ Last purchase price of the gift; in the smallest units of the currency; 0 if the gift has never been resold.
   * \param[in] is_last_sale_on_fragment_ True, if the last sale was completed on Fragment.
   * \param[in] minimum_price_ The current minimum price of gifts upgraded from the same gift; in the smallest units of the currency; 0 if there are no such gifts.
   * \param[in] average_sale_price_ The average sale price in the last month of gifts upgraded from the same gift; in the smallest units of the currency; 0 if there were no such sales.
   * \param[in] telegram_listed_gift_count_ Number of gifts upgraded from the same gift being resold on Telegram.
   * \param[in] fragment_listed_gift_count_ Number of gifts upgraded from the same gift being resold on Fragment.
   * \param[in] fragment_url_ The HTTPS link to the Fragment for the gift; may be empty if there are no such gifts being sold on Fragment.
   */
  upgradedGiftValueInfo(string const &currency_, int53 value_, bool is_value_average_, int32 initial_sale_date_, int53 initial_sale_star_count_, int53 initial_sale_price_, int32 last_sale_date_, int53 last_sale_price_, bool is_last_sale_on_fragment_, int53 minimum_price_, int53 average_sale_price_, int32 telegram_listed_gift_count_, int32 fragment_listed_gift_count_, string const &fragment_url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1729877677;

  static object_ptr<upgradedGiftValueInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class ActiveStoryState;

class UserStatus;

class UserType;

class emojiStatus;

class profilePhoto;

class restrictionInfo;

class upgradedGiftColors;

class usernames;

class verificationStatus;

/**
 * Represents a user.
 */
class user final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 id_;
  static jfieldID id_fieldID;
  /// First name of the user.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// Last name of the user.
  string last_name_;
  static jfieldID last_name_fieldID;
  /// Usernames of the user; may be null.
  object_ptr<usernames> usernames_;
  static jfieldID usernames_fieldID;
  /// Phone number of the user.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// Current online status of the user.
  object_ptr<UserStatus> status_;
  static jfieldID status_fieldID;
  /// Profile photo of the user; may be null.
  object_ptr<profilePhoto> profile_photo_;
  static jfieldID profile_photo_fieldID;
  /// Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
  int64 background_custom_emoji_id_;
  static jfieldID background_custom_emoji_id_fieldID;
  /// Color scheme based on an upgraded gift to be used for the user instead of accent_color_id and background_custom_emoji_id; may be null if none.
  object_ptr<upgradedGiftColors> upgraded_gift_colors_;
  static jfieldID upgraded_gift_colors_fieldID;
  /// Identifier of the accent color for the user's profile; -1 if none.
  int32 profile_accent_color_id_;
  static jfieldID profile_accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
  int64 profile_background_custom_emoji_id_;
  static jfieldID profile_background_custom_emoji_id_fieldID;
  /// Emoji status to be shown instead of the default Telegram Premium badge; may be null.
  object_ptr<emojiStatus> emoji_status_;
  static jfieldID emoji_status_fieldID;
  /// The user is a contact of the current user.
  bool is_contact_;
  static jfieldID is_contact_fieldID;
  /// The user is a contact of the current user and the current user is a contact of the user.
  bool is_mutual_contact_;
  static jfieldID is_mutual_contact_fieldID;
  /// The user is a close friend of the current user; implies that the user is a contact.
  bool is_close_friend_;
  static jfieldID is_close_friend_fieldID;
  /// Information about verification status of the user; may be null if none.
  object_ptr<verificationStatus> verification_status_;
  static jfieldID verification_status_fieldID;
  /// True, if the user is a Telegram Premium user.
  bool is_premium_;
  static jfieldID is_premium_fieldID;
  /// True, if the user is Telegram support account.
  bool is_support_;
  static jfieldID is_support_fieldID;
  /// Information about restrictions that must be applied to the corresponding private chat; may be null if none.
  object_ptr<restrictionInfo> restriction_info_;
  static jfieldID restriction_info_fieldID;
  /// State of active stories of the user; may be null if the user has no active stories.
  object_ptr<ActiveStoryState> active_story_state_;
  static jfieldID active_story_state_fieldID;
  /// True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
  bool restricts_new_chats_;
  static jfieldID restricts_new_chats_fieldID;
  /// Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;
  /// If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.
  bool have_access_;
  static jfieldID have_access_fieldID;
  /// Type of the user.
  object_ptr<UserType> type_;
  static jfieldID type_fieldID;
  /// IETF language tag of the user's language; only available to bots.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// True, if the user added the current bot to attachment menu; only available to bots.
  bool added_to_attachment_menu_;
  static jfieldID added_to_attachment_menu_fieldID;

  /**
   * Represents a user.
   */
  user();

  /**
   * Represents a user.
   *
   * \param[in] id_ User identifier.
   * \param[in] first_name_ First name of the user.
   * \param[in] last_name_ Last name of the user.
   * \param[in] usernames_ Usernames of the user; may be null.
   * \param[in] phone_number_ Phone number of the user.
   * \param[in] status_ Current online status of the user.
   * \param[in] profile_photo_ Profile photo of the user; may be null.
   * \param[in] accent_color_id_ Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
   * \param[in] background_custom_emoji_id_ Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
   * \param[in] upgraded_gift_colors_ Color scheme based on an upgraded gift to be used for the user instead of accent_color_id and background_custom_emoji_id; may be null if none.
   * \param[in] profile_accent_color_id_ Identifier of the accent color for the user's profile; -1 if none.
   * \param[in] profile_background_custom_emoji_id_ Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
   * \param[in] emoji_status_ Emoji status to be shown instead of the default Telegram Premium badge; may be null.
   * \param[in] is_contact_ The user is a contact of the current user.
   * \param[in] is_mutual_contact_ The user is a contact of the current user and the current user is a contact of the user.
   * \param[in] is_close_friend_ The user is a close friend of the current user; implies that the user is a contact.
   * \param[in] verification_status_ Information about verification status of the user; may be null if none.
   * \param[in] is_premium_ True, if the user is a Telegram Premium user.
   * \param[in] is_support_ True, if the user is Telegram support account.
   * \param[in] restriction_info_ Information about restrictions that must be applied to the corresponding private chat; may be null if none.
   * \param[in] active_story_state_ State of active stories of the user; may be null if the user has no active stories.
   * \param[in] restricts_new_chats_ True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
   * \param[in] paid_message_star_count_ Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay.
   * \param[in] have_access_ If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.
   * \param[in] type_ Type of the user.
   * \param[in] language_code_ IETF language tag of the user's language; only available to bots.
   * \param[in] added_to_attachment_menu_ True, if the user added the current bot to attachment menu; only available to bots.
   */
  user(int53 id_, string const &first_name_, string const &last_name_, object_ptr<usernames> &&usernames_, string const &phone_number_, object_ptr<UserStatus> &&status_, object_ptr<profilePhoto> &&profile_photo_, int32 accent_color_id_, int64 background_custom_emoji_id_, object_ptr<upgradedGiftColors> &&upgraded_gift_colors_, int32 profile_accent_color_id_, int64 profile_background_custom_emoji_id_, object_ptr<emojiStatus> &&emoji_status_, bool is_contact_, bool is_mutual_contact_, bool is_close_friend_, object_ptr<verificationStatus> &&verification_status_, bool is_premium_, bool is_support_, object_ptr<restrictionInfo> &&restriction_info_, object_ptr<ActiveStoryState> &&active_story_state_, bool restricts_new_chats_, int53 paid_message_star_count_, bool have_access_, object_ptr<UserType> &&type_, string const &language_code_, bool added_to_attachment_menu_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1874921182;

  static object_ptr<user> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Describes a bid of the current user in an auction.
 */
class userAuctionBid final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of Telegram Stars that were put in the bid.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Point in time (Unix timestamp) when the bid was made.
  int32 bid_date_;
  static jfieldID bid_date_fieldID;
  /// The minimum number of Telegram Stars that can be put for the next bid.
  int53 next_bid_star_count_;
  static jfieldID next_bid_star_count_fieldID;
  /// Identifier of the user or the chat that will receive the auctioned item. If the auction is opened in context of another user or chat, then a warning is supposed to be shown to the current user.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// True, if the bid was returned to the user, because it was outbid and can't win anymore.
  bool was_returned_;
  static jfieldID was_returned_fieldID;

  /**
   * Describes a bid of the current user in an auction.
   */
  userAuctionBid();

  /**
   * Describes a bid of the current user in an auction.
   *
   * \param[in] star_count_ The number of Telegram Stars that were put in the bid.
   * \param[in] bid_date_ Point in time (Unix timestamp) when the bid was made.
   * \param[in] next_bid_star_count_ The minimum number of Telegram Stars that can be put for the next bid.
   * \param[in] owner_id_ Identifier of the user or the chat that will receive the auctioned item. If the auction is opened in context of another user or chat, then a warning is supposed to be shown to the current user.
   * \param[in] was_returned_ True, if the bid was returned to the user, because it was outbid and can't win anymore.
   */
  userAuctionBid(int53 star_count_, int32 bid_date_, int53 next_bid_star_count_, object_ptr<MessageSender> &&owner_id_, bool was_returned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 538448225;

  static object_ptr<userAuctionBid> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class BlockList;

class ProfileTab;

class audio;

class birthdate;

class botInfo;

class botVerification;

class businessInfo;

class chatPhoto;

class formattedText;

class giftSettings;

class userRating;

/**
 * Contains full information about a user.
 */
class userFullInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos.
  object_ptr<chatPhoto> personal_photo_;
  static jfieldID personal_photo_fieldID;
  /// User profile photo; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. If non-null and personal_photo is null, then it is the same photo as in user.profile_photo and chat.photo.
  object_ptr<chatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// User profile photo visible if the main photo is hidden by privacy settings; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. If non-null and both photo and personal_photo are null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos.
  object_ptr<chatPhoto> public_photo_;
  static jfieldID public_photo_fieldID;
  /// Block list to which the user is added; may be null if none.
  object_ptr<BlockList> block_list_;
  static jfieldID block_list_fieldID;
  /// True, if the user can be called.
  bool can_be_called_;
  static jfieldID can_be_called_fieldID;
  /// True, if a video call can be created with the user.
  bool supports_video_calls_;
  static jfieldID supports_video_calls_fieldID;
  /// True, if the user can't be called due to their privacy settings.
  bool has_private_calls_;
  static jfieldID has_private_calls_fieldID;
  /// True, if the user can't be linked in forwarded messages due to their privacy settings.
  bool has_private_forwards_;
  static jfieldID has_private_forwards_fieldID;
  /// True, if voice and video notes can't be sent or forwarded to the user.
  bool has_restricted_voice_and_video_note_messages_;
  static jfieldID has_restricted_voice_and_video_note_messages_fieldID;
  /// True, if the user has posted to profile stories.
  bool has_posted_to_profile_stories_;
  static jfieldID has_posted_to_profile_stories_fieldID;
  /// True, if the user always enabled sponsored messages; known only for the current user.
  bool has_sponsored_messages_enabled_;
  static jfieldID has_sponsored_messages_enabled_fieldID;
  /// True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used.
  bool need_phone_number_privacy_exception_;
  static jfieldID need_phone_number_privacy_exception_fieldID;
  /// True, if the user set chat background for both chat users and it wasn't reverted yet.
  bool set_chat_background_;
  static jfieldID set_chat_background_fieldID;
  /// True, if the user uses an unofficial application that poses a security risk.
  bool uses_unofficial_app_;
  static jfieldID uses_unofficial_app_fieldID;
  /// A short user bio; may be null for bots.
  object_ptr<formattedText> bio_;
  static jfieldID bio_fieldID;
  /// Birthdate of the user; may be null if unknown.
  object_ptr<birthdate> birthdate_;
  static jfieldID birthdate_fieldID;
  /// Identifier of the personal chat of the user; 0 if none.
  int53 personal_chat_id_;
  static jfieldID personal_chat_id_fieldID;
  /// Number of saved to profile gifts for other users or the total number of received gifts for the current user.
  int32 gift_count_;
  static jfieldID gift_count_fieldID;
  /// Number of group chats where both the other user and the current user are a member; 0 for the current user.
  int32 group_in_common_count_;
  static jfieldID group_in_common_count_fieldID;
  /// Number of Telegram Stars that must be paid by the user for each sent message to the current user.
  int53 incoming_paid_message_star_count_;
  static jfieldID incoming_paid_message_star_count_fieldID;
  /// Number of Telegram Stars that must be paid by the current user for each sent message to the user.
  int53 outgoing_paid_message_star_count_;
  static jfieldID outgoing_paid_message_star_count_fieldID;
  /// Settings for gift receiving for the user.
  object_ptr<giftSettings> gift_settings_;
  static jfieldID gift_settings_fieldID;
  /// Information about verification status of the user provided by a bot; may be null if none or unknown.
  object_ptr<botVerification> bot_verification_;
  static jfieldID bot_verification_fieldID;
  /// The main tab chosen by the user; may be null if not chosen manually.
  object_ptr<ProfileTab> main_profile_tab_;
  static jfieldID main_profile_tab_fieldID;
  /// The first audio file added to the user's profile; may be null if none.
  object_ptr<audio> first_profile_audio_;
  static jfieldID first_profile_audio_fieldID;
  /// The current rating of the user; may be null if none.
  object_ptr<userRating> rating_;
  static jfieldID rating_fieldID;
  /// The rating of the user after the next change; may be null if the user isn't the current user or there are no pending rating changes.
  object_ptr<userRating> pending_rating_;
  static jfieldID pending_rating_fieldID;
  /// Unix timestamp when rating of the user will change to pending_rating; 0 if the user isn't the current user or there are no pending rating changes.
  int32 pending_rating_date_;
  static jfieldID pending_rating_date_fieldID;
  /// Note added to the user's contact; may be null if none.
  object_ptr<formattedText> note_;
  static jfieldID note_fieldID;
  /// Information about business settings for Telegram Business accounts; may be null if none.
  object_ptr<businessInfo> business_info_;
  static jfieldID business_info_fieldID;
  /// For bots, information about the bot; may be null if the user isn't a bot.
  object_ptr<botInfo> bot_info_;
  static jfieldID bot_info_fieldID;

  /**
   * Contains full information about a user.
   */
  userFullInfo();

  /**
   * Contains full information about a user.
   *
   * \param[in] personal_photo_ User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos.
   * \param[in] photo_ User profile photo; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. If non-null and personal_photo is null, then it is the same photo as in user.profile_photo and chat.photo.
   * \param[in] public_photo_ User profile photo visible if the main photo is hidden by privacy settings; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. If non-null and both photo and personal_photo are null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos.
   * \param[in] block_list_ Block list to which the user is added; may be null if none.
   * \param[in] can_be_called_ True, if the user can be called.
   * \param[in] supports_video_calls_ True, if a video call can be created with the user.
   * \param[in] has_private_calls_ True, if the user can't be called due to their privacy settings.
   * \param[in] has_private_forwards_ True, if the user can't be linked in forwarded messages due to their privacy settings.
   * \param[in] has_restricted_voice_and_video_note_messages_ True, if voice and video notes can't be sent or forwarded to the user.
   * \param[in] has_posted_to_profile_stories_ True, if the user has posted to profile stories.
   * \param[in] has_sponsored_messages_enabled_ True, if the user always enabled sponsored messages; known only for the current user.
   * \param[in] need_phone_number_privacy_exception_ True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used.
   * \param[in] set_chat_background_ True, if the user set chat background for both chat users and it wasn't reverted yet.
   * \param[in] uses_unofficial_app_ True, if the user uses an unofficial application that poses a security risk.
   * \param[in] bio_ A short user bio; may be null for bots.
   * \param[in] birthdate_ Birthdate of the user; may be null if unknown.
   * \param[in] personal_chat_id_ Identifier of the personal chat of the user; 0 if none.
   * \param[in] gift_count_ Number of saved to profile gifts for other users or the total number of received gifts for the current user.
   * \param[in] group_in_common_count_ Number of group chats where both the other user and the current user are a member; 0 for the current user.
   * \param[in] incoming_paid_message_star_count_ Number of Telegram Stars that must be paid by the user for each sent message to the current user.
   * \param[in] outgoing_paid_message_star_count_ Number of Telegram Stars that must be paid by the current user for each sent message to the user.
   * \param[in] gift_settings_ Settings for gift receiving for the user.
   * \param[in] bot_verification_ Information about verification status of the user provided by a bot; may be null if none or unknown.
   * \param[in] main_profile_tab_ The main tab chosen by the user; may be null if not chosen manually.
   * \param[in] first_profile_audio_ The first audio file added to the user's profile; may be null if none.
   * \param[in] rating_ The current rating of the user; may be null if none.
   * \param[in] pending_rating_ The rating of the user after the next change; may be null if the user isn't the current user or there are no pending rating changes.
   * \param[in] pending_rating_date_ Unix timestamp when rating of the user will change to pending_rating; 0 if the user isn't the current user or there are no pending rating changes.
   * \param[in] note_ Note added to the user's contact; may be null if none.
   * \param[in] business_info_ Information about business settings for Telegram Business accounts; may be null if none.
   * \param[in] bot_info_ For bots, information about the bot; may be null if the user isn't a bot.
   */
  userFullInfo(object_ptr<chatPhoto> &&personal_photo_, object_ptr<chatPhoto> &&photo_, object_ptr<chatPhoto> &&public_photo_, object_ptr<BlockList> &&block_list_, bool can_be_called_, bool supports_video_calls_, bool has_private_calls_, bool has_private_forwards_, bool has_restricted_voice_and_video_note_messages_, bool has_posted_to_profile_stories_, bool has_sponsored_messages_enabled_, bool need_phone_number_privacy_exception_, bool set_chat_background_, bool uses_unofficial_app_, object_ptr<formattedText> &&bio_, object_ptr<birthdate> &&birthdate_, int53 personal_chat_id_, int32 gift_count_, int32 group_in_common_count_, int53 incoming_paid_message_star_count_, int53 outgoing_paid_message_star_count_, object_ptr<giftSettings> &&gift_settings_, object_ptr<botVerification> &&bot_verification_, object_ptr<ProfileTab> &&main_profile_tab_, object_ptr<audio> &&first_profile_audio_, object_ptr<userRating> &&rating_, object_ptr<userRating> &&pending_rating_, int32 pending_rating_date_, object_ptr<formattedText> &&note_, object_ptr<businessInfo> &&business_info_, object_ptr<botInfo> &&bot_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1176229971;

  static object_ptr<userFullInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains an HTTPS URL, which can be used to get information about a user.
 */
class userLink final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The URL.
  string url_;
  static jfieldID url_fieldID;
  /// Left time for which the link is valid, in seconds; 0 if the link is a public username link.
  int32 expires_in_;
  static jfieldID expires_in_fieldID;

  /**
   * Contains an HTTPS URL, which can be used to get information about a user.
   */
  userLink();

  /**
   * Contains an HTTPS URL, which can be used to get information about a user.
   *
   * \param[in] url_ The URL.
   * \param[in] expires_in_ Left time for which the link is valid, in seconds; 0 if the link is a public username link.
   */
  userLink(string const &url_, int32 expires_in_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 498138872;

  static object_ptr<userLink> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes available user privacy settings.
 */
class UserPrivacySetting: public Object {
 public:
  static jclass Class;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user's online status is visible.
 */
class userPrivacySettingShowStatus final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user's online status is visible.
   */
  userPrivacySettingShowStatus();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1862829310;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user's profile photo is visible.
 */
class userPrivacySettingShowProfilePhoto final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user's profile photo is visible.
   */
  userPrivacySettingShowProfilePhoto();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1408485877;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether a link to the user's account is included in forwarded messages.
 */
class userPrivacySettingShowLinkInForwardedMessages final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether a link to the user's account is included in forwarded messages.
   */
  userPrivacySettingShowLinkInForwardedMessages();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 592688870;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user's phone number is visible.
 */
class userPrivacySettingShowPhoneNumber final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user's phone number is visible.
   */
  userPrivacySettingShowPhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -791567831;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user's bio is visible.
 */
class userPrivacySettingShowBio final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user's bio is visible.
   */
  userPrivacySettingShowBio();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 959981409;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user's birthdate is visible.
 */
class userPrivacySettingShowBirthdate final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user's birthdate is visible.
   */
  userPrivacySettingShowBirthdate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1167504607;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user's profile audio files are visible.
 */
class userPrivacySettingShowProfileAudio final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user's profile audio files are visible.
   */
  userPrivacySettingShowProfileAudio();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 610353549;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user can be invited to chats.
 */
class userPrivacySettingAllowChatInvites final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user can be invited to chats.
   */
  userPrivacySettingAllowChatInvites();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1271668007;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user can be called.
 */
class userPrivacySettingAllowCalls final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user can be called.
   */
  userPrivacySettingAllowCalls();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -906967291;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether peer-to-peer connections can be used for calls.
 */
class userPrivacySettingAllowPeerToPeerCalls final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether peer-to-peer connections can be used for calls.
   */
  userPrivacySettingAllowPeerToPeerCalls();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 352500032;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to &quot;Allow contacts&quot; or &quot;Allow all&quot;.
 */
class userPrivacySettingAllowFindingByPhoneNumber final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to &quot;Allow contacts&quot; or &quot;Allow all&quot;.
   */
  userPrivacySettingAllowFindingByPhoneNumber();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1846645423;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user can receive voice and video messages in private chats; for Telegram Premium users only.
 */
class userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user can receive voice and video messages in private chats; for Telegram Premium users only.
   */
  userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 338112060;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether received gifts are automatically shown on the user's profile page.
 */
class userPrivacySettingAutosaveGifts final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether received gifts are automatically shown on the user's profile page.
   */
  userPrivacySettingAutosaveGifts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1889167821;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A privacy setting for managing whether the user can receive messages without additional payment.
 */
class userPrivacySettingAllowUnpaidMessages final : public UserPrivacySetting {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A privacy setting for managing whether the user can receive messages without additional payment.
   */
  userPrivacySettingAllowUnpaidMessages();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1430051047;

  static object_ptr<UserPrivacySetting> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents a single rule for managing user privacy settings.
 */
class UserPrivacySettingRule: public Object {
 public:
  static jclass Class;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to allow all users to do something.
 */
class userPrivacySettingRuleAllowAll final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to allow all users to do something.
   */
  userPrivacySettingRuleAllowAll();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1967186881;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to allow all contacts of the user to do something.
 */
class userPrivacySettingRuleAllowContacts final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to allow all contacts of the user to do something.
   */
  userPrivacySettingRuleAllowContacts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1892733680;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to allow all bots to do something.
 */
class userPrivacySettingRuleAllowBots final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to allow all bots to do something.
   */
  userPrivacySettingRuleAllowBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1404208925;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to allow all Premium Users to do something; currently, allowed only for userPrivacySettingAllowChatInvites.
 */
class userPrivacySettingRuleAllowPremiumUsers final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to allow all Premium Users to do something; currently, allowed only for userPrivacySettingAllowChatInvites.
   */
  userPrivacySettingRuleAllowPremiumUsers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1624147265;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to allow certain specified users to do something.
 */
class userPrivacySettingRuleAllowUsers final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The user identifiers, total number of users in all rules must not exceed 1000.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * A rule to allow certain specified users to do something.
   */
  userPrivacySettingRuleAllowUsers();

  /**
   * A rule to allow certain specified users to do something.
   *
   * \param[in] user_ids_ The user identifiers, total number of users in all rules must not exceed 1000.
   */
  explicit userPrivacySettingRuleAllowUsers(array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1110988334;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to allow all members of certain specified basic groups and supergroups to doing something.
 */
class userPrivacySettingRuleAllowChatMembers final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat identifiers, total number of chats in all rules must not exceed 20.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * A rule to allow all members of certain specified basic groups and supergroups to doing something.
   */
  userPrivacySettingRuleAllowChatMembers();

  /**
   * A rule to allow all members of certain specified basic groups and supergroups to doing something.
   *
   * \param[in] chat_ids_ The chat identifiers, total number of chats in all rules must not exceed 20.
   */
  explicit userPrivacySettingRuleAllowChatMembers(array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2048749863;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to restrict all users from doing something.
 */
class userPrivacySettingRuleRestrictAll final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to restrict all users from doing something.
   */
  userPrivacySettingRuleRestrictAll();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1406495408;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to restrict all contacts of the user from doing something.
 */
class userPrivacySettingRuleRestrictContacts final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to restrict all contacts of the user from doing something.
   */
  userPrivacySettingRuleRestrictContacts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1008389378;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to restrict all bots from doing something.
 */
class userPrivacySettingRuleRestrictBots final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A rule to restrict all bots from doing something.
   */
  userPrivacySettingRuleRestrictBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1902547363;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to restrict all specified users from doing something.
 */
class userPrivacySettingRuleRestrictUsers final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The user identifiers, total number of users in all rules must not exceed 1000.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * A rule to restrict all specified users from doing something.
   */
  userPrivacySettingRuleRestrictUsers();

  /**
   * A rule to restrict all specified users from doing something.
   *
   * \param[in] user_ids_ The user identifiers, total number of users in all rules must not exceed 1000.
   */
  explicit userPrivacySettingRuleRestrictUsers(array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 622796522;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A rule to restrict all members of specified basic groups and supergroups from doing something.
 */
class userPrivacySettingRuleRestrictChatMembers final : public UserPrivacySettingRule {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat identifiers, total number of chats in all rules must not exceed 20.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * A rule to restrict all members of specified basic groups and supergroups from doing something.
   */
  userPrivacySettingRuleRestrictChatMembers();

  /**
   * A rule to restrict all members of specified basic groups and supergroups from doing something.
   *
   * \param[in] chat_ids_ The chat identifiers, total number of chats in all rules must not exceed 20.
   */
  explicit userPrivacySettingRuleRestrictChatMembers(array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 392530897;

  static object_ptr<UserPrivacySettingRule> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class UserPrivacySettingRule;

/**
 * A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed.
 */
class userPrivacySettingRules final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A list of rules.
  array<object_ptr<UserPrivacySettingRule>> rules_;
  static jfieldID rules_fieldID;

  /**
   * A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed.
   */
  userPrivacySettingRules();

  /**
   * A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed.
   *
   * \param[in] rules_ A list of rules.
   */
  explicit userPrivacySettingRules(array<object_ptr<UserPrivacySettingRule>> &&rules_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 322477541;

  static object_ptr<userPrivacySettingRules> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains description of user rating.
 */
class userRating final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The level of the user; may be negative.
  int32 level_;
  static jfieldID level_fieldID;
  /// True, if the maximum level is reached.
  bool is_maximum_level_reached_;
  static jfieldID is_maximum_level_reached_fieldID;
  /// Numerical value of the rating.
  int53 rating_;
  static jfieldID rating_fieldID;
  /// The rating required for the current level.
  int53 current_level_rating_;
  static jfieldID current_level_rating_fieldID;
  /// The rating required for the next level; 0 if the maximum level is reached.
  int53 next_level_rating_;
  static jfieldID next_level_rating_fieldID;

  /**
   * Contains description of user rating.
   */
  userRating();

  /**
   * Contains description of user rating.
   *
   * \param[in] level_ The level of the user; may be negative.
   * \param[in] is_maximum_level_reached_ True, if the maximum level is reached.
   * \param[in] rating_ Numerical value of the rating.
   * \param[in] current_level_rating_ The rating required for the current level.
   * \param[in] next_level_rating_ The rating required for the next level; 0 if the maximum level is reached.
   */
  userRating(int32 level_, bool is_maximum_level_reached_, int53 rating_, int53 current_level_rating_, int53 next_level_rating_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 532047235;

  static object_ptr<userRating> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes the last time the user was online.
 */
class UserStatus: public Object {
 public:
  static jclass Class;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user's status has never been changed.
 */
class userStatusEmpty final : public UserStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The user's status has never been changed.
   */
  userStatusEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 164646985;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is online.
 */
class userStatusOnline final : public UserStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the user's online status will expire.
  int32 expires_;
  static jfieldID expires_fieldID;

  /**
   * The user is online.
   */
  userStatusOnline();

  /**
   * The user is online.
   *
   * \param[in] expires_ Point in time (Unix timestamp) when the user's online status will expire.
   */
  explicit userStatusOnline(int32 expires_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1529460876;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is offline.
 */
class userStatusOffline final : public UserStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Point in time (Unix timestamp) when the user was last online.
  int32 was_online_;
  static jfieldID was_online_fieldID;

  /**
   * The user is offline.
   */
  userStatusOffline();

  /**
   * The user is offline.
   *
   * \param[in] was_online_ Point in time (Unix timestamp) when the user was last online.
   */
  explicit userStatusOffline(int32 was_online_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -759984891;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user was online recently.
 */
class userStatusRecently final : public UserStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium.
  bool by_my_privacy_settings_;
  static jfieldID by_my_privacy_settings_fieldID;

  /**
   * The user was online recently.
   */
  userStatusRecently();

  /**
   * The user was online recently.
   *
   * \param[in] by_my_privacy_settings_ Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium.
   */
  explicit userStatusRecently(bool by_my_privacy_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 262824117;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is offline, but was online last week.
 */
class userStatusLastWeek final : public UserStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium.
  bool by_my_privacy_settings_;
  static jfieldID by_my_privacy_settings_fieldID;

  /**
   * The user is offline, but was online last week.
   */
  userStatusLastWeek();

  /**
   * The user is offline, but was online last week.
   *
   * \param[in] by_my_privacy_settings_ Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium.
   */
  explicit userStatusLastWeek(bool by_my_privacy_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 310385495;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The user is offline, but was online last month.
 */
class userStatusLastMonth final : public UserStatus {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium.
  bool by_my_privacy_settings_;
  static jfieldID by_my_privacy_settings_fieldID;

  /**
   * The user is offline, but was online last month.
   */
  userStatusLastMonth();

  /**
   * The user is offline, but was online last month.
   *
   * \param[in] by_my_privacy_settings_ Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium.
   */
  explicit userStatusLastMonth(bool by_my_privacy_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1194644996;

  static object_ptr<UserStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Contains custom information about the user.
 */
class userSupportInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information message.
  object_ptr<formattedText> message_;
  static jfieldID message_fieldID;
  /// Information author.
  string author_;
  static jfieldID author_fieldID;
  /// Information change date.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Contains custom information about the user.
   */
  userSupportInfo();

  /**
   * Contains custom information about the user.
   *
   * \param[in] message_ Information message.
   * \param[in] author_ Information author.
   * \param[in] date_ Information change date.
   */
  userSupportInfo(object_ptr<formattedText> &&message_, string const &author_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1257366487;

  static object_ptr<userSupportInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Represents the type of user. The following types are possible: regular users, deleted users and bots.
 */
class UserType: public Object {
 public:
  static jclass Class;

  static object_ptr<UserType> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A regular user.
 */
class userTypeRegular final : public UserType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A regular user.
   */
  userTypeRegular();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -598644325;

  static object_ptr<UserType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user.
 */
class userTypeDeleted final : public UserType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user.
   */
  userTypeDeleted();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1807729372;

  static object_ptr<UserType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A bot (see https://core.telegram.org/bots).
 */
class userTypeBot final : public UserType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the bot is owned by the current user and can be edited using the methods toggleBotUsernameIsActive, reorderBotActiveUsernames, setBotProfilePhoto, setBotName, setBotInfoDescription, and setBotInfoShortDescription.
  bool can_be_edited_;
  static jfieldID can_be_edited_fieldID;
  /// True, if the bot can be invited to basic group and supergroup chats.
  bool can_join_groups_;
  static jfieldID can_join_groups_fieldID;
  /// True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages.
  bool can_read_all_group_messages_;
  static jfieldID can_read_all_group_messages_fieldID;
  /// True, if the bot has the main Web App.
  bool has_main_web_app_;
  static jfieldID has_main_web_app_fieldID;
  /// True, if the bot has topics.
  bool has_topics_;
  static jfieldID has_topics_fieldID;
  /// True, if users can create and delete topics in the chat with the bot.
  bool allows_users_to_create_topics_;
  static jfieldID allows_users_to_create_topics_fieldID;
  /// True, if the bot can manage other bots.
  bool can_manage_bots_;
  static jfieldID can_manage_bots_fieldID;
  /// True, if the bot supports inline queries.
  bool is_inline_;
  static jfieldID is_inline_fieldID;
  /// Placeholder for inline queries (displayed on the application input field).
  string inline_query_placeholder_;
  static jfieldID inline_query_placeholder_fieldID;
  /// True, if the bot can be queried by username from any non-secret chat.
  bool supports_guest_queries_;
  static jfieldID supports_guest_queries_fieldID;
  /// True, if the location of the user is expected to be sent with every inline query to this bot.
  bool need_location_;
  static jfieldID need_location_fieldID;
  /// True, if the bot supports connection to user accounts for chat automation.
  bool can_connect_to_business_;
  static jfieldID can_connect_to_business_fieldID;
  /// True, if the bot can be added to attachment or side menu.
  bool can_be_added_to_attachment_menu_;
  static jfieldID can_be_added_to_attachment_menu_fieldID;
  /// The number of recently active users of the bot.
  int32 active_user_count_;
  static jfieldID active_user_count_fieldID;

  /**
   * A bot (see https://core.telegram.org/bots).
   */
  userTypeBot();

  /**
   * A bot (see https://core.telegram.org/bots).
   *
   * \param[in] can_be_edited_ True, if the bot is owned by the current user and can be edited using the methods toggleBotUsernameIsActive, reorderBotActiveUsernames, setBotProfilePhoto, setBotName, setBotInfoDescription, and setBotInfoShortDescription.
   * \param[in] can_join_groups_ True, if the bot can be invited to basic group and supergroup chats.
   * \param[in] can_read_all_group_messages_ True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages.
   * \param[in] has_main_web_app_ True, if the bot has the main Web App.
   * \param[in] has_topics_ True, if the bot has topics.
   * \param[in] allows_users_to_create_topics_ True, if users can create and delete topics in the chat with the bot.
   * \param[in] can_manage_bots_ True, if the bot can manage other bots.
   * \param[in] is_inline_ True, if the bot supports inline queries.
   * \param[in] inline_query_placeholder_ Placeholder for inline queries (displayed on the application input field).
   * \param[in] supports_guest_queries_ True, if the bot can be queried by username from any non-secret chat.
   * \param[in] need_location_ True, if the location of the user is expected to be sent with every inline query to this bot.
   * \param[in] can_connect_to_business_ True, if the bot supports connection to user accounts for chat automation.
   * \param[in] can_be_added_to_attachment_menu_ True, if the bot can be added to attachment or side menu.
   * \param[in] active_user_count_ The number of recently active users of the bot.
   */
  userTypeBot(bool can_be_edited_, bool can_join_groups_, bool can_read_all_group_messages_, bool has_main_web_app_, bool has_topics_, bool allows_users_to_create_topics_, bool can_manage_bots_, bool is_inline_, string const &inline_query_placeholder_, bool supports_guest_queries_, bool need_location_, bool can_connect_to_business_, bool can_be_added_to_attachment_menu_, int32 active_user_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1040936013;

  static object_ptr<UserType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type.
 */
class userTypeUnknown final : public UserType {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type.
   */
  userTypeUnknown();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -724541123;

  static object_ptr<UserType> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Describes usernames assigned to a user, a supergroup, or a channel.
 */
class usernames final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames or reorderSupergroupActiveUsernames.
  array<string> active_usernames_;
  static jfieldID active_usernames_fieldID;
  /// List of currently disabled usernames; the username can be activated with toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive.
  array<string> disabled_usernames_;
  static jfieldID disabled_usernames_fieldID;
  /// Active or disabled username, which may be changed with setUsername or setSupergroupUsername.
  string editable_username_;
  static jfieldID editable_username_fieldID;
  /// Collectible usernames that were purchased at https://fragment.com and can be passed to getCollectibleItemInfo for more details.
  array<string> collectible_usernames_;
  static jfieldID collectible_usernames_fieldID;

  /**
   * Describes usernames assigned to a user, a supergroup, or a channel.
   */
  usernames();

  /**
   * Describes usernames assigned to a user, a supergroup, or a channel.
   *
   * \param[in] active_usernames_ List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames or reorderSupergroupActiveUsernames.
   * \param[in] disabled_usernames_ List of currently disabled usernames; the username can be activated with toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive.
   * \param[in] editable_username_ Active or disabled username, which may be changed with setUsername or setSupergroupUsername.
   * \param[in] collectible_usernames_ Collectible usernames that were purchased at https://fragment.com and can be passed to getCollectibleItemInfo for more details.
   */
  usernames(array<string> &&active_usernames_, array<string> &&disabled_usernames_, string const &editable_username_, array<string> &&collectible_usernames_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1263390614;

  static object_ptr<usernames> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Represents a list of users.
 */
class users final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Approximate total number of users found.
  int32 total_count_;
  static jfieldID total_count_fieldID;
  /// A list of user identifiers.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Represents a list of users.
   */
  users();

  /**
   * Represents a list of users.
   *
   * \param[in] total_count_ Approximate total number of users found.
   * \param[in] user_ids_ A list of user identifiers.
   */
  users(int32 total_count_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 171203420;

  static object_ptr<users> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class shippingOption;

/**
 * Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options.
 */
class validatedOrderInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Temporary identifier of the order information.
  string order_info_id_;
  static jfieldID order_info_id_fieldID;
  /// Available shipping options.
  array<object_ptr<shippingOption>> shipping_options_;
  static jfieldID shipping_options_fieldID;

  /**
   * Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options.
   */
  validatedOrderInfo();

  /**
   * Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options.
   *
   * \param[in] order_info_id_ Temporary identifier of the order information.
   * \param[in] shipping_options_ Available shipping options.
   */
  validatedOrderInfo(string const &order_info_id_, array<object_ptr<shippingOption>> &&shipping_options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1511451484;

  static object_ptr<validatedOrderInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class point;

/**
 * This class is an abstract base class.
 * Represents a vector path command.
 */
class VectorPathCommand: public Object {
 public:
  static jclass Class;

  static object_ptr<VectorPathCommand> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A straight line to a given point.
 */
class vectorPathCommandLine final : public VectorPathCommand {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The end point of the straight line.
  object_ptr<point> end_point_;
  static jfieldID end_point_fieldID;

  /**
   * A straight line to a given point.
   */
  vectorPathCommandLine();

  /**
   * A straight line to a given point.
   *
   * \param[in] end_point_ The end point of the straight line.
   */
  explicit vectorPathCommandLine(object_ptr<point> &&end_point_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -614056822;

  static object_ptr<VectorPathCommand> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * A cubic Bézier curve to a given point.
 */
class vectorPathCommandCubicBezierCurve final : public VectorPathCommand {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The start control point of the curve.
  object_ptr<point> start_control_point_;
  static jfieldID start_control_point_fieldID;
  /// The end control point of the curve.
  object_ptr<point> end_control_point_;
  static jfieldID end_control_point_fieldID;
  /// The end point of the curve.
  object_ptr<point> end_point_;
  static jfieldID end_point_fieldID;

  /**
   * A cubic Bézier curve to a given point.
   */
  vectorPathCommandCubicBezierCurve();

  /**
   * A cubic Bézier curve to a given point.
   *
   * \param[in] start_control_point_ The start control point of the curve.
   * \param[in] end_control_point_ The end control point of the curve.
   * \param[in] end_point_ The end point of the curve.
   */
  vectorPathCommandCubicBezierCurve(object_ptr<point> &&start_control_point_, object_ptr<point> &&end_control_point_, object_ptr<point> &&end_point_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1229733434;

  static object_ptr<VectorPathCommand> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class location;

/**
 * Describes a venue.
 */
class venue final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Venue location; as defined by the sender.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Venue name; as defined by the sender.
  string title_;
  static jfieldID title_fieldID;
  /// Venue address; as defined by the sender.
  string address_;
  static jfieldID address_fieldID;
  /// Provider of the venue database; as defined by the sender. Currently, only &quot;foursquare&quot; and &quot;gplaces&quot; (Google Places) need to be supported.
  string provider_;
  static jfieldID provider_fieldID;
  /// Identifier of the venue in the provider database; as defined by the sender.
  string id_;
  static jfieldID id_fieldID;
  /// Type of the venue in the provider database; as defined by the sender.
  string type_;
  static jfieldID type_fieldID;

  /**
   * Describes a venue.
   */
  venue();

  /**
   * Describes a venue.
   *
   * \param[in] location_ Venue location; as defined by the sender.
   * \param[in] title_ Venue name; as defined by the sender.
   * \param[in] address_ Venue address; as defined by the sender.
   * \param[in] provider_ Provider of the venue database; as defined by the sender. Currently, only &quot;foursquare&quot; and &quot;gplaces&quot; (Google Places) need to be supported.
   * \param[in] id_ Identifier of the venue in the provider database; as defined by the sender.
   * \param[in] type_ Type of the venue in the provider database; as defined by the sender.
   */
  venue(object_ptr<location> &&location_, string const &title_, string const &address_, string const &provider_, string const &id_, string const &type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1070406393;

  static object_ptr<venue> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about verification status of a chat or a user.
 */
class verificationStatus final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// True, if the chat or the user is verified by Telegram.
  bool is_verified_;
  static jfieldID is_verified_fieldID;
  /// True, if the chat or the user is marked as scam by Telegram.
  bool is_scam_;
  static jfieldID is_scam_fieldID;
  /// True, if the chat or the user is marked as fake by Telegram.
  bool is_fake_;
  static jfieldID is_fake_fieldID;
  /// Identifier of the custom emoji to be shown as verification sign provided by a bot for the user; 0 if none.
  int64 bot_verification_icon_custom_emoji_id_;
  static jfieldID bot_verification_icon_custom_emoji_id_fieldID;

  /**
   * Contains information about verification status of a chat or a user.
   */
  verificationStatus();

  /**
   * Contains information about verification status of a chat or a user.
   *
   * \param[in] is_verified_ True, if the chat or the user is verified by Telegram.
   * \param[in] is_scam_ True, if the chat or the user is marked as scam by Telegram.
   * \param[in] is_fake_ True, if the chat or the user is marked as fake by Telegram.
   * \param[in] bot_verification_icon_custom_emoji_id_ Identifier of the custom emoji to be shown as verification sign provided by a bot for the user; 0 if none.
   */
  verificationStatus(bool is_verified_, bool is_scam_, bool is_fake_, int64 bot_verification_icon_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 988193164;

  static object_ptr<verificationStatus> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes a video file.
 */
class video final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Duration of the video, in seconds; as defined by the sender.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Video width; as defined by the sender.
  int32 width_;
  static jfieldID width_fieldID;
  /// Video height; as defined by the sender.
  int32 height_;
  static jfieldID height_fieldID;
  /// Original name of the file; as defined by the sender.
  string file_name_;
  static jfieldID file_name_fieldID;
  /// MIME type of the file; as defined by the sender.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets.
  bool has_stickers_;
  static jfieldID has_stickers_fieldID;
  /// True, if the video is expected to be streamed.
  bool supports_streaming_;
  static jfieldID supports_streaming_fieldID;
  /// Video minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// File containing the video.
  object_ptr<file> video_;
  static jfieldID video_fieldID;

  /**
   * Describes a video file.
   */
  video();

  /**
   * Describes a video file.
   *
   * \param[in] duration_ Duration of the video, in seconds; as defined by the sender.
   * \param[in] width_ Video width; as defined by the sender.
   * \param[in] height_ Video height; as defined by the sender.
   * \param[in] file_name_ Original name of the file; as defined by the sender.
   * \param[in] mime_type_ MIME type of the file; as defined by the sender.
   * \param[in] has_stickers_ True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets.
   * \param[in] supports_streaming_ True, if the video is expected to be streamed.
   * \param[in] minithumbnail_ Video minithumbnail; may be null.
   * \param[in] thumbnail_ Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null.
   * \param[in] video_ File containing the video.
   */
  video(int32 duration_, int32 width_, int32 height_, string const &file_name_, string const &mime_type_, bool has_stickers_, bool supports_streaming_, object_ptr<minithumbnail> &&minithumbnail_, object_ptr<thumbnail> &&thumbnail_, object_ptr<file> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 832856268;

  static object_ptr<video> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Describes a video chat, i.e. a group call bound to a chat.
 */
class videoChat final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// True, if the video chat has participants.
  bool has_participants_;
  static jfieldID has_participants_fieldID;
  /// Default group call participant identifier to join the video chat; may be null.
  object_ptr<MessageSender> default_participant_id_;
  static jfieldID default_participant_id_fieldID;

  /**
   * Describes a video chat, i.e. a group call bound to a chat.
   */
  videoChat();

  /**
   * Describes a video chat, i.e. a group call bound to a chat.
   *
   * \param[in] group_call_id_ Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall.
   * \param[in] has_participants_ True, if the video chat has participants.
   * \param[in] default_participant_id_ Default group call participant identifier to join the video chat; may be null.
   */
  videoChat(int32 group_call_id_, bool has_participants_, object_ptr<MessageSender> &&default_participant_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1374319320;

  static object_ptr<videoChat> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class advertisementSponsor;

/**
 * Describes an advertisement to be shown while a video from a message is watched.
 */
class videoMessageAdvertisement final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of this result.
  int53 unique_id_;
  static jfieldID unique_id_fieldID;
  /// Text of the advertisement.
  string text_;
  static jfieldID text_fieldID;
  /// The minimum amount of time the advertisement must be displayed before it can be hidden by the user, in seconds.
  int32 min_display_duration_;
  static jfieldID min_display_duration_fieldID;
  /// The maximum amount of time the advertisement must be displayed before it must be automatically hidden, in seconds.
  int32 max_display_duration_;
  static jfieldID max_display_duration_fieldID;
  /// True, if the advertisement can be reported to Telegram moderators through reportVideoMessageAdvertisement.
  bool can_be_reported_;
  static jfieldID can_be_reported_fieldID;
  /// Information about the sponsor of the advertisement.
  object_ptr<advertisementSponsor> sponsor_;
  static jfieldID sponsor_fieldID;
  /// Title of the sponsored message.
  string title_;
  static jfieldID title_fieldID;
  /// If non-empty, additional information about the sponsored message to be shown along with the message.
  string additional_info_;
  static jfieldID additional_info_fieldID;

  /**
   * Describes an advertisement to be shown while a video from a message is watched.
   */
  videoMessageAdvertisement();

  /**
   * Describes an advertisement to be shown while a video from a message is watched.
   *
   * \param[in] unique_id_ Unique identifier of this result.
   * \param[in] text_ Text of the advertisement.
   * \param[in] min_display_duration_ The minimum amount of time the advertisement must be displayed before it can be hidden by the user, in seconds.
   * \param[in] max_display_duration_ The maximum amount of time the advertisement must be displayed before it must be automatically hidden, in seconds.
   * \param[in] can_be_reported_ True, if the advertisement can be reported to Telegram moderators through reportVideoMessageAdvertisement.
   * \param[in] sponsor_ Information about the sponsor of the advertisement.
   * \param[in] title_ Title of the sponsored message.
   * \param[in] additional_info_ If non-empty, additional information about the sponsored message to be shown along with the message.
   */
  videoMessageAdvertisement(int53 unique_id_, string const &text_, int32 min_display_duration_, int32 max_display_duration_, bool can_be_reported_, object_ptr<advertisementSponsor> &&sponsor_, string const &title_, string const &additional_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -112391535;

  static object_ptr<videoMessageAdvertisement> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class videoMessageAdvertisement;

/**
 * Contains a list of advertisements to be shown while a video from a message is watched.
 */
class videoMessageAdvertisements final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of advertisements.
  array<object_ptr<videoMessageAdvertisement>> advertisements_;
  static jfieldID advertisements_fieldID;
  /// Delay before the first advertisement is shown, in seconds.
  int32 start_delay_;
  static jfieldID start_delay_fieldID;
  /// Delay between consecutive advertisements, in seconds.
  int32 between_delay_;
  static jfieldID between_delay_fieldID;

  /**
   * Contains a list of advertisements to be shown while a video from a message is watched.
   */
  videoMessageAdvertisements();

  /**
   * Contains a list of advertisements to be shown while a video from a message is watched.
   *
   * \param[in] advertisements_ List of advertisements.
   * \param[in] start_delay_ Delay before the first advertisement is shown, in seconds.
   * \param[in] between_delay_ Delay between consecutive advertisements, in seconds.
   */
  videoMessageAdvertisements(array<object_ptr<videoMessageAdvertisement>> &&advertisements_, int32 start_delay_, int32 between_delay_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1776370217;

  static object_ptr<videoMessageAdvertisements> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SpeechRecognitionResult;

class file;

class minithumbnail;

class thumbnail;

/**
 * Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format.
 */
class videoNote final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Duration of the video, in seconds; as defined by the sender.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// A waveform representation of the video note's audio in 5-bit format; may be empty if unknown.
  bytes waveform_;
  static jfieldID waveform_fieldID;
  /// Video width and height; as defined by the sender.
  int32 length_;
  static jfieldID length_fieldID;
  /// Video minithumbnail; may be null.
  object_ptr<minithumbnail> minithumbnail_;
  static jfieldID minithumbnail_fieldID;
  /// Video thumbnail in JPEG format; as defined by the sender; may be null.
  object_ptr<thumbnail> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Result of speech recognition in the video note; may be null.
  object_ptr<SpeechRecognitionResult> speech_recognition_result_;
  static jfieldID speech_recognition_result_fieldID;
  /// File containing the video.
  object_ptr<file> video_;
  static jfieldID video_fieldID;

  /**
   * Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format.
   */
  videoNote();

  /**
   * Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format.
   *
   * \param[in] duration_ Duration of the video, in seconds; as defined by the sender.
   * \param[in] waveform_ A waveform representation of the video note's audio in 5-bit format; may be empty if unknown.
   * \param[in] length_ Video width and height; as defined by the sender.
   * \param[in] minithumbnail_ Video minithumbnail; may be null.
   * \param[in] thumbnail_ Video thumbnail in JPEG format; as defined by the sender; may be null.
   * \param[in] speech_recognition_result_ Result of speech recognition in the video note; may be null.
   * \param[in] video_ File containing the video.
   */
  videoNote(int32 duration_, bytes const &waveform_, int32 length_, object_ptr<minithumbnail> &&minithumbnail_, object_ptr<thumbnail> &&thumbnail_, object_ptr<SpeechRecognitionResult> &&speech_recognition_result_, object_ptr<file> &&video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2062096581;

  static object_ptr<videoNote> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Describes a storyboard for a video.
 */
class videoStoryboard final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A JPEG file that contains tiled previews of video.
  object_ptr<file> storyboard_file_;
  static jfieldID storyboard_file_fieldID;
  /// Width of a tile.
  int32 width_;
  static jfieldID width_fieldID;
  /// Height of a tile.
  int32 height_;
  static jfieldID height_fieldID;
  /// File that describes mapping of position in the video to a tile in the JPEG file.
  object_ptr<file> map_file_;
  static jfieldID map_file_fieldID;

  /**
   * Describes a storyboard for a video.
   */
  videoStoryboard();

  /**
   * Describes a storyboard for a video.
   *
   * \param[in] storyboard_file_ A JPEG file that contains tiled previews of video.
   * \param[in] width_ Width of a tile.
   * \param[in] height_ Height of a tile.
   * \param[in] map_file_ File that describes mapping of position in the video to a tile in the JPEG file.
   */
  videoStoryboard(object_ptr<file> &&storyboard_file_, int32 width_, int32 height_, object_ptr<file> &&map_file_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1731320034;

  static object_ptr<videoStoryboard> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class SpeechRecognitionResult;

class file;

/**
 * Describes a voice note.
 */
class voiceNote final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Duration of the voice note, in seconds; as defined by the sender.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// A waveform representation of the voice note in 5-bit format.
  bytes waveform_;
  static jfieldID waveform_fieldID;
  /// MIME type of the file; as defined by the sender. Usually, one of &quot;audio/ogg&quot; for Opus in an OGG container, &quot;audio/mpeg&quot; for an MP3 audio, or &quot;audio/mp4&quot; for an M4A audio.
  string mime_type_;
  static jfieldID mime_type_fieldID;
  /// Result of speech recognition in the voice note; may be null.
  object_ptr<SpeechRecognitionResult> speech_recognition_result_;
  static jfieldID speech_recognition_result_fieldID;
  /// File containing the voice note.
  object_ptr<file> voice_;
  static jfieldID voice_fieldID;

  /**
   * Describes a voice note.
   */
  voiceNote();

  /**
   * Describes a voice note.
   *
   * \param[in] duration_ Duration of the voice note, in seconds; as defined by the sender.
   * \param[in] waveform_ A waveform representation of the voice note in 5-bit format.
   * \param[in] mime_type_ MIME type of the file; as defined by the sender. Usually, one of &quot;audio/ogg&quot; for Opus in an OGG container, &quot;audio/mpeg&quot; for an MP3 audio, or &quot;audio/mp4&quot; for an M4A audio.
   * \param[in] speech_recognition_result_ Result of speech recognition in the voice note; may be null.
   * \param[in] voice_ File containing the voice note.
   */
  voiceNote(int32 duration_, bytes const &waveform_, string const &mime_type_, object_ptr<SpeechRecognitionResult> &&speech_recognition_result_, object_ptr<file> &&voice_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1175302923;

  static object_ptr<voiceNote> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class animation;

class photo;

/**
 * Describes a Web App. Use getInternalLink with internalLinkTypeWebApp to share the Web App.
 */
class webApp final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Web App short name.
  string short_name_;
  static jfieldID short_name_fieldID;
  /// Web App title.
  string title_;
  static jfieldID title_fieldID;
  /// Web App description.
  string description_;
  static jfieldID description_fieldID;
  /// Web App photo.
  object_ptr<photo> photo_;
  static jfieldID photo_fieldID;
  /// Web App animation; may be null.
  object_ptr<animation> animation_;
  static jfieldID animation_fieldID;

  /**
   * Describes a Web App. Use getInternalLink with internalLinkTypeWebApp to share the Web App.
   */
  webApp();

  /**
   * Describes a Web App. Use getInternalLink with internalLinkTypeWebApp to share the Web App.
   *
   * \param[in] short_name_ Web App short name.
   * \param[in] title_ Web App title.
   * \param[in] description_ Web App description.
   * \param[in] photo_ Web App photo.
   * \param[in] animation_ Web App animation; may be null.
   */
  webApp(string const &short_name_, string const &title_, string const &description_, object_ptr<photo> &&photo_, object_ptr<animation> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1616619763;

  static object_ptr<webApp> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * Contains information about a Web App.
 */
class webAppInfo final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the Web App launch.
  int64 launch_id_;
  static jfieldID launch_id_fieldID;
  /// A Web App URL to open in a web view.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Contains information about a Web App.
   */
  webAppInfo();

  /**
   * Contains information about a Web App.
   *
   * \param[in] launch_id_ Unique identifier for the Web App launch.
   * \param[in] url_ A Web App URL to open in a web view.
   */
  webAppInfo(int64 launch_id_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 788378344;

  static object_ptr<webAppInfo> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * This class is an abstract base class.
 * Describes mode in which a Web App is opened.
 */
class WebAppOpenMode: public Object {
 public:
  static jclass Class;

  static object_ptr<WebAppOpenMode> fetch(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Web App is opened in the compact mode.
 */
class webAppOpenModeCompact final : public WebAppOpenMode {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The Web App is opened in the compact mode.
   */
  webAppOpenModeCompact();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1711603675;

  static object_ptr<WebAppOpenMode> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Web App is opened in the full-size mode.
 */
class webAppOpenModeFullSize final : public WebAppOpenMode {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The Web App is opened in the full-size mode.
   */
  webAppOpenModeFullSize();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 189320513;

  static object_ptr<WebAppOpenMode> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

/**
 * The Web App is opened in the full-screen mode.
 */
class webAppOpenModeFullScreen final : public WebAppOpenMode {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * The Web App is opened in the full-screen mode.
   */
  webAppOpenModeFullScreen();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1871315357;

  static object_ptr<WebAppOpenMode> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class WebAppOpenMode;

class themeParameters;

/**
 * Options to be used when a Web App is opened.
 */
class webAppOpenParameters final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Preferred Web App theme; pass null to use the default theme.
  object_ptr<themeParameters> theme_;
  static jfieldID theme_fieldID;
  /// Short name of the current application; 0-64 English letters, digits, and underscores.
  string application_name_;
  static jfieldID application_name_fieldID;
  /// The mode in which the Web App is opened; pass null to open in webAppOpenModeFullSize.
  object_ptr<WebAppOpenMode> mode_;
  static jfieldID mode_fieldID;

  /**
   * Options to be used when a Web App is opened.
   */
  webAppOpenParameters();

  /**
   * Options to be used when a Web App is opened.
   *
   * \param[in] theme_ Preferred Web App theme; pass null to use the default theme.
   * \param[in] application_name_ Short name of the current application; 0-64 English letters, digits, and underscores.
   * \param[in] mode_ The mode in which the Web App is opened; pass null to open in webAppOpenModeFullSize.
   */
  webAppOpenParameters(object_ptr<themeParameters> &&theme_, string const &application_name_, object_ptr<WebAppOpenMode> &&mode_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1375356527;

  static object_ptr<webAppOpenParameters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

class PageBlock;

/**
 * Describes an instant view page for a web page.
 */
class webPageInstantView final : public Object {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Content of the instant view page.
  array<object_ptr<PageBlock>> page_blocks_;
  static jfieldID page_blocks_fieldID;
  /// Number of the instant view views; 0 if unknown.
  int32 view_count_;
  static jfieldID view_count_fieldID;
  /// Version of the instant view; currently, can be 1 or 2.
  int32 version_;
  static jfieldID version_fieldID;
  /// True, if the instant view must be shown from right to left.
  bool is_rtl_;
  static jfieldID is_rtl_fieldID;
  /// True, if the instant view contains the full page. A network request might be needed to get the full instant view.
  bool is_full_;
  static jfieldID is_full_fieldID;
  /// An internal link to be opened to leave feedback about the instant view.
  object_ptr<InternalLinkType> feedback_link_;
  static jfieldID feedback_link_fieldID;

  /**
   * Describes an instant view page for a web page.
   */
  webPageInstantView();

  /**
   * Describes an instant view page for a web page.
   *
   * \param[in] page_blocks_ Content of the instant view page.
   * \param[in] view_count_ Number of the instant view views; 0 if unknown.
   * \param[in] version_ Version of the instant view; currently, can be 1 or 2.
   * \param[in] is_rtl_ True, if the instant view must be shown from right to left.
   * \param[in] is_full_ True, if the instant view contains the full page. A network request might be needed to get the full instant view.
   * \param[in] feedback_link_ An internal link to be opened to leave feedback about the instant view.
   */
  webPageInstantView(array<object_ptr<PageBlock>> &&page_blocks_, int32 view_count_, int32 version_, bool is_rtl_, bool is_full_, object_ptr<InternalLinkType> &&feedback_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 778202453;

  static object_ptr<webPageInstantView> fetch(JNIEnv *env, jobject &p);

  void store(JNIEnv *env, jobject &s) const final;

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static void init_jni_vars(JNIEnv *env);
};

class callProtocol;

class ok;

/**
 * Accepts an incoming call.
 *
 * Returns object_ptr<Ok>.
 */
class acceptCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  int32 call_id_;
  static jfieldID call_id_fieldID;
  /// The call protocols supported by the application.
  object_ptr<callProtocol> protocol_;
  static jfieldID protocol_fieldID;

  /**
   * Default constructor for a function, which accepts an incoming call.
   *
   * Returns object_ptr<Ok>.
   */
  acceptCall();

  /**
   * Creates a function, which accepts an incoming call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] call_id_ Call identifier.
   * \param[in] protocol_ The call protocols supported by the application.
   */
  acceptCall(int32 call_id_, object_ptr<callProtocol> &&protocol_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -646618416;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<acceptCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Accepts an OAuth authorization request. Returns an HTTP URL to open after successful authorization. May return an empty link if just a toast about successful login has to be shown.
 *
 * Returns object_ptr<HttpUrl>.
 */
class acceptOauthRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the OAuth deep link.
  string url_;
  static jfieldID url_fieldID;
  /// The matching code chosen by the user.
  string match_code_;
  static jfieldID match_code_fieldID;
  /// Pass true if the current user allowed the bot that was returned in getOauthLinkInfo, to send them messages.
  bool allow_write_access_;
  static jfieldID allow_write_access_fieldID;
  /// Pass true if the current user allowed the bot that was returned in getOauthLinkInfo, to access their phone number.
  bool allow_phone_number_access_;
  static jfieldID allow_phone_number_access_fieldID;

  /**
   * Default constructor for a function, which accepts an OAuth authorization request. Returns an HTTP URL to open after successful authorization. May return an empty link if just a toast about successful login has to be shown.
   *
   * Returns object_ptr<HttpUrl>.
   */
  acceptOauthRequest();

  /**
   * Creates a function, which accepts an OAuth authorization request. Returns an HTTP URL to open after successful authorization. May return an empty link if just a toast about successful login has to be shown.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] url_ URL of the OAuth deep link.
   * \param[in] match_code_ The matching code chosen by the user.
   * \param[in] allow_write_access_ Pass true if the current user allowed the bot that was returned in getOauthLinkInfo, to send them messages.
   * \param[in] allow_phone_number_access_ Pass true if the current user allowed the bot that was returned in getOauthLinkInfo, to access their phone number.
   */
  acceptOauthRequest(string const &url_, string const &match_code_, bool allow_write_access_, bool allow_phone_number_access_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -427442108;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<acceptOauthRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Accepts Telegram terms of services.
 *
 * Returns object_ptr<Ok>.
 */
class acceptTermsOfService final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Terms of service identifier.
  string terms_of_service_id_;
  static jfieldID terms_of_service_id_fieldID;

  /**
   * Default constructor for a function, which accepts Telegram terms of services.
   *
   * Returns object_ptr<Ok>.
   */
  acceptTermsOfService();

  /**
   * Creates a function, which accepts Telegram terms of services.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] terms_of_service_id_ Terms of service identifier.
   */
  explicit acceptTermsOfService(string const &terms_of_service_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2130576356;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<acceptTermsOfService> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Activates stealth mode for stories, which hides all views of stories from the current user in the last &quot;story_stealth_mode_past_period&quot; seconds and for the next &quot;story_stealth_mode_future_period&quot; seconds; for Telegram Premium users only.
 *
 * Returns object_ptr<Ok>.
 */
class activateStoryStealthMode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which activates stealth mode for stories, which hides all views of stories from the current user in the last &quot;story_stealth_mode_past_period&quot; seconds and for the next &quot;story_stealth_mode_future_period&quot; seconds; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   */
  activateStoryStealthMode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1009023855;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<activateStoryStealthMode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputStoryContent;

class botMediaPreview;

/**
 * Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption(&quot;bot_media_preview_count_max&quot;) for the given language.
 *
 * Returns object_ptr<BotMediaPreview>.
 */
class addBotMediaPreview final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code for which preview is added. If empty, then the preview will be shown to all users for whose languages there are no dedicated previews. If non-empty, then there must be an official language pack of the same name, which is returned by getLocalizationTargetInfo.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// Content of the added preview.
  object_ptr<InputStoryContent> content_;
  static jfieldID content_fieldID;

  /**
   * Default constructor for a function, which adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption(&quot;bot_media_preview_count_max&quot;) for the given language.
   *
   * Returns object_ptr<BotMediaPreview>.
   */
  addBotMediaPreview();

  /**
   * Creates a function, which adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption(&quot;bot_media_preview_count_max&quot;) for the given language.
   *
   * Returns object_ptr<BotMediaPreview>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. The bot must be owned and must have the main Web App.
   * \param[in] language_code_ A two-letter ISO 639-1 language code for which preview is added. If empty, then the preview will be shown to all users for whose languages there are no dedicated previews. If non-empty, then there must be an official language pack of the same name, which is returned by getLocalizationTargetInfo.
   * \param[in] content_ Content of the added preview.
   */
  addBotMediaPreview(int53 bot_user_id_, string const &language_code_, object_ptr<InputStoryContent> &&content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1347126571;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botMediaPreview>;

  static object_ptr<addBotMediaPreview> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds a chat folder by an invite link.
 *
 * Returns object_ptr<Ok>.
 */
class addChatFolderByInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link for the chat folder.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * Default constructor for a function, which adds a chat folder by an invite link.
   *
   * Returns object_ptr<Ok>.
   */
  addChatFolderByInviteLink();

  /**
   * Creates a function, which adds a chat folder by an invite link.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] invite_link_ Invite link for the chat folder.
   * \param[in] chat_ids_ Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet.
   */
  addChatFolderByInviteLink(string const &invite_link_, array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -858593816;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addChatFolderByInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class failedToAddMembers;

/**
 * Adds a new member to a chat; requires can_invite_users member right. Members can't be added to private or secret chats. Returns information about members that weren't added.
 *
 * Returns object_ptr<FailedToAddMembers>.
 */
class addChatMember final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels, or if the added user is a bot.
  int32 forward_limit_;
  static jfieldID forward_limit_fieldID;

  /**
   * Default constructor for a function, which adds a new member to a chat; requires can_invite_users member right. Members can't be added to private or secret chats. Returns information about members that weren't added.
   *
   * Returns object_ptr<FailedToAddMembers>.
   */
  addChatMember();

  /**
   * Creates a function, which adds a new member to a chat; requires can_invite_users member right. Members can't be added to private or secret chats. Returns information about members that weren't added.
   *
   * Returns object_ptr<FailedToAddMembers>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] user_id_ Identifier of the user.
   * \param[in] forward_limit_ The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels, or if the added user is a bot.
   */
  addChatMember(int53 chat_id_, int53 user_id_, int32 forward_limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1720144407;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<failedToAddMembers>;

  static object_ptr<addChatMember> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class failedToAddMembers;

/**
 * Adds multiple new members to a chat; requires can_invite_users member right. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Returns information about members that weren't added.
 *
 * Returns object_ptr<FailedToAddMembers>.
 */
class addChatMembers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Default constructor for a function, which adds multiple new members to a chat; requires can_invite_users member right. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Returns information about members that weren't added.
   *
   * Returns object_ptr<FailedToAddMembers>.
   */
  addChatMembers();

  /**
   * Creates a function, which adds multiple new members to a chat; requires can_invite_users member right. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Returns information about members that weren't added.
   *
   * Returns object_ptr<FailedToAddMembers>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] user_ids_ Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels.
   */
  addChatMembers(int53 chat_id_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1675991329;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<failedToAddMembers>;

  static object_ptr<addChatMembers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class ok;

/**
 * Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed.
 *
 * Returns object_ptr<Ok>.
 */
class addChatToList final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The chat list. Use getChatListsToAddChat to get suitable chat lists.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;

  /**
   * Default constructor for a function, which adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed.
   *
   * Returns object_ptr<Ok>.
   */
  addChatToList();

  /**
   * Creates a function, which adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] chat_list_ The chat list. Use getChatListsToAddChat to get suitable chat lists.
   */
  addChatToList(int53 chat_id_, object_ptr<ChatList> &&chat_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -80523595;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addChatToList> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inputChecklistTask;

class ok;

/**
 * Adds tasks to a checklist in a message.
 *
 * Returns object_ptr<Ok>.
 */
class addChecklistTasks final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the checklist. Use messageProperties.can_add_tasks to check whether the tasks can be added.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// List of added tasks.
  array<object_ptr<inputChecklistTask>> tasks_;
  static jfieldID tasks_fieldID;

  /**
   * Default constructor for a function, which adds tasks to a checklist in a message.
   *
   * Returns object_ptr<Ok>.
   */
  addChecklistTasks();

  /**
   * Creates a function, which adds tasks to a checklist in a message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message containing the checklist. Use messageProperties.can_add_tasks to check whether the tasks can be added.
   * \param[in] tasks_ List of added tasks.
   */
  addChecklistTasks(int53 chat_id_, int53 message_id_, array<object_ptr<inputChecklistTask>> &&tasks_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1554619499;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addChecklistTasks> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class importedContact;

class ok;

/**
 * Adds a user to the contact list or edits an existing contact by their user identifier.
 *
 * Returns object_ptr<Ok>.
 */
class addContact final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The contact to add or edit; phone number may be empty and needs to be specified only if known.
  object_ptr<importedContact> contact_;
  static jfieldID contact_fieldID;
  /// Pass true to share the current user's phone number with the new contact. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number.
  bool share_phone_number_;
  static jfieldID share_phone_number_fieldID;

  /**
   * Default constructor for a function, which adds a user to the contact list or edits an existing contact by their user identifier.
   *
   * Returns object_ptr<Ok>.
   */
  addContact();

  /**
   * Creates a function, which adds a user to the contact list or edits an existing contact by their user identifier.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user.
   * \param[in] contact_ The contact to add or edit; phone number may be empty and needs to be specified only if known.
   * \param[in] share_phone_number_ Pass true to share the current user's phone number with the new contact. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number.
   */
  addContact(int53 user_id_, object_ptr<importedContact> &&contact_, bool share_phone_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2098628252;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addContact> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class addCustomServerLanguagePack final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a language pack to be added.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;

  /**
   * Default constructor for a function, which adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  addCustomServerLanguagePack();

  /**
   * Creates a function, which adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] language_pack_id_ Identifier of a language pack to be added.
   */
  explicit addCustomServerLanguagePack(string const &language_pack_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 4492771;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addCustomServerLanguagePack> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to favorite stickers.
 *
 * Returns object_ptr<Ok>.
 */
class addFavoriteSticker final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker file to add.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to favorite stickers.
   *
   * Returns object_ptr<Ok>.
   */
  addFavoriteSticker();

  /**
   * Creates a function, which adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to favorite stickers.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker file to add.
   */
  explicit addFavoriteSticker(object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 324504799;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addFavoriteSticker> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.
 *
 * Returns object_ptr<File>.
 */
class addFileToDownloads final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file to download.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Chat identifier of the message with the file.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.
  int32 priority_;
  static jfieldID priority_fieldID;

  /**
   * Default constructor for a function, which adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.
   *
   * Returns object_ptr<File>.
   */
  addFileToDownloads();

  /**
   * Creates a function, which adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] file_id_ Identifier of the file to download.
   * \param[in] chat_id_ Chat identifier of the message with the file.
   * \param[in] message_id_ Message identifier.
   * \param[in] priority_ Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.
   */
  addFileToDownloads(int32 file_id_, int53 chat_id_, int53 message_id_, int32 priority_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 867533751;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<addFileToDownloads> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftCollection;

/**
 * Adds gifts to the beginning of a previously created collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
 *
 * Returns object_ptr<GiftCollection>.
 */
class addGiftCollectionGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the collection.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Identifier of the gift collection.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;
  /// Identifier of the gifts to add to the collection; 1-getOption(&quot;gift_collection_size_max&quot;) identifiers. If after addition the collection has more than getOption(&quot;gift_collection_size_max&quot;) gifts, then the last one are removed from the collection.
  array<string> received_gift_ids_;
  static jfieldID received_gift_ids_fieldID;

  /**
   * Default constructor for a function, which adds gifts to the beginning of a previously created collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   */
  addGiftCollectionGifts();

  /**
   * Creates a function, which adds gifts to the beginning of a previously created collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the collection.
   * \param[in] collection_id_ Identifier of the gift collection.
   * \param[in] received_gift_ids_ Identifier of the gifts to add to the collection; 1-getOption(&quot;gift_collection_size_max&quot;) identifiers. If after addition the collection has more than getOption(&quot;gift_collection_size_max&quot;) gifts, then the last one are removed from the collection.
   */
  addGiftCollectionGifts(object_ptr<MessageSender> &&owner_id_, int32 collection_id_, array<string> &&received_gift_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -263464606;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftCollection>;

  static object_ptr<addGiftCollectionGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class InputMessageReplyTo;

class MessageSender;

class message;

/**
 * Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message.
 *
 * Returns object_ptr<Message>.
 */
class addLocalMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Target chat; channel direct messages chats aren't supported.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the sender of the message.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  static jfieldID disable_notification_fieldID;
  /// The content of the message to be added.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message.
   *
   * Returns object_ptr<Message>.
   */
  addLocalMessage();

  /**
   * Creates a function, which adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Target chat; channel direct messages chats aren't supported.
   * \param[in] sender_id_ Identifier of the sender of the message.
   * \param[in] reply_to_ Information about the message or story to be replied; pass null if none.
   * \param[in] disable_notification_ Pass true to disable notification for the message.
   * \param[in] input_message_content_ The content of the message to be added.
   */
  addLocalMessage(int53 chat_id_, object_ptr<MessageSender> &&sender_id_, object_ptr<InputMessageReplyTo> &&reply_to_, bool disable_notification_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -166217823;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<addLocalMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds a message to TDLib internal log. Can be called synchronously.
 *
 * Returns object_ptr<Ok>.
 */
class addLogMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The minimum verbosity level needed for the message to be logged; 0-1023.
  int32 verbosity_level_;
  static jfieldID verbosity_level_fieldID;
  /// Text of a message to log.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which adds a message to TDLib internal log. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   */
  addLogMessage();

  /**
   * Creates a function, which adds a message to TDLib internal log. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] verbosity_level_ The minimum verbosity level needed for the message to be logged; 0-1023.
   * \param[in] text_ Text of a message to log.
   */
  addLogMessage(int32 verbosity_level_, string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1597427692;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addLogMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passkey;

/**
 * Adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey.
 *
 * Returns object_ptr<Passkey>.
 */
class addLoginPasskey final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// JSON-encoded client data.
  string client_data_;
  static jfieldID client_data_fieldID;
  /// Passkey attestation object.
  bytes attestation_object_;
  static jfieldID attestation_object_fieldID;

  /**
   * Default constructor for a function, which adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey.
   *
   * Returns object_ptr<Passkey>.
   */
  addLoginPasskey();

  /**
   * Creates a function, which adds a passkey allowed to be used for the login by the current user and returns the added passkey. Call getPasskeyParameters to get parameters for creating of the passkey.
   *
   * Returns object_ptr<Passkey>.
   *
   * \param[in] client_data_ JSON-encoded client data.
   * \param[in] attestation_object_ Passkey attestation object.
   */
  addLoginPasskey(string const &client_data_, bytes const &attestation_object_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1838899694;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passkey>;

  static object_ptr<addLoginPasskey> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class ok;

/**
 * Adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message.
 *
 * Returns object_ptr<Ok>.
 */
class addMessageReaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Type of the reaction to add. Use addPendingPaidMessageReaction instead to add the paid reaction.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;
  /// Pass true if the reaction is added with a big animation.
  bool is_big_;
  static jfieldID is_big_fieldID;
  /// Pass true if the reaction needs to be added to recent reactions; tags are never added to the list of recent reactions.
  bool update_recent_reactions_;
  static jfieldID update_recent_reactions_fieldID;

  /**
   * Default constructor for a function, which adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message.
   *
   * Returns object_ptr<Ok>.
   */
  addMessageReaction();

  /**
   * Creates a function, which adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reaction_type_ Type of the reaction to add. Use addPendingPaidMessageReaction instead to add the paid reaction.
   * \param[in] is_big_ Pass true if the reaction is added with a big animation.
   * \param[in] update_recent_reactions_ Pass true if the reaction needs to be added to recent reactions; tags are never added to the list of recent reactions.
   */
  addMessageReaction(int53 chat_id_, int53 message_id_, object_ptr<ReactionType> &&reaction_type_, bool is_big_, bool update_recent_reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1419269613;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addMessageReaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class NetworkStatisticsEntry;

class ok;

/**
 * Adds the specified data to data usage statistics. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class addNetworkStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The network statistics entry with the data to be added to statistics.
  object_ptr<NetworkStatisticsEntry> entry_;
  static jfieldID entry_fieldID;

  /**
   * Default constructor for a function, which adds the specified data to data usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  addNetworkStatistics();

  /**
   * Creates a function, which adds the specified data to data usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] entry_ The network statistics entry with the data to be added to statistics.
   */
  explicit addNetworkStatistics(object_ptr<NetworkStatisticsEntry> &&entry_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1264825305;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addNetworkStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

class messageSendOptions;

/**
 * Sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post. Returns the sent message.
 *
 * Returns object_ptr<Message>.
 */
class addOffer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message in the chat which will be sent as suggested post. Use messageProperties.can_add_offer to check whether an offer can be added or messageProperties.can_edit_suggested_post_info to check whether price or time of sending of the post can be changed.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Options to be used to send the message. New information about the suggested post must always be specified.
  object_ptr<messageSendOptions> options_;
  static jfieldID options_fieldID;

  /**
   * Default constructor for a function, which sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post. Returns the sent message.
   *
   * Returns object_ptr<Message>.
   */
  addOffer();

  /**
   * Creates a function, which sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post. Returns the sent message.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Identifier of the channel direct messages chat.
   * \param[in] message_id_ Identifier of the message in the chat which will be sent as suggested post. Use messageProperties.can_add_offer to check whether an offer can be added or messageProperties.can_edit_suggested_post_info to check whether price or time of sending of the post can be changed.
   * \param[in] options_ Options to be used to send the message. New information about the suggested post must always be specified.
   */
  addOffer(int53 chat_id_, int53 message_id_, object_ptr<messageSendOptions> &&options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 682451739;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<addOffer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds pending paid reaction in a live story group call. Can't be used in live stories posted by the current user. Call commitPendingLiveStoryReactions or removePendingLiveStoryReactions to actually send all pending reactions when the undo timer is over or abort the sending.
 *
 * Returns object_ptr<Ok>.
 */
class addPendingLiveStoryReaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption(&quot;paid_group_call_message_star_count_max&quot;).
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which adds pending paid reaction in a live story group call. Can't be used in live stories posted by the current user. Call commitPendingLiveStoryReactions or removePendingLiveStoryReactions to actually send all pending reactions when the undo timer is over or abort the sending.
   *
   * Returns object_ptr<Ok>.
   */
  addPendingLiveStoryReaction();

  /**
   * Creates a function, which adds pending paid reaction in a live story group call. Can't be used in live stories posted by the current user. Call commitPendingLiveStoryReactions or removePendingLiveStoryReactions to actually send all pending reactions when the undo timer is over or abort the sending.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] star_count_ Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption(&quot;paid_group_call_message_star_count_max&quot;).
   */
  addPendingLiveStoryReaction(int32 group_call_id_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 661166197;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addPendingLiveStoryReaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PaidReactionType;

class ok;

/**
 * Adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message.
 *
 * Returns object_ptr<Ok>.
 */
class addPendingPaidMessageReaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption(&quot;paid_reaction_star_count_max&quot;).
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Type of the paid reaction; pass null if the user didn't choose reaction type explicitly, for example, the reaction is set from the message bubble.
  object_ptr<PaidReactionType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message.
   *
   * Returns object_ptr<Ok>.
   */
  addPendingPaidMessageReaction();

  /**
   * Creates a function, which adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] star_count_ Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption(&quot;paid_reaction_star_count_max&quot;).
   * \param[in] type_ Type of the paid reaction; pass null if the user didn't choose reaction type explicitly, for example, the reaction is set from the message bubble.
   */
  addPendingPaidMessageReaction(int53 chat_id_, int53 message_id_, int53 star_count_, object_ptr<PaidReactionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -342110765;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addPendingPaidMessageReaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inputPollOption;

class ok;

/**
 * Adds an option to a poll.
 *
 * Returns object_ptr<Ok>.
 */
class addPollOption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll. Use messagePoll.can_add_option to check whether an option can be added.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new option.
  object_ptr<inputPollOption> option_;
  static jfieldID option_fieldID;

  /**
   * Default constructor for a function, which adds an option to a poll.
   *
   * Returns object_ptr<Ok>.
   */
  addPollOption();

  /**
   * Creates a function, which adds an option to a poll.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the poll belongs.
   * \param[in] message_id_ Identifier of the message containing the poll. Use messagePoll.can_add_option to check whether an option can be added.
   * \param[in] option_ The new option.
   */
  addPollOption(int53 chat_id_, int53 message_id_, object_ptr<inputPollOption> &&option_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -382845167;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addPollOption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Adds an audio file to the beginning of the profile audio files of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class addProfileAudio final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The audio file to be added.
  object_ptr<InputFile> audio_;
  static jfieldID audio_fieldID;
  /// Duration of the audio, in seconds; may be replaced by the server; ignored for already uploaded files.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Title of the audio; 0-64 characters; may be replaced by the server; ignored for already uploaded files.
  string title_;
  static jfieldID title_fieldID;
  /// Performer of the audio; 0-64 characters, may be replaced by the server; ignored for already uploaded files.
  string performer_;
  static jfieldID performer_fieldID;

  /**
   * Default constructor for a function, which adds an audio file to the beginning of the profile audio files of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  addProfileAudio();

  /**
   * Creates a function, which adds an audio file to the beginning of the profile audio files of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] audio_ The audio file to be added.
   * \param[in] duration_ Duration of the audio, in seconds; may be replaced by the server; ignored for already uploaded files.
   * \param[in] title_ Title of the audio; 0-64 characters; may be replaced by the server; ignored for already uploaded files.
   * \param[in] performer_ Performer of the audio; 0-64 characters, may be replaced by the server; ignored for already uploaded files.
   */
  addProfileAudio(object_ptr<InputFile> &&audio_, int32 duration_, string const &title_, string const &performer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 919192907;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addProfileAudio> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class addedProxy;

class proxy;

/**
 * Adds a proxy server for network requests. Can be called before authorization.
 *
 * Returns object_ptr<AddedProxy>.
 */
class addProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The proxy to add.
  object_ptr<proxy> proxy_;
  static jfieldID proxy_fieldID;
  /// Pass true to immediately enable the proxy.
  bool enable_;
  static jfieldID enable_fieldID;
  /// Comment to set for the proxy.
  string comment_;
  static jfieldID comment_fieldID;

  /**
   * Default constructor for a function, which adds a proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<AddedProxy>.
   */
  addProxy();

  /**
   * Creates a function, which adds a proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<AddedProxy>.
   *
   * \param[in] proxy_ The proxy to add.
   * \param[in] enable_ Pass true to immediately enable the proxy.
   * \param[in] comment_ Comment to set for the proxy.
   */
  addProxy(object_ptr<proxy> &&proxy_, bool enable_, string const &comment_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 267660616;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<addedProxy>;

  static object_ptr<addProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class quickReplyMessage;

/**
 * Adds a message to a quick reply shortcut via inline bot. If shortcut doesn't exist and there are less than getOption(&quot;quick_reply_shortcut_count_max&quot;) shortcuts, then a new shortcut is created. The shortcut must not contain more than getOption(&quot;quick_reply_shortcut_message_count_max&quot;) messages after adding the new message. Returns the added message.
 *
 * Returns object_ptr<QuickReplyMessage>.
 */
class addQuickReplyShortcutInlineQueryResultMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the target shortcut.
  string shortcut_name_;
  static jfieldID shortcut_name_fieldID;
  /// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
  int53 reply_to_message_id_;
  static jfieldID reply_to_message_id_fieldID;
  /// Identifier of the inline query.
  int64 query_id_;
  static jfieldID query_id_fieldID;
  /// Identifier of the inline query result.
  string result_id_;
  static jfieldID result_id_fieldID;
  /// Pass true to hide the bot, via which the message is sent. Can be used only for bots getOption(&quot;animation_search_bot_username&quot;), getOption(&quot;photo_search_bot_username&quot;), and getOption(&quot;venue_search_bot_username&quot;).
  bool hide_via_bot_;
  static jfieldID hide_via_bot_fieldID;

  /**
   * Default constructor for a function, which adds a message to a quick reply shortcut via inline bot. If shortcut doesn't exist and there are less than getOption(&quot;quick_reply_shortcut_count_max&quot;) shortcuts, then a new shortcut is created. The shortcut must not contain more than getOption(&quot;quick_reply_shortcut_message_count_max&quot;) messages after adding the new message. Returns the added message.
   *
   * Returns object_ptr<QuickReplyMessage>.
   */
  addQuickReplyShortcutInlineQueryResultMessage();

  /**
   * Creates a function, which adds a message to a quick reply shortcut via inline bot. If shortcut doesn't exist and there are less than getOption(&quot;quick_reply_shortcut_count_max&quot;) shortcuts, then a new shortcut is created. The shortcut must not contain more than getOption(&quot;quick_reply_shortcut_message_count_max&quot;) messages after adding the new message. Returns the added message.
   *
   * Returns object_ptr<QuickReplyMessage>.
   *
   * \param[in] shortcut_name_ Name of the target shortcut.
   * \param[in] reply_to_message_id_ Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
   * \param[in] query_id_ Identifier of the inline query.
   * \param[in] result_id_ Identifier of the inline query result.
   * \param[in] hide_via_bot_ Pass true to hide the bot, via which the message is sent. Can be used only for bots getOption(&quot;animation_search_bot_username&quot;), getOption(&quot;photo_search_bot_username&quot;), and getOption(&quot;venue_search_bot_username&quot;).
   */
  addQuickReplyShortcutInlineQueryResultMessage(string const &shortcut_name_, int53 reply_to_message_id_, int64 query_id_, string const &result_id_, bool hide_via_bot_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2017449468;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<quickReplyMessage>;

  static object_ptr<addQuickReplyShortcutInlineQueryResultMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class quickReplyMessage;

/**
 * Adds a message to a quick reply shortcut. If shortcut doesn't exist and there are less than getOption(&quot;quick_reply_shortcut_count_max&quot;) shortcuts, then a new shortcut is created. The shortcut must not contain more than getOption(&quot;quick_reply_shortcut_message_count_max&quot;) messages after adding the new message. Returns the added message.
 *
 * Returns object_ptr<QuickReplyMessage>.
 */
class addQuickReplyShortcutMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the target shortcut.
  string shortcut_name_;
  static jfieldID shortcut_name_fieldID;
  /// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
  int53 reply_to_message_id_;
  static jfieldID reply_to_message_id_fieldID;
  /// The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLocation with live_period aren't supported.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which adds a message to a quick reply shortcut. If shortcut doesn't exist and there are less than getOption(&quot;quick_reply_shortcut_count_max&quot;) shortcuts, then a new shortcut is created. The shortcut must not contain more than getOption(&quot;quick_reply_shortcut_message_count_max&quot;) messages after adding the new message. Returns the added message.
   *
   * Returns object_ptr<QuickReplyMessage>.
   */
  addQuickReplyShortcutMessage();

  /**
   * Creates a function, which adds a message to a quick reply shortcut. If shortcut doesn't exist and there are less than getOption(&quot;quick_reply_shortcut_count_max&quot;) shortcuts, then a new shortcut is created. The shortcut must not contain more than getOption(&quot;quick_reply_shortcut_message_count_max&quot;) messages after adding the new message. Returns the added message.
   *
   * Returns object_ptr<QuickReplyMessage>.
   *
   * \param[in] shortcut_name_ Name of the target shortcut.
   * \param[in] reply_to_message_id_ Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
   * \param[in] input_message_content_ The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLocation with live_period aren't supported.
   */
  addQuickReplyShortcutMessage(string const &shortcut_name_, int53 reply_to_message_id_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1058573098;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<quickReplyMessage>;

  static object_ptr<addQuickReplyShortcutMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class quickReplyMessages;

/**
 * Adds 2-10 messages grouped together into an album to a quick reply shortcut. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
 *
 * Returns object_ptr<QuickReplyMessages>.
 */
class addQuickReplyShortcutMessageAlbum final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the target shortcut.
  string shortcut_name_;
  static jfieldID shortcut_name_fieldID;
  /// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
  int53 reply_to_message_id_;
  static jfieldID reply_to_message_id_fieldID;
  /// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media.
  array<object_ptr<InputMessageContent>> input_message_contents_;
  static jfieldID input_message_contents_fieldID;

  /**
   * Default constructor for a function, which adds 2-10 messages grouped together into an album to a quick reply shortcut. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
   *
   * Returns object_ptr<QuickReplyMessages>.
   */
  addQuickReplyShortcutMessageAlbum();

  /**
   * Creates a function, which adds 2-10 messages grouped together into an album to a quick reply shortcut. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
   *
   * Returns object_ptr<QuickReplyMessages>.
   *
   * \param[in] shortcut_name_ Name of the target shortcut.
   * \param[in] reply_to_message_id_ Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none.
   * \param[in] input_message_contents_ Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media.
   */
  addQuickReplyShortcutMessageAlbum(string const &shortcut_name_, int53 reply_to_message_id_, array<object_ptr<InputMessageContent>> &&input_message_contents_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1348436244;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<quickReplyMessages>;

  static object_ptr<addQuickReplyShortcutMessageAlbum> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class stickers;

/**
 * Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to recent stickers.
 *
 * Returns object_ptr<Stickers>.
 */
class addRecentSticker final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers.
  bool is_attached_;
  static jfieldID is_attached_fieldID;
  /// Sticker file to add.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to recent stickers.
   *
   * Returns object_ptr<Stickers>.
   */
  addRecentSticker();

  /**
   * Creates a function, which manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to recent stickers.
   *
   * Returns object_ptr<Stickers>.
   *
   * \param[in] is_attached_ Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers.
   * \param[in] sticker_ Sticker file to add.
   */
  addRecentSticker(bool is_attached_, object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1478109026;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<addRecentSticker> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first.
 *
 * Returns object_ptr<Ok>.
 */
class addRecentlyFoundChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to add.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first.
   *
   * Returns object_ptr<Ok>.
   */
  addRecentlyFoundChat();

  /**
   * Creates a function, which adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to add.
   */
  explicit addRecentlyFoundChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1746396787;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addRecentlyFoundChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type &quot;video/mp4&quot; can be added to the list.
 *
 * Returns object_ptr<Ok>.
 */
class addSavedAnimation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The animation file to be added. Only animations known to the server (i.e., successfully sent via a message) can be added to the list.
  object_ptr<InputFile> animation_;
  static jfieldID animation_fieldID;

  /**
   * Default constructor for a function, which manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type &quot;video/mp4&quot; can be added to the list.
   *
   * Returns object_ptr<Ok>.
   */
  addSavedAnimation();

  /**
   * Creates a function, which manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type &quot;video/mp4&quot; can be added to the list.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] animation_ The animation file to be added. Only animations known to the server (i.e., successfully sent via a message) can be added to the list.
   */
  explicit addSavedAnimation(object_ptr<InputFile> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1538525088;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addSavedAnimation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class notificationSound;

/**
 * Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed.
 *
 * Returns object_ptr<NotificationSound>.
 */
class addSavedNotificationSound final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Notification sound file to add.
  object_ptr<InputFile> sound_;
  static jfieldID sound_fieldID;

  /**
   * Default constructor for a function, which adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed.
   *
   * Returns object_ptr<NotificationSound>.
   */
  addSavedNotificationSound();

  /**
   * Creates a function, which adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed.
   *
   * Returns object_ptr<NotificationSound>.
   *
   * \param[in] sound_ Notification sound file to add.
   */
  explicit addSavedNotificationSound(object_ptr<InputFile> &&sound_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1043956975;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<notificationSound>;

  static object_ptr<addSavedNotificationSound> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inputSticker;

class ok;

/**
 * Adds a new sticker to a set.
 *
 * Returns object_ptr<Ok>.
 */
class addStickerToSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Sticker set name. The sticker set must be owned by the current user, and contain less than 200 stickers for custom emoji sticker sets and less than 120 otherwise.
  string name_;
  static jfieldID name_fieldID;
  /// Sticker to add to the set.
  object_ptr<inputSticker> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which adds a new sticker to a set.
   *
   * Returns object_ptr<Ok>.
   */
  addStickerToSet();

  /**
   * Creates a function, which adds a new sticker to a set.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Sticker set owner; ignored for regular users.
   * \param[in] name_ Sticker set name. The sticker set must be owned by the current user, and contain less than 200 stickers for custom emoji sticker sets and less than 120 otherwise.
   * \param[in] sticker_ Sticker to add to the set.
   */
  addStickerToSet(int53 user_id_, string const &name_, object_ptr<inputSticker> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1457266235;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addStickerToSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbum;

/**
 * Adds stories to the beginning of a previously created story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
 *
 * Returns object_ptr<StoryAlbum>.
 */
class addStoryAlbumStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that owns the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story album.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;
  /// Identifier of the stories to add to the album; 1-getOption(&quot;story_album_size_max&quot;) identifiers. If after addition the album has more than getOption(&quot;story_album_size_max&quot;) stories, then the last one are removed from the album.
  array<int32> story_ids_;
  static jfieldID story_ids_fieldID;

  /**
   * Default constructor for a function, which adds stories to the beginning of a previously created story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   */
  addStoryAlbumStories();

  /**
   * Creates a function, which adds stories to the beginning of a previously created story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   *
   * \param[in] chat_id_ Identifier of the chat that owns the stories.
   * \param[in] story_album_id_ Identifier of the story album.
   * \param[in] story_ids_ Identifier of the stories to add to the album; 1-getOption(&quot;story_album_size_max&quot;) identifiers. If after addition the album has more than getOption(&quot;story_album_size_max&quot;) stories, then the last one are removed from the album.
   */
  addStoryAlbumStories(int53 chat_id_, int32 story_album_id_, array<int32> &&story_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -537692984;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyAlbum>;

  static object_ptr<addStoryAlbumStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds a custom text composition style to the list of used by the user styles. May return an error with a message &quot;TONES_SAVED_TOO_MANY&quot; if the maximum number of added custom styles has been reached.
 *
 * Returns object_ptr<Ok>.
 */
class addTextCompositionStyle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which adds a custom text composition style to the list of used by the user styles. May return an error with a message &quot;TONES_SAVED_TOO_MANY&quot; if the maximum number of added custom styles has been reached.
   *
   * Returns object_ptr<Ok>.
   */
  addTextCompositionStyle();

  /**
   * Creates a function, which adds a custom text composition style to the list of used by the user styles. May return an error with a message &quot;TONES_SAVED_TOO_MANY&quot; if the maximum number of added custom styles has been reached.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ Name of the style.
   */
  explicit addTextCompositionStyle(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1478640138;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<addTextCompositionStyle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Allows the specified bot to send messages to the user.
 *
 * Returns object_ptr<Ok>.
 */
class allowBotToSendMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which allows the specified bot to send messages to the user.
   *
   * Returns object_ptr<Ok>.
   */
  allowBotToSendMessages();

  /**
   * Creates a function, which allows the specified bot to send messages to the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   */
  explicit allowBotToSendMessages(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1776928142;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<allowBotToSendMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Allows the specified user to send unpaid private messages to the current user by adding a rule to userPrivacySettingAllowUnpaidMessages.
 *
 * Returns object_ptr<Ok>.
 */
class allowUnpaidMessagesFromUser final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Pass true to refund the user previously paid messages.
  bool refund_payments_;
  static jfieldID refund_payments_fieldID;

  /**
   * Default constructor for a function, which allows the specified user to send unpaid private messages to the current user by adding a rule to userPrivacySettingAllowUnpaidMessages.
   *
   * Returns object_ptr<Ok>.
   */
  allowUnpaidMessagesFromUser();

  /**
   * Creates a function, which allows the specified user to send unpaid private messages to the current user by adding a rule to userPrivacySettingAllowUnpaidMessages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user.
   * \param[in] refund_payments_ Pass true to refund the user previously paid messages.
   */
  allowUnpaidMessagesFromUser(int53 user_id_, bool refund_payments_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 803569495;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<allowUnpaidMessagesFromUser> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the result of a callback query; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class answerCallbackQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the callback query.
  int64 callback_query_id_;
  static jfieldID callback_query_id_fieldID;
  /// Text of the answer.
  string text_;
  static jfieldID text_fieldID;
  /// Pass true to show an alert to the user instead of a toast notification.
  bool show_alert_;
  static jfieldID show_alert_fieldID;
  /// URL to be opened.
  string url_;
  static jfieldID url_fieldID;
  /// Time during which the result of the query can be cached, in seconds.
  int32 cache_time_;
  static jfieldID cache_time_fieldID;

  /**
   * Default constructor for a function, which sets the result of a callback query; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  answerCallbackQuery();

  /**
   * Creates a function, which sets the result of a callback query; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] callback_query_id_ Identifier of the callback query.
   * \param[in] text_ Text of the answer.
   * \param[in] show_alert_ Pass true to show an alert to the user instead of a toast notification.
   * \param[in] url_ URL to be opened.
   * \param[in] cache_time_ Time during which the result of the query can be cached, in seconds.
   */
  answerCallbackQuery(int64 callback_query_id_, string const &text_, bool show_alert_, string const &url_, int32 cache_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1153028490;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<answerCallbackQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Answers a custom query; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class answerCustomQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a custom query.
  int64 custom_query_id_;
  static jfieldID custom_query_id_fieldID;
  /// JSON-serialized answer to the query.
  string data_;
  static jfieldID data_fieldID;

  /**
   * Default constructor for a function, which answers a custom query; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  answerCustomQuery();

  /**
   * Creates a function, which answers a custom query; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] custom_query_id_ Identifier of a custom query.
   * \param[in] data_ JSON-serialized answer to the query.
   */
  answerCustomQuery(int64 custom_query_id_, string const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1293603521;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<answerCustomQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputInlineQueryResult;

class inlineMessageId;

/**
 * Sets the result of a guest query; for bots only.
 *
 * Returns object_ptr<InlineMessageId>.
 */
class answerGuestQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the guest query.
  int64 guest_query_id_;
  static jfieldID guest_query_id_fieldID;
  /// The result of the query.
  object_ptr<InputInlineQueryResult> result_;
  static jfieldID result_fieldID;

  /**
   * Default constructor for a function, which sets the result of a guest query; for bots only.
   *
   * Returns object_ptr<InlineMessageId>.
   */
  answerGuestQuery();

  /**
   * Creates a function, which sets the result of a guest query; for bots only.
   *
   * Returns object_ptr<InlineMessageId>.
   *
   * \param[in] guest_query_id_ Identifier of the guest query.
   * \param[in] result_ The result of the query.
   */
  answerGuestQuery(int64 guest_query_id_, object_ptr<InputInlineQueryResult> &&result_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -41729622;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<inlineMessageId>;

  static object_ptr<answerGuestQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputInlineQueryResult;

class inlineQueryResultsButton;

class ok;

/**
 * Sets the result of an inline query; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class answerInlineQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the inline query.
  int64 inline_query_id_;
  static jfieldID inline_query_id_fieldID;
  /// Pass true if results may be cached and returned only for the user who sent the query. By default, results may be returned to any user who sends the same query.
  bool is_personal_;
  static jfieldID is_personal_fieldID;
  /// Button to be shown above inline query results; pass null if none.
  object_ptr<inlineQueryResultsButton> button_;
  static jfieldID button_fieldID;
  /// The results of the query.
  array<object_ptr<InputInlineQueryResult>> results_;
  static jfieldID results_fieldID;
  /// Allowed time to cache the results of the query, in seconds.
  int32 cache_time_;
  static jfieldID cache_time_fieldID;
  /// Offset for the next inline query; pass an empty string if there are no more results.
  string next_offset_;
  static jfieldID next_offset_fieldID;

  /**
   * Default constructor for a function, which sets the result of an inline query; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  answerInlineQuery();

  /**
   * Creates a function, which sets the result of an inline query; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_query_id_ Identifier of the inline query.
   * \param[in] is_personal_ Pass true if results may be cached and returned only for the user who sent the query. By default, results may be returned to any user who sends the same query.
   * \param[in] button_ Button to be shown above inline query results; pass null if none.
   * \param[in] results_ The results of the query.
   * \param[in] cache_time_ Allowed time to cache the results of the query, in seconds.
   * \param[in] next_offset_ Offset for the next inline query; pass an empty string if there are no more results.
   */
  answerInlineQuery(int64 inline_query_id_, bool is_personal_, object_ptr<inlineQueryResultsButton> &&button_, array<object_ptr<InputInlineQueryResult>> &&results_, int32 cache_time_, string const &next_offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1343853844;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<answerInlineQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the result of a pre-checkout query; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class answerPreCheckoutQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the pre-checkout query.
  int64 pre_checkout_query_id_;
  static jfieldID pre_checkout_query_id_fieldID;
  /// An error message, empty on success.
  string error_message_;
  static jfieldID error_message_fieldID;

  /**
   * Default constructor for a function, which sets the result of a pre-checkout query; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  answerPreCheckoutQuery();

  /**
   * Creates a function, which sets the result of a pre-checkout query; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] pre_checkout_query_id_ Identifier of the pre-checkout query.
   * \param[in] error_message_ An error message, empty on success.
   */
  answerPreCheckoutQuery(int64 pre_checkout_query_id_, string const &error_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1486789653;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<answerPreCheckoutQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

class shippingOption;

/**
 * Sets the result of a shipping query; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class answerShippingQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the shipping query.
  int64 shipping_query_id_;
  static jfieldID shipping_query_id_fieldID;
  /// Available shipping options.
  array<object_ptr<shippingOption>> shipping_options_;
  static jfieldID shipping_options_fieldID;
  /// An error message, empty on success.
  string error_message_;
  static jfieldID error_message_fieldID;

  /**
   * Default constructor for a function, which sets the result of a shipping query; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  answerShippingQuery();

  /**
   * Creates a function, which sets the result of a shipping query; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shipping_query_id_ Identifier of the shipping query.
   * \param[in] shipping_options_ Available shipping options.
   * \param[in] error_message_ An error message, empty on success.
   */
  answerShippingQuery(int64 shipping_query_id_, array<object_ptr<shippingOption>> &&shipping_options_, string const &error_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -434601324;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<answerShippingQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputInlineQueryResult;

class inlineMessageId;

/**
 * Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only.
 *
 * Returns object_ptr<InlineMessageId>.
 */
class answerWebAppQuery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the Web App query.
  string web_app_query_id_;
  static jfieldID web_app_query_id_fieldID;
  /// The result of the query.
  object_ptr<InputInlineQueryResult> result_;
  static jfieldID result_fieldID;

  /**
   * Default constructor for a function, which sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only.
   *
   * Returns object_ptr<InlineMessageId>.
   */
  answerWebAppQuery();

  /**
   * Creates a function, which sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only.
   *
   * Returns object_ptr<InlineMessageId>.
   *
   * \param[in] web_app_query_id_ Identifier of the Web App query.
   * \param[in] result_ The result of the query.
   */
  answerWebAppQuery(string const &web_app_query_id_, object_ptr<InputInlineQueryResult> &&result_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1447316391;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<inlineMessageId>;

  static object_ptr<answerWebAppQuery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Applies a Telegram Premium gift code.
 *
 * Returns object_ptr<Ok>.
 */
class applyPremiumGiftCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The code to apply.
  string code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which applies a Telegram Premium gift code.
   *
   * Returns object_ptr<Ok>.
   */
  applyPremiumGiftCode();

  /**
   * Creates a function, which applies a Telegram Premium gift code.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] code_ The code to apply.
   */
  explicit applyPremiumGiftCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1347138530;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<applyPremiumGiftCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Approves a suggested post in a channel direct messages chat.
 *
 * Returns object_ptr<Ok>.
 */
class approveSuggestedPost final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with the suggested post. Use messageProperties.can_be_approved to check whether the suggested post can be approved.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Point in time (Unix timestamp) when the post is expected to be published; pass 0 if the date has already been chosen. If specified, then the date must be in the future, but at most getOption(&quot;suggested_post_send_delay_max&quot;) seconds in the future.
  int32 send_date_;
  static jfieldID send_date_fieldID;

  /**
   * Default constructor for a function, which approves a suggested post in a channel direct messages chat.
   *
   * Returns object_ptr<Ok>.
   */
  approveSuggestedPost();

  /**
   * Creates a function, which approves a suggested post in a channel direct messages chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] message_id_ Identifier of the message with the suggested post. Use messageProperties.can_be_approved to check whether the suggested post can be approved.
   * \param[in] send_date_ Point in time (Unix timestamp) when the post is expected to be published; pass 0 if the date has already been chosen. If specified, then the date must be in the future, but at most getOption(&quot;suggested_post_send_delay_max&quot;) seconds in the future.
   */
  approveSuggestedPost(int53 chat_id_, int53 message_id_, int32 send_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -924807202;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<approveSuggestedPost> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StorePaymentPurpose;

class StoreTransaction;

class ok;

/**
 * Informs server about an in-store purchase. For official applications only.
 *
 * Returns object_ptr<Ok>.
 */
class assignStoreTransaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the transaction.
  object_ptr<StoreTransaction> transaction_;
  static jfieldID transaction_fieldID;
  /// Transaction purpose.
  object_ptr<StorePaymentPurpose> purpose_;
  static jfieldID purpose_fieldID;

  /**
   * Default constructor for a function, which informs server about an in-store purchase. For official applications only.
   *
   * Returns object_ptr<Ok>.
   */
  assignStoreTransaction();

  /**
   * Creates a function, which informs server about an in-store purchase. For official applications only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] transaction_ Information about the transaction.
   * \param[in] purpose_ Transaction purpose.
   */
  assignStoreTransaction(object_ptr<StoreTransaction> &&transaction_, object_ptr<StorePaymentPurpose> &&purpose_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2046202900;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<assignStoreTransaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first.
 *
 * Returns object_ptr<Ok>.
 */
class banChatMember final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Member identifier.
  object_ptr<MessageSender> member_id_;
  static jfieldID member_id_fieldID;
  /// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned.
  int32 banned_until_date_;
  static jfieldID banned_until_date_fieldID;
  /// Pass true to delete all messages in the chat for the user who is being removed. Always true for supergroups and channels.
  bool revoke_messages_;
  static jfieldID revoke_messages_fieldID;

  /**
   * Default constructor for a function, which bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first.
   *
   * Returns object_ptr<Ok>.
   */
  banChatMember();

  /**
   * Creates a function, which bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] member_id_ Member identifier.
   * \param[in] banned_until_date_ Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned.
   * \param[in] revoke_messages_ Pass true to delete all messages in the chat for the user who is being removed. Always true for supergroups and channels.
   */
  banChatMember(int53 chat_id_, object_ptr<MessageSender> &&member_id_, int32 banned_until_date_, bool revoke_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -888111748;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<banChatMember> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Bans users from a group call not bound to a chat; requires groupCall.is_owned. Only the owner of the group call can invite the banned users back.
 *
 * Returns object_ptr<Ok>.
 */
class banGroupCallParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifiers of group call participants to ban; identifiers of unknown users from the update updateGroupCallParticipants can be also passed to the method.
  array<int64> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Default constructor for a function, which bans users from a group call not bound to a chat; requires groupCall.is_owned. Only the owner of the group call can invite the banned users back.
   *
   * Returns object_ptr<Ok>.
   */
  banGroupCallParticipants();

  /**
   * Creates a function, which bans users from a group call not bound to a chat; requires groupCall.is_owned. Only the owner of the group call can invite the banned users back.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] user_ids_ Identifiers of group call participants to ban; identifiers of unknown users from the update updateGroupCallParticipants can be also passed to the method.
   */
  banGroupCallParticipants(int32 group_call_id_, array<int64> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 624883173;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<banGroupCallParticipants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Blocks an original sender of a message in the Replies chat.
 *
 * Returns object_ptr<Ok>.
 */
class blockMessageSenderFromReplies final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of an incoming message in the Replies chat.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true to delete the message.
  bool delete_message_;
  static jfieldID delete_message_fieldID;
  /// Pass true to delete all messages from the same sender.
  bool delete_all_messages_;
  static jfieldID delete_all_messages_fieldID;
  /// Pass true to report the sender to the Telegram moderators.
  bool report_spam_;
  static jfieldID report_spam_fieldID;

  /**
   * Default constructor for a function, which blocks an original sender of a message in the Replies chat.
   *
   * Returns object_ptr<Ok>.
   */
  blockMessageSenderFromReplies();

  /**
   * Creates a function, which blocks an original sender of a message in the Replies chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] message_id_ The identifier of an incoming message in the Replies chat.
   * \param[in] delete_message_ Pass true to delete the message.
   * \param[in] delete_all_messages_ Pass true to delete all messages from the same sender.
   * \param[in] report_spam_ Pass true to report the sender to the Telegram moderators.
   */
  blockMessageSenderFromReplies(int53 message_id_, bool delete_message_, bool delete_all_messages_, bool report_spam_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1214384757;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<blockMessageSenderFromReplies> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostSlots;

/**
 * Boosts a chat and returns the list of available chat boost slots for the current user after the boost.
 *
 * Returns object_ptr<ChatBoostSlots>.
 */
class boostChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifiers of boost slots of the current user from which to apply boosts to the chat.
  array<int32> slot_ids_;
  static jfieldID slot_ids_fieldID;

  /**
   * Default constructor for a function, which boosts a chat and returns the list of available chat boost slots for the current user after the boost.
   *
   * Returns object_ptr<ChatBoostSlots>.
   */
  boostChat();

  /**
   * Creates a function, which boosts a chat and returns the list of available chat boost slots for the current user after the boost.
   *
   * Returns object_ptr<ChatBoostSlots>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] slot_ids_ Identifiers of boost slots of the current user from which to apply boosts to the chat.
   */
  boostChat(int53 chat_id_, array<int32> &&slot_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1945750252;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostSlots>;

  static object_ptr<boostChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Pays for upgrade of a regular gift that is owned by another user or channel chat.
 *
 * Returns object_ptr<Ok>.
 */
class buyGiftUpgrade final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Prepaid upgrade hash as received along with the gift.
  string prepaid_upgrade_hash_;
  static jfieldID prepaid_upgrade_hash_fieldID;
  /// The Telegram Star amount the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which pays for upgrade of a regular gift that is owned by another user or channel chat.
   *
   * Returns object_ptr<Ok>.
   */
  buyGiftUpgrade();

  /**
   * Creates a function, which pays for upgrade of a regular gift that is owned by another user or channel chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the gift.
   * \param[in] prepaid_upgrade_hash_ Prepaid upgrade hash as received along with the gift.
   * \param[in] star_count_ The Telegram Star amount the user agreed to pay for the upgrade; must be equal to gift.upgrade_star_count.
   */
  buyGiftUpgrade(object_ptr<MessageSender> &&owner_id_, string const &prepaid_upgrade_hash_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 154296026;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<buyGiftUpgrade> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether the specified bot can send messages to the user. Returns a 404 error if can't and the access can be granted by call to allowBotToSendMessages.
 *
 * Returns object_ptr<Ok>.
 */
class canBotSendMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which checks whether the specified bot can send messages to the user. Returns a 404 error if can't and the access can be granted by call to allowBotToSendMessages.
   *
   * Returns object_ptr<Ok>.
   */
  canBotSendMessages();

  /**
   * Creates a function, which checks whether the specified bot can send messages to the user. Returns a 404 error if can't and the access can be granted by call to allowBotToSendMessages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   */
  explicit canBotSendMessages(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 544052364;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<canBotSendMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CanPostStoryResult;

/**
 * Checks whether the current user can post a story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats.
 *
 * Returns object_ptr<CanPostStoryResult>.
 */
class canPostStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which checks whether the current user can post a story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats.
   *
   * Returns object_ptr<CanPostStoryResult>.
   */
  canPostStory();

  /**
   * Creates a function, which checks whether the current user can post a story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats.
   *
   * Returns object_ptr<CanPostStoryResult>.
   *
   * \param[in] chat_id_ Chat identifier. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
   */
  explicit canPostStory(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 668621518;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CanPostStoryResult>;

  static object_ptr<canPostStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StorePaymentPurpose;

class ok;

/**
 * Checks whether an in-store purchase is possible. Must be called before any in-store purchase. For official applications only.
 *
 * Returns object_ptr<Ok>.
 */
class canPurchaseFromStore final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Transaction purpose.
  object_ptr<StorePaymentPurpose> purpose_;
  static jfieldID purpose_fieldID;

  /**
   * Default constructor for a function, which checks whether an in-store purchase is possible. Must be called before any in-store purchase. For official applications only.
   *
   * Returns object_ptr<Ok>.
   */
  canPurchaseFromStore();

  /**
   * Creates a function, which checks whether an in-store purchase is possible. Must be called before any in-store purchase. For official applications only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] purpose_ Transaction purpose.
   */
  explicit canPurchaseFromStore(object_ptr<StorePaymentPurpose> &&purpose_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1017811816;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<canPurchaseFromStore> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CanSendGiftResult;

/**
 * Checks whether a gift with next_send_date in the future can be sent already.
 *
 * Returns object_ptr<CanSendGiftResult>.
 */
class canSendGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift to send.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;

  /**
   * Default constructor for a function, which checks whether a gift with next_send_date in the future can be sent already.
   *
   * Returns object_ptr<CanSendGiftResult>.
   */
  canSendGift();

  /**
   * Creates a function, which checks whether a gift with next_send_date in the future can be sent already.
   *
   * Returns object_ptr<CanSendGiftResult>.
   *
   * \param[in] gift_id_ Identifier of the gift to send.
   */
  explicit canSendGift(int64 gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1307059830;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CanSendGiftResult>;

  static object_ptr<canSendGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CanSendMessageToUserResult;

/**
 * Checks whether the current user can message another user or try to create a chat with them.
 *
 * Returns object_ptr<CanSendMessageToUserResult>.
 */
class canSendMessageToUser final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the other user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;
  static jfieldID only_local_fieldID;

  /**
   * Default constructor for a function, which checks whether the current user can message another user or try to create a chat with them.
   *
   * Returns object_ptr<CanSendMessageToUserResult>.
   */
  canSendMessageToUser();

  /**
   * Creates a function, which checks whether the current user can message another user or try to create a chat with them.
   *
   * Returns object_ptr<CanSendMessageToUserResult>.
   *
   * \param[in] user_id_ Identifier of the other user.
   * \param[in] only_local_ Pass true to get only locally available information without sending network requests.
   */
  canSendMessageToUser(int53 user_id_, bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1529489462;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CanSendMessageToUserResult>;

  static object_ptr<canSendMessageToUser> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CanTransferOwnershipResult;

/**
 * Checks whether the current session can be used to transfer a chat ownership to another user.
 *
 * Returns object_ptr<CanTransferOwnershipResult>.
 */
class canTransferOwnership final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which checks whether the current session can be used to transfer a chat ownership to another user.
   *
   * Returns object_ptr<CanTransferOwnershipResult>.
   */
  canTransferOwnership();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 634602508;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CanTransferOwnershipResult>;

  static object_ptr<canTransferOwnership> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Stops the downloading of a file. If a file has already been downloaded, does nothing.
 *
 * Returns object_ptr<Ok>.
 */
class cancelDownloadFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a file to stop downloading.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server.
  bool only_if_pending_;
  static jfieldID only_if_pending_fieldID;

  /**
   * Default constructor for a function, which stops the downloading of a file. If a file has already been downloaded, does nothing.
   *
   * Returns object_ptr<Ok>.
   */
  cancelDownloadFile();

  /**
   * Creates a function, which stops the downloading of a file. If a file has already been downloaded, does nothing.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of a file to stop downloading.
   * \param[in] only_if_pending_ Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server.
   */
  cancelDownloadFile(int32 file_id_, bool only_if_pending_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1954524450;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<cancelDownloadFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date &gt; 0.
 *
 * Returns object_ptr<Ok>.
 */
class cancelPasswordReset final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date &gt; 0.
   *
   * Returns object_ptr<Ok>.
   */
  cancelPasswordReset();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 940733538;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<cancelPasswordReset> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile.
 *
 * Returns object_ptr<Ok>.
 */
class cancelPreliminaryUploadFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file to stop uploading.
  int32 file_id_;
  static jfieldID file_id_fieldID;

  /**
   * Default constructor for a function, which stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile.
   *
   * Returns object_ptr<Ok>.
   */
  cancelPreliminaryUploadFile();

  /**
   * Creates a function, which stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the file to stop uploading.
   */
  explicit cancelPreliminaryUploadFile(int32 file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 823412414;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<cancelPreliminaryUploadFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Cancels verification of the 2-step verification recovery email address.
 *
 * Returns object_ptr<PasswordState>.
 */
class cancelRecoveryEmailAddressVerification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which cancels verification of the 2-step verification recovery email address.
   *
   * Returns object_ptr<PasswordState>.
   */
  cancelRecoveryEmailAddressVerification();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1516728691;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<cancelRecoveryEmailAddressVerification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class importedContact;

class importedContacts;

/**
 * Changes imported contacts using the list of contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time.
 *
 * Returns object_ptr<ImportedContacts>.
 */
class changeImportedContacts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new list of contacts to import.
  array<object_ptr<importedContact>> contacts_;
  static jfieldID contacts_fieldID;

  /**
   * Default constructor for a function, which changes imported contacts using the list of contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time.
   *
   * Returns object_ptr<ImportedContacts>.
   */
  changeImportedContacts();

  /**
   * Creates a function, which changes imported contacts using the list of contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time.
   *
   * Returns object_ptr<ImportedContacts>.
   *
   * \param[in] contacts_ The new list of contacts to import.
   */
  explicit changeImportedContacts(array<object_ptr<importedContact>> &&contacts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1119625871;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<importedContacts>;

  static object_ptr<changeImportedContacts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Installs/uninstalls or activates/archives a sticker set.
 *
 * Returns object_ptr<Ok>.
 */
class changeStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set.
  int64 set_id_;
  static jfieldID set_id_fieldID;
  /// The new value of is_installed.
  bool is_installed_;
  static jfieldID is_installed_fieldID;
  /// The new value of is_archived. A sticker set can't be installed and archived simultaneously.
  bool is_archived_;
  static jfieldID is_archived_fieldID;

  /**
   * Default constructor for a function, which installs/uninstalls or activates/archives a sticker set.
   *
   * Returns object_ptr<Ok>.
   */
  changeStickerSet();

  /**
   * Creates a function, which installs/uninstalls or activates/archives a sticker set.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] set_id_ Identifier of the sticker set.
   * \param[in] is_installed_ The new value of is_installed.
   * \param[in] is_archived_ The new value of is_archived. A sticker set can't be installed and archived simultaneously.
   */
  changeStickerSet(int64 set_id_, bool is_installed_, bool is_archived_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 449357293;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<changeStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationBotToken final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The bot token.
  string token_;
  static jfieldID token_fieldID;

  /**
   * Default constructor for a function, which checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationBotToken();

  /**
   * Creates a function, which checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] token_ The bot token.
   */
  explicit checkAuthenticationBotToken(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 639321206;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationBotToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Authentication code to check.
  string code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationCode();

  /**
   * Creates a function, which checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] code_ Authentication code to check.
   */
  explicit checkAuthenticationCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -302103382;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class EmailAddressAuthentication;

class ok;

/**
 * Checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationEmailCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Email address authentication to check.
  object_ptr<EmailAddressAuthentication> code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationEmailCode();

  /**
   * Creates a function, which checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] code_ Email address authentication to check.
   */
  explicit checkAuthenticationEmailCode(object_ptr<EmailAddressAuthentication> &&code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -582827361;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationEmailCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks a passkey to log in to the corresponding account. Call getAuthenticationPasskeyParameters to get parameters for the passkey. Works only when the current authorization state is authorizationStateWaitPhoneNumber or authorizationStateWaitOtherDeviceConfirmation, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationPasskey final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Base64url-encoded identifier of the credential.
  string credential_id_;
  static jfieldID credential_id_fieldID;
  /// JSON-encoded client data.
  string client_data_;
  static jfieldID client_data_fieldID;
  /// Authenticator data of the application that created the credential.
  bytes authenticator_data_;
  static jfieldID authenticator_data_fieldID;
  /// Cryptographic signature of the credential.
  bytes signature_;
  static jfieldID signature_fieldID;
  /// User handle of the passkey.
  bytes user_handle_;
  static jfieldID user_handle_fieldID;

  /**
   * Default constructor for a function, which checks a passkey to log in to the corresponding account. Call getAuthenticationPasskeyParameters to get parameters for the passkey. Works only when the current authorization state is authorizationStateWaitPhoneNumber or authorizationStateWaitOtherDeviceConfirmation, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationPasskey();

  /**
   * Creates a function, which checks a passkey to log in to the corresponding account. Call getAuthenticationPasskeyParameters to get parameters for the passkey. Works only when the current authorization state is authorizationStateWaitPhoneNumber or authorizationStateWaitOtherDeviceConfirmation, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] credential_id_ Base64url-encoded identifier of the credential.
   * \param[in] client_data_ JSON-encoded client data.
   * \param[in] authenticator_data_ Authenticator data of the application that created the credential.
   * \param[in] signature_ Cryptographic signature of the credential.
   * \param[in] user_handle_ User handle of the passkey.
   */
  checkAuthenticationPasskey(string const &credential_id_, string const &client_data_, bytes const &authenticator_data_, bytes const &signature_, bytes const &user_handle_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1225325317;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationPasskey> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationPassword final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password to check.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationPassword();

  /**
   * Creates a function, which checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] password_ The 2-step verification password to check.
   */
  explicit checkAuthenticationPassword(string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2025698400;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationPassword> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationPasswordRecoveryCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recovery code to check.
  string recovery_code_;
  static jfieldID recovery_code_fieldID;

  /**
   * Default constructor for a function, which checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationPasswordRecoveryCode();

  /**
   * Creates a function, which checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] recovery_code_ Recovery code to check.
   */
  explicit checkAuthenticationPasswordRecoveryCode(string const &recovery_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -603309083;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationPasswordRecoveryCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether an in-store purchase of Telegram Premium is possible before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.
 *
 * Returns object_ptr<Ok>.
 */
class checkAuthenticationPremiumPurchase final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of days for which the Telegram Premium subscription will be granted.
  int32 premium_day_count_;
  static jfieldID premium_day_count_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;

  /**
   * Default constructor for a function, which checks whether an in-store purchase of Telegram Premium is possible before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.
   *
   * Returns object_ptr<Ok>.
   */
  checkAuthenticationPremiumPurchase();

  /**
   * Creates a function, which checks whether an in-store purchase of Telegram Premium is possible before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] premium_day_count_ The number of days for which the Telegram Premium subscription will be granted.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   */
  checkAuthenticationPremiumPurchase(int32 premium_day_count_, string const &currency_, int53 amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 876306570;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkAuthenticationPremiumPurchase> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CheckChatUsernameResult;

/**
 * Checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types.
 *
 * Returns object_ptr<CheckChatUsernameResult>.
 */
class checkBotUsername final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username to be checked.
  string username_;
  static jfieldID username_fieldID;

  /**
   * Default constructor for a function, which checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types.
   *
   * Returns object_ptr<CheckChatUsernameResult>.
   */
  checkBotUsername();

  /**
   * Creates a function, which checks whether a username can be set for a new bot. Use checkChatUsername to check username for other chat types.
   *
   * Returns object_ptr<CheckChatUsernameResult>.
   *
   * \param[in] username_ Username to be checked.
   */
  explicit checkBotUsername(string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1358454679;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CheckChatUsernameResult>;

  static object_ptr<checkBotUsername> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderInviteLinkInfo;

/**
 * Checks the validity of an invite link for a chat folder and returns information about the corresponding chat folder.
 *
 * Returns object_ptr<ChatFolderInviteLinkInfo>.
 */
class checkChatFolderInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link to be checked.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which checks the validity of an invite link for a chat folder and returns information about the corresponding chat folder.
   *
   * Returns object_ptr<ChatFolderInviteLinkInfo>.
   */
  checkChatFolderInviteLink();

  /**
   * Creates a function, which checks the validity of an invite link for a chat folder and returns information about the corresponding chat folder.
   *
   * Returns object_ptr<ChatFolderInviteLinkInfo>.
   *
   * \param[in] invite_link_ Invite link to be checked.
   */
  explicit checkChatFolderInviteLink(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 522557851;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderInviteLinkInfo>;

  static object_ptr<checkChatFolderInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinkInfo;

/**
 * Checks the validity of an invite link for a chat and returns information about the corresponding chat.
 *
 * Returns object_ptr<ChatInviteLinkInfo>.
 */
class checkChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link to be checked.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which checks the validity of an invite link for a chat and returns information about the corresponding chat.
   *
   * Returns object_ptr<ChatInviteLinkInfo>.
   */
  checkChatInviteLink();

  /**
   * Creates a function, which checks the validity of an invite link for a chat and returns information about the corresponding chat.
   *
   * Returns object_ptr<ChatInviteLinkInfo>.
   *
   * \param[in] invite_link_ Invite link to be checked.
   */
  explicit checkChatInviteLink(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -496940997;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLinkInfo>;

  static object_ptr<checkChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CheckChatUsernameResult;

/**
 * Checks whether a username can be set for a chat.
 *
 * Returns object_ptr<CheckChatUsernameResult>.
 */
class checkChatUsername final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier; must be identifier of a supergroup chat, or a channel chat, or a private chat with self, or 0 if the chat is being created.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Username to be checked.
  string username_;
  static jfieldID username_fieldID;

  /**
   * Default constructor for a function, which checks whether a username can be set for a chat.
   *
   * Returns object_ptr<CheckChatUsernameResult>.
   */
  checkChatUsername();

  /**
   * Creates a function, which checks whether a username can be set for a chat.
   *
   * Returns object_ptr<CheckChatUsernameResult>.
   *
   * \param[in] chat_id_ Chat identifier; must be identifier of a supergroup chat, or a channel chat, or a private chat with self, or 0 if the chat is being created.
   * \param[in] username_ Username to be checked.
   */
  checkChatUsername(int53 chat_id_, string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -119119344;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CheckChatUsernameResult>;

  static object_ptr<checkChatUsername> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PublicChatType;

class ok;

/**
 * Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium.
 *
 * Returns object_ptr<Ok>.
 */
class checkCreatedPublicChatsLimit final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the public chats, for which to check the limit.
  object_ptr<PublicChatType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Ok>.
   */
  checkCreatedPublicChatsLimit();

  /**
   * Creates a function, which checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] type_ Type of the public chats, for which to check the limit.
   */
  explicit checkCreatedPublicChatsLimit(object_ptr<PublicChatType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -445546591;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkCreatedPublicChatsLimit> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks the email address verification code for Telegram Passport.
 *
 * Returns object_ptr<Ok>.
 */
class checkEmailAddressVerificationCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Verification code to check.
  string code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which checks the email address verification code for Telegram Passport.
   *
   * Returns object_ptr<Ok>.
   */
  checkEmailAddressVerificationCode();

  /**
   * Creates a function, which checks the email address verification code for Telegram Passport.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] code_ Verification code to check.
   */
  explicit checkEmailAddressVerificationCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -426386685;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkEmailAddressVerificationCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class EmailAddressAuthentication;

class ok;

/**
 * Checks the login email address authentication.
 *
 * Returns object_ptr<Ok>.
 */
class checkLoginEmailAddressCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Email address authentication to check.
  object_ptr<EmailAddressAuthentication> code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which checks the login email address authentication.
   *
   * Returns object_ptr<Ok>.
   */
  checkLoginEmailAddressCode();

  /**
   * Creates a function, which checks the login email address authentication.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] code_ Email address authentication to check.
   */
  explicit checkLoginEmailAddressCode(object_ptr<EmailAddressAuthentication> &&code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1454244766;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkLoginEmailAddressCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks a match-code for an OAuth authorization request. If fails, then the authorization request has failed. Otherwise, authorization confirmation dialog must be shown and the link must be processed using acceptOauthRequest or declineOauthRequest.
 *
 * Returns object_ptr<Ok>.
 */
class checkOauthRequestMatchCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the OAuth deep link.
  string url_;
  static jfieldID url_fieldID;
  /// The matching code chosen by the user.
  string match_code_;
  static jfieldID match_code_fieldID;

  /**
   * Default constructor for a function, which checks a match-code for an OAuth authorization request. If fails, then the authorization request has failed. Otherwise, authorization confirmation dialog must be shown and the link must be processed using acceptOauthRequest or declineOauthRequest.
   *
   * Returns object_ptr<Ok>.
   */
  checkOauthRequestMatchCode();

  /**
   * Creates a function, which checks a match-code for an OAuth authorization request. If fails, then the authorization request has failed. Otherwise, authorization confirmation dialog must be shown and the link must be processed using acceptOauthRequest or declineOauthRequest.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] url_ URL of the OAuth deep link.
   * \param[in] match_code_ The matching code chosen by the user.
   */
  checkOauthRequestMatchCode(string const &url_, string const &match_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1383896724;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkOauthRequestMatchCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether a 2-step verification password recovery code sent to an email address is valid.
 *
 * Returns object_ptr<Ok>.
 */
class checkPasswordRecoveryCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recovery code to check.
  string recovery_code_;
  static jfieldID recovery_code_fieldID;

  /**
   * Default constructor for a function, which checks whether a 2-step verification password recovery code sent to an email address is valid.
   *
   * Returns object_ptr<Ok>.
   */
  checkPasswordRecoveryCode();

  /**
   * Creates a function, which checks whether a 2-step verification password recovery code sent to an email address is valid.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] recovery_code_ Recovery code to check.
   */
  explicit checkPasswordRecoveryCode(string const &recovery_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -200794600;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkPasswordRecoveryCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks the authentication code and completes the request for which the code was sent if appropriate.
 *
 * Returns object_ptr<Ok>.
 */
class checkPhoneNumberCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Authentication code to check.
  string code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which checks the authentication code and completes the request for which the code was sent if appropriate.
   *
   * Returns object_ptr<Ok>.
   */
  checkPhoneNumberCode();

  /**
   * Creates a function, which checks the authentication code and completes the request for which the code was sent if appropriate.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] code_ Authentication code to check.
   */
  explicit checkPhoneNumberCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -603626079;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkPhoneNumberCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class premiumGiftCodeInfo;

/**
 * Returns information about a Telegram Premium gift code.
 *
 * Returns object_ptr<PremiumGiftCodeInfo>.
 */
class checkPremiumGiftCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The code to check.
  string code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which returns information about a Telegram Premium gift code.
   *
   * Returns object_ptr<PremiumGiftCodeInfo>.
   */
  checkPremiumGiftCode();

  /**
   * Creates a function, which returns information about a Telegram Premium gift code.
   *
   * Returns object_ptr<PremiumGiftCodeInfo>.
   *
   * \param[in] code_ The code to check.
   */
  explicit checkPremiumGiftCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1786063260;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumGiftCodeInfo>;

  static object_ptr<checkPremiumGiftCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks validness of a name for a quick reply shortcut. Can be called synchronously.
 *
 * Returns object_ptr<Ok>.
 */
class checkQuickReplyShortcutName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The name of the shortcut; 1-32 characters.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which checks validness of a name for a quick reply shortcut. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   */
  checkQuickReplyShortcutName();

  /**
   * Creates a function, which checks validness of a name for a quick reply shortcut. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ The name of the shortcut; 1-32 characters.
   */
  explicit checkQuickReplyShortcutName(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2101203241;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkQuickReplyShortcutName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Checks the 2-step verification recovery email address verification code.
 *
 * Returns object_ptr<PasswordState>.
 */
class checkRecoveryEmailAddressCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Verification code to check.
  string code_;
  static jfieldID code_fieldID;

  /**
   * Default constructor for a function, which checks the 2-step verification recovery email address verification code.
   *
   * Returns object_ptr<PasswordState>.
   */
  checkRecoveryEmailAddressCode();

  /**
   * Creates a function, which checks the 2-step verification recovery email address verification code.
   *
   * Returns object_ptr<PasswordState>.
   *
   * \param[in] code_ Verification code to check.
   */
  explicit checkRecoveryEmailAddressCode(string const &code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1997039589;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<checkRecoveryEmailAddressCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CheckStickerSetNameResult;

/**
 * Checks whether a name can be used for a new sticker set.
 *
 * Returns object_ptr<CheckStickerSetNameResult>.
 */
class checkStickerSetName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name to be checked.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which checks whether a name can be used for a new sticker set.
   *
   * Returns object_ptr<CheckStickerSetNameResult>.
   */
  checkStickerSetName();

  /**
   * Creates a function, which checks whether a name can be used for a new sticker set.
   *
   * Returns object_ptr<CheckStickerSetNameResult>.
   *
   * \param[in] name_ Name to be checked.
   */
  explicit checkStickerSetName(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1789392642;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CheckStickerSetNameResult>;

  static object_ptr<checkStickerSetName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether a file can be downloaded and saved locally by Web App request.
 *
 * Returns object_ptr<Ok>.
 */
class checkWebAppFileDownload final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot, providing the Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Name of the file.
  string file_name_;
  static jfieldID file_name_fieldID;
  /// URL of the file.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Default constructor for a function, which checks whether a file can be downloaded and saved locally by Web App request.
   *
   * Returns object_ptr<Ok>.
   */
  checkWebAppFileDownload();

  /**
   * Creates a function, which checks whether a file can be downloaded and saved locally by Web App request.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the bot, providing the Web App.
   * \param[in] file_name_ Name of the file.
   * \param[in] url_ URL of the file.
   */
  checkWebAppFileDownload(int53 bot_user_id_, string const &file_name_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -389397278;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<checkWebAppFileDownload> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously.
 *
 * Returns object_ptr<Text>.
 */
class cleanFileName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File name or path to the file.
  string file_name_;
  static jfieldID file_name_fieldID;

  /**
   * Default constructor for a function, which removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   */
  cleanFileName();

  /**
   * Creates a function, which removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] file_name_ File name or path to the file.
   */
  explicit cleanFileName(string const &file_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 967964667;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<cleanFileName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears message drafts in all chats.
 *
 * Returns object_ptr<Ok>.
 */
class clearAllDraftMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to keep local message drafts in secret chats.
  bool exclude_secret_chats_;
  static jfieldID exclude_secret_chats_fieldID;

  /**
   * Default constructor for a function, which clears message drafts in all chats.
   *
   * Returns object_ptr<Ok>.
   */
  clearAllDraftMessages();

  /**
   * Creates a function, which clears message drafts in all chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] exclude_secret_chats_ Pass true to keep local message drafts in secret chats.
   */
  explicit clearAllDraftMessages(bool exclude_secret_chats_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -46369573;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearAllDraftMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings.
 *
 * Returns object_ptr<Ok>.
 */
class clearAutosaveSettingsExceptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings.
   *
   * Returns object_ptr<Ok>.
   */
  clearAutosaveSettingsExceptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1475109874;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearAutosaveSettingsExceptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears all imported contacts, contact list remains unchanged.
 *
 * Returns object_ptr<Ok>.
 */
class clearImportedContacts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which clears all imported contacts, contact list remains unchanged.
   *
   * Returns object_ptr<Ok>.
   */
  clearImportedContacts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 869503298;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearImportedContacts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears the list of recently used emoji statuses for self status.
 *
 * Returns object_ptr<Ok>.
 */
class clearRecentEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which clears the list of recently used emoji statuses for self status.
   *
   * Returns object_ptr<Ok>.
   */
  clearRecentEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -428749986;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearRecentEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears the list of recently used reactions.
 *
 * Returns object_ptr<Ok>.
 */
class clearRecentReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which clears the list of recently used reactions.
   *
   * Returns object_ptr<Ok>.
   */
  clearRecentReactions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1298253650;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearRecentReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears the list of recently used stickers.
 *
 * Returns object_ptr<Ok>.
 */
class clearRecentStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers.
  bool is_attached_;
  static jfieldID is_attached_fieldID;

  /**
   * Default constructor for a function, which clears the list of recently used stickers.
   *
   * Returns object_ptr<Ok>.
   */
  clearRecentStickers();

  /**
   * Creates a function, which clears the list of recently used stickers.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] is_attached_ Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers.
   */
  explicit clearRecentStickers(bool is_attached_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -321242684;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearRecentStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears the list of recently found chats.
 *
 * Returns object_ptr<Ok>.
 */
class clearRecentlyFoundChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which clears the list of recently found chats.
   *
   * Returns object_ptr<Ok>.
   */
  clearRecentlyFoundChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -285582542;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearRecentlyFoundChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Clears the list of recently searched for hashtags or cashtags.
 *
 * Returns object_ptr<Ok>.
 */
class clearSearchedForTags final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to clear the list of recently searched for cashtags; otherwise, the list of recently searched for hashtags will be cleared.
  bool clear_cashtags_;
  static jfieldID clear_cashtags_fieldID;

  /**
   * Default constructor for a function, which clears the list of recently searched for hashtags or cashtags.
   *
   * Returns object_ptr<Ok>.
   */
  clearSearchedForTags();

  /**
   * Creates a function, which clears the list of recently searched for hashtags or cashtags.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] clear_cashtags_ Pass true to clear the list of recently searched for cashtags; otherwise, the list of recently searched for hashtags will be cleared.
   */
  explicit clearSearchedForTags(bool clear_cashtags_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 512017238;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clearSearchedForTags> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played.
 *
 * Returns object_ptr<Sticker>.
 */
class clickAnimatedEmojiMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the clicked message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played.
   *
   * Returns object_ptr<Sticker>.
   */
  clickAnimatedEmojiMessage();

  /**
   * Creates a function, which informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played.
   *
   * Returns object_ptr<Sticker>.
   *
   * \param[in] chat_id_ Chat identifier of the message.
   * \param[in] message_id_ Identifier of the clicked message.
   */
  clickAnimatedEmojiMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 196179554;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<sticker>;

  static object_ptr<clickAnimatedEmojiMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the user opened the sponsored chat via the button, the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message.
 *
 * Returns object_ptr<Ok>.
 */
class clickChatSponsoredMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the sponsored message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the sponsored message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true if the media was clicked in the sponsored message.
  bool is_media_click_;
  static jfieldID is_media_click_fieldID;
  /// Pass true if the user expanded the video from the sponsored message fullscreen before the click.
  bool from_fullscreen_;
  static jfieldID from_fullscreen_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the user opened the sponsored chat via the button, the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message.
   *
   * Returns object_ptr<Ok>.
   */
  clickChatSponsoredMessage();

  /**
   * Creates a function, which informs TDLib that the user opened the sponsored chat via the button, the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the sponsored message.
   * \param[in] message_id_ Identifier of the sponsored message.
   * \param[in] is_media_click_ Pass true if the media was clicked in the sponsored message.
   * \param[in] from_fullscreen_ Pass true if the user expanded the video from the sponsored message fullscreen before the click.
   */
  clickChatSponsoredMessage(int53 chat_id_, int53 message_id_, bool is_media_click_, bool from_fullscreen_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 971995671;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clickChatSponsoredMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the user clicked Premium subscription button on the Premium features screen.
 *
 * Returns object_ptr<Ok>.
 */
class clickPremiumSubscriptionButton final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which informs TDLib that the user clicked Premium subscription button on the Premium features screen.
   *
   * Returns object_ptr<Ok>.
   */
  clickPremiumSubscriptionButton();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -369319162;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clickPremiumSubscriptionButton> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the user clicked a video message advertisement.
 *
 * Returns object_ptr<Ok>.
 */
class clickVideoMessageAdvertisement final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the advertisement.
  int53 advertisement_unique_id_;
  static jfieldID advertisement_unique_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the user clicked a video message advertisement.
   *
   * Returns object_ptr<Ok>.
   */
  clickVideoMessageAdvertisement();

  /**
   * Creates a function, which informs TDLib that the user clicked a video message advertisement.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] advertisement_unique_id_ Unique identifier of the advertisement.
   */
  explicit clickVideoMessageAdvertisement(int53 advertisement_unique_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1367156622;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<clickVideoMessageAdvertisement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization.
 *
 * Returns object_ptr<Ok>.
 */
class close final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization.
   *
   * Returns object_ptr<Ok>.
   */
  close();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1187782273;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<close> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed.
 *
 * Returns object_ptr<Ok>.
 */
class closeChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed.
   *
   * Returns object_ptr<Ok>.
   */
  closeChat();

  /**
   * Creates a function, which informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit closeChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 39749353;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<closeChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a gift auction was closed by the user.
 *
 * Returns object_ptr<Ok>.
 */
class closeGiftAuction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift, which auction was closed.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a gift auction was closed by the user.
   *
   * Returns object_ptr<Ok>.
   */
  closeGiftAuction();

  /**
   * Creates a function, which informs TDLib that a gift auction was closed by the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] gift_id_ Identifier of the gift, which auction was closed.
   */
  explicit closeGiftAuction(int64 gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 115495644;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<closeGiftAuction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Closes a secret chat, effectively transferring its state to secretChatStateClosed.
 *
 * Returns object_ptr<Ok>.
 */
class closeSecretChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Secret chat identifier.
  int32 secret_chat_id_;
  static jfieldID secret_chat_id_fieldID;

  /**
   * Default constructor for a function, which closes a secret chat, effectively transferring its state to secretChatStateClosed.
   *
   * Returns object_ptr<Ok>.
   */
  closeSecretChat();

  /**
   * Creates a function, which closes a secret chat, effectively transferring its state to secretChatStateClosed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] secret_chat_id_ Secret chat identifier.
   */
  explicit closeSecretChat(int32 secret_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -471006133;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<closeSecretChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a story is closed by the user.
 *
 * Returns object_ptr<Ok>.
 */
class closeStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story to close.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a story is closed by the user.
   *
   * Returns object_ptr<Ok>.
   */
  closeStory();

  /**
   * Creates a function, which informs TDLib that a story is closed by the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story to close.
   * \param[in] story_id_ The identifier of the story.
   */
  closeStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1553967851;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<closeStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a previously opened Web App was closed.
 *
 * Returns object_ptr<Ok>.
 */
class closeWebApp final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Web App launch, received from openWebApp.
  int64 web_app_launch_id_;
  static jfieldID web_app_launch_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a previously opened Web App was closed.
   *
   * Returns object_ptr<Ok>.
   */
  closeWebApp();

  /**
   * Creates a function, which informs TDLib that a previously opened Web App was closed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] web_app_launch_id_ Identifier of Web App launch, received from openWebApp.
   */
  explicit closeWebApp(int64 web_app_launch_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1755391174;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<closeWebApp> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Applies all pending paid reactions in a live story group call.
 *
 * Returns object_ptr<Ok>.
 */
class commitPendingLiveStoryReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which applies all pending paid reactions in a live story group call.
   *
   * Returns object_ptr<Ok>.
   */
  commitPendingLiveStoryReactions();

  /**
   * Creates a function, which applies all pending paid reactions in a live story group call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit commitPendingLiveStoryReactions(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1786229016;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<commitPendingLiveStoryReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Applies all pending paid reactions on a message.
 *
 * Returns object_ptr<Ok>.
 */
class commitPendingPaidMessageReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which applies all pending paid reactions on a message.
   *
   * Returns object_ptr<Ok>.
   */
  commitPendingPaidMessageReactions();

  /**
   * Creates a function, which applies all pending paid reactions on a message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   */
  commitPendingPaidMessageReactions(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -171354618;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<commitPendingPaidMessageReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Changes text using an AI model; must not be used in secret chats. May return an error with a message &quot;AICOMPOSE_FLOOD_PREMIUM&quot; if Telegram Premium is required to send further requests.
 *
 * Returns object_ptr<FormattedText>.
 */
class composeTextWithAi final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The original text.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. See translateText.to_language_code for the list of supported values.
  string translate_to_language_code_;
  static jfieldID translate_to_language_code_fieldID;
  /// Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text.
  string style_name_;
  static jfieldID style_name_fieldID;
  /// Pass true to add emoji to the text.
  bool add_emojis_;
  static jfieldID add_emojis_fieldID;

  /**
   * Default constructor for a function, which changes text using an AI model; must not be used in secret chats. May return an error with a message &quot;AICOMPOSE_FLOOD_PREMIUM&quot; if Telegram Premium is required to send further requests.
   *
   * Returns object_ptr<FormattedText>.
   */
  composeTextWithAi();

  /**
   * Creates a function, which changes text using an AI model; must not be used in secret chats. May return an error with a message &quot;AICOMPOSE_FLOOD_PREMIUM&quot; if Telegram Premium is required to send further requests.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] text_ The original text.
   * \param[in] translate_to_language_code_ Pass a language code to which the text will be translated; pass an empty string if translation isn't needed. See translateText.to_language_code for the list of supported values.
   * \param[in] style_name_ Name of the style of the resulted text; handle updateTextCompositionStyles to get the list of supported styles; pass an empty string to keep the current style of the text.
   * \param[in] add_emojis_ Pass true to add emoji to the text.
   */
  composeTextWithAi(object_ptr<formattedText> &&text_, string const &translate_to_language_code_, string const &style_name_, bool add_emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1121392794;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<composeTextWithAi> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class session;

/**
 * Confirms QR code authentication on another device. Returns created session on success.
 *
 * Returns object_ptr<Session>.
 */
class confirmQrCodeAuthentication final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A link from a QR code. The link must be scanned by the in-app camera.
  string link_;
  static jfieldID link_fieldID;

  /**
   * Default constructor for a function, which confirms QR code authentication on another device. Returns created session on success.
   *
   * Returns object_ptr<Session>.
   */
  confirmQrCodeAuthentication();

  /**
   * Creates a function, which confirms QR code authentication on another device. Returns created session on success.
   *
   * Returns object_ptr<Session>.
   *
   * \param[in] link_ A link from a QR code. The link must be scanned by the in-app camera.
   */
  explicit confirmQrCodeAuthentication(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -376199379;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<session>;

  static object_ptr<confirmQrCodeAuthentication> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Confirms an unconfirmed session of the current user from another device.
 *
 * Returns object_ptr<Ok>.
 */
class confirmSession final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Session identifier.
  int64 session_id_;
  static jfieldID session_id_fieldID;

  /**
   * Default constructor for a function, which confirms an unconfirmed session of the current user from another device.
   *
   * Returns object_ptr<Ok>.
   */
  confirmSession();

  /**
   * Creates a function, which confirms an unconfirmed session of the current user from another device.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] session_id_ Session identifier.
   */
  explicit confirmSession(int64 session_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -674647009;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<confirmSession> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AffiliateType;

class connectedAffiliateProgram;

/**
 * Connects an affiliate program to the given affiliate. Returns information about the connected affiliate program.
 *
 * Returns object_ptr<ConnectedAffiliateProgram>.
 */
class connectAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The affiliate to which the affiliate program will be connected.
  object_ptr<AffiliateType> affiliate_;
  static jfieldID affiliate_fieldID;
  /// Identifier of the bot, which affiliate program is connected.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which connects an affiliate program to the given affiliate. Returns information about the connected affiliate program.
   *
   * Returns object_ptr<ConnectedAffiliateProgram>.
   */
  connectAffiliateProgram();

  /**
   * Creates a function, which connects an affiliate program to the given affiliate. Returns information about the connected affiliate program.
   *
   * Returns object_ptr<ConnectedAffiliateProgram>.
   *
   * \param[in] affiliate_ The affiliate to which the affiliate program will be connected.
   * \param[in] bot_user_id_ Identifier of the bot, which affiliate program is connected.
   */
  connectAffiliateProgram(object_ptr<AffiliateType> &&affiliate_, int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1661392684;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<connectedAffiliateProgram>;

  static object_ptr<connectAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CraftGiftResult;

/**
 * Crafts a new gift from other gifts that will be permanently lost.
 *
 * Returns object_ptr<CraftGiftResult>.
 */
class craftGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gifts to use for crafting. In the case of a successful craft, the resulting gift will have the number of the first gift. Consequently, the first gift must not have been withdrawn to the TON blockchain as an NFT and must have an empty gift_address.
  array<string> received_gift_ids_;
  static jfieldID received_gift_ids_fieldID;

  /**
   * Default constructor for a function, which crafts a new gift from other gifts that will be permanently lost.
   *
   * Returns object_ptr<CraftGiftResult>.
   */
  craftGift();

  /**
   * Creates a function, which crafts a new gift from other gifts that will be permanently lost.
   *
   * Returns object_ptr<CraftGiftResult>.
   *
   * \param[in] received_gift_ids_ Identifier of the gifts to use for crafting. In the case of a successful craft, the resulting gift will have the number of the first gift. Consequently, the first gift must not have been withdrawn to the TON blockchain as an NFT and must have an empty gift_address.
   */
  explicit craftGift(array<string> &&received_gift_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2124593259;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<CraftGiftResult>;

  static object_ptr<craftGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Returns an existing chat corresponding to a known basic group.
 *
 * Returns object_ptr<Chat>.
 */
class createBasicGroupChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Basic group identifier.
  int53 basic_group_id_;
  static jfieldID basic_group_id_fieldID;
  /// Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect.
  bool force_;
  static jfieldID force_fieldID;

  /**
   * Default constructor for a function, which returns an existing chat corresponding to a known basic group.
   *
   * Returns object_ptr<Chat>.
   */
  createBasicGroupChat();

  /**
   * Creates a function, which returns an existing chat corresponding to a known basic group.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] basic_group_id_ Basic group identifier.
   * \param[in] force_ Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect.
   */
  createBasicGroupChat(int53 basic_group_id_, bool force_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1972024548;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<createBasicGroupChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message &quot;BOT_CREATE_LIMIT_EXCEEDED&quot; if the user already owns the maximum allowed number of bots as per premiumLimitTypeOwnedBotCount. An internal link &quot;<a href="https://t.me/BotFather?start=deletebot">https://t.me/BotFather?start=deletebot</a>&quot; can be processed to handle the error.
 *
 * Returns object_ptr<User>.
 */
class createBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot that will manage the created bot.
  int53 manager_bot_user_id_;
  static jfieldID manager_bot_user_id_fieldID;
  /// Name of the bot; 1-64 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Username of the bot. The username must end with &quot;bot&quot;. Use checkBotUsername to find whether the name is suitable.
  string username_;
  static jfieldID username_fieldID;
  /// Pass true if the bot is created from an internalLinkTypeRequestManagedBot link.
  bool via_link_;
  static jfieldID via_link_fieldID;

  /**
   * Default constructor for a function, which creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message &quot;BOT_CREATE_LIMIT_EXCEEDED&quot; if the user already owns the maximum allowed number of bots as per premiumLimitTypeOwnedBotCount. An internal link &quot;<a href="https://t.me/BotFather?start=deletebot">https://t.me/BotFather?start=deletebot</a>&quot; can be processed to handle the error.
   *
   * Returns object_ptr<User>.
   */
  createBot();

  /**
   * Creates a function, which creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message &quot;BOT_CREATE_LIMIT_EXCEEDED&quot; if the user already owns the maximum allowed number of bots as per premiumLimitTypeOwnedBotCount. An internal link &quot;<a href="https://t.me/BotFather?start=deletebot">https://t.me/BotFather?start=deletebot</a>&quot; can be processed to handle the error.
   *
   * Returns object_ptr<User>.
   *
   * \param[in] manager_bot_user_id_ Identifier of the bot that will manage the created bot.
   * \param[in] name_ Name of the bot; 1-64 characters.
   * \param[in] username_ Username of the bot. The username must end with &quot;bot&quot;. Use checkBotUsername to find whether the name is suitable.
   * \param[in] via_link_ Pass true if the bot is created from an internalLinkTypeRequestManagedBot link.
   */
  createBot(int53 manager_bot_user_id_, string const &name_, string const &username_, bool via_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1890858327;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<createBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessChatLink;

class inputBusinessChatLink;

/**
 * Creates a business chat link for the current account. Requires Telegram Business subscription. There can be up to getOption(&quot;business_chat_link_count_max&quot;) links created. Returns the created link.
 *
 * Returns object_ptr<BusinessChatLink>.
 */
class createBusinessChatLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the link to create.
  object_ptr<inputBusinessChatLink> link_info_;
  static jfieldID link_info_fieldID;

  /**
   * Default constructor for a function, which creates a business chat link for the current account. Requires Telegram Business subscription. There can be up to getOption(&quot;business_chat_link_count_max&quot;) links created. Returns the created link.
   *
   * Returns object_ptr<BusinessChatLink>.
   */
  createBusinessChatLink();

  /**
   * Creates a function, which creates a business chat link for the current account. Requires Telegram Business subscription. There can be up to getOption(&quot;business_chat_link_count_max&quot;) links created. Returns the created link.
   *
   * Returns object_ptr<BusinessChatLink>.
   *
   * \param[in] link_info_ Information about the link to create.
   */
  explicit createBusinessChatLink(object_ptr<inputBusinessChatLink> &&link_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1861018304;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessChatLink>;

  static object_ptr<createBusinessChatLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class callId;

class callProtocol;

/**
 * Creates a new call.
 *
 * Returns object_ptr<CallId>.
 */
class createCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user to be called.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The call protocols supported by the application.
  object_ptr<callProtocol> protocol_;
  static jfieldID protocol_fieldID;
  /// Pass true to create a video call.
  bool is_video_;
  static jfieldID is_video_fieldID;

  /**
   * Default constructor for a function, which creates a new call.
   *
   * Returns object_ptr<CallId>.
   */
  createCall();

  /**
   * Creates a function, which creates a new call.
   *
   * Returns object_ptr<CallId>.
   *
   * \param[in] user_id_ Identifier of the user to be called.
   * \param[in] protocol_ The call protocols supported by the application.
   * \param[in] is_video_ Pass true to create a video call.
   */
  createCall(int53 user_id_, object_ptr<callProtocol> &&protocol_, bool is_video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1104663024;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<callId>;

  static object_ptr<createCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolder;

class chatFolderInfo;

/**
 * Creates new chat folder. Returns information about the created chat folder. There can be up to getOption(&quot;chat_folder_count_max&quot;) chat folders, but the limit can be increased with Telegram Premium.
 *
 * Returns object_ptr<ChatFolderInfo>.
 */
class createChatFolder final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new chat folder.
  object_ptr<chatFolder> folder_;
  static jfieldID folder_fieldID;

  /**
   * Default constructor for a function, which creates new chat folder. Returns information about the created chat folder. There can be up to getOption(&quot;chat_folder_count_max&quot;) chat folders, but the limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<ChatFolderInfo>.
   */
  createChatFolder();

  /**
   * Creates a function, which creates new chat folder. Returns information about the created chat folder. There can be up to getOption(&quot;chat_folder_count_max&quot;) chat folders, but the limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<ChatFolderInfo>.
   *
   * \param[in] folder_ The new chat folder.
   */
  explicit createChatFolder(object_ptr<chatFolder> &&folder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1015399680;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderInfo>;

  static object_ptr<createChatFolder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderInviteLink;

/**
 * Creates a new invite link for a chat folder. A link can be created for a chat folder if it has only pinned and included chats.
 *
 * Returns object_ptr<ChatFolderInviteLink>.
 */
class createChatFolderInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;
  /// Name of the link; 0-32 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Identifiers of chats to be accessible by the invite link. Use getChatsForChatFolderInviteLink to get suitable chats. Basic groups will be automatically converted to supergroups before link creation.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * Default constructor for a function, which creates a new invite link for a chat folder. A link can be created for a chat folder if it has only pinned and included chats.
   *
   * Returns object_ptr<ChatFolderInviteLink>.
   */
  createChatFolderInviteLink();

  /**
   * Creates a function, which creates a new invite link for a chat folder. A link can be created for a chat folder if it has only pinned and included chats.
   *
   * Returns object_ptr<ChatFolderInviteLink>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   * \param[in] name_ Name of the link; 0-32 characters.
   * \param[in] chat_ids_ Identifiers of chats to be accessible by the invite link. Use getChatsForChatFolderInviteLink to get suitable chats. Basic groups will be automatically converted to supergroups before link creation.
   */
  createChatFolderInviteLink(int32 chat_folder_id_, string const &name_, array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2037911099;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderInviteLink>;

  static object_ptr<createChatFolderInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

/**
 * Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat.
 *
 * Returns object_ptr<ChatInviteLink>.
 */
class createChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link name; 0-32 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Point in time (Unix timestamp) when the link will expire; pass 0 if never.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.
  int32 member_limit_;
  static jfieldID member_limit_fieldID;
  /// Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, member_limit must be 0.
  bool creates_join_request_;
  static jfieldID creates_join_request_fieldID;

  /**
   * Default constructor for a function, which creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat.
   *
   * Returns object_ptr<ChatInviteLink>.
   */
  createChatInviteLink();

  /**
   * Creates a function, which creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat.
   *
   * Returns object_ptr<ChatInviteLink>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] name_ Invite link name; 0-32 characters.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the link will expire; pass 0 if never.
   * \param[in] member_limit_ The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.
   * \param[in] creates_join_request_ Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, member_limit must be 0.
   */
  createChatInviteLink(int53 chat_id_, string const &name_, int32 expiration_date_, int32 member_limit_, bool creates_join_request_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 287744833;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLink>;

  static object_ptr<createChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

class starSubscriptionPricing;

/**
 * Creates a new subscription invite link for a channel chat. Requires can_invite_users right in the chat.
 *
 * Returns object_ptr<ChatInviteLink>.
 */
class createChatSubscriptionInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link name; 0-32 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Information about subscription plan that will be applied to the users joining the chat via the link. Subscription period must be 2592000 in production environment, and 60 or 300 if Telegram test environment is used.
  object_ptr<starSubscriptionPricing> subscription_pricing_;
  static jfieldID subscription_pricing_fieldID;

  /**
   * Default constructor for a function, which creates a new subscription invite link for a channel chat. Requires can_invite_users right in the chat.
   *
   * Returns object_ptr<ChatInviteLink>.
   */
  createChatSubscriptionInviteLink();

  /**
   * Creates a function, which creates a new subscription invite link for a channel chat. Requires can_invite_users right in the chat.
   *
   * Returns object_ptr<ChatInviteLink>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] name_ Invite link name; 0-32 characters.
   * \param[in] subscription_pricing_ Information about subscription plan that will be applied to the users joining the chat via the link. Subscription period must be 2592000 in production environment, and 60 or 300 if Telegram test environment is used.
   */
  createChatSubscriptionInviteLink(int53 chat_id_, string const &name_, object_ptr<starSubscriptionPricing> &&subscription_pricing_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2255717;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLink>;

  static object_ptr<createChatSubscriptionInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class forumTopicIcon;

class forumTopicInfo;

/**
 * Creates a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator or can_create_topics member right in the supergroup.
 *
 * Returns object_ptr<ForumTopicInfo>.
 */
class createForumTopic final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Name of the topic; 1-128 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Pass true if the name of the topic wasn't entered explicitly; for chats with bots only.
  bool is_name_implicit_;
  static jfieldID is_name_implicit_fieldID;
  /// 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.
  object_ptr<forumTopicIcon> icon_;
  static jfieldID icon_fieldID;

  /**
   * Default constructor for a function, which creates a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator or can_create_topics member right in the supergroup.
   *
   * Returns object_ptr<ForumTopicInfo>.
   */
  createForumTopic();

  /**
   * Creates a function, which creates a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator or can_create_topics member right in the supergroup.
   *
   * Returns object_ptr<ForumTopicInfo>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] name_ Name of the topic; 1-128 characters.
   * \param[in] is_name_implicit_ Pass true if the name of the topic wasn't entered explicitly; for chats with bots only.
   * \param[in] 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.
   */
  createForumTopic(int53 chat_id_, string const &name_, bool is_name_implicit_, object_ptr<forumTopicIcon> &&icon_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -15242103;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<forumTopicInfo>;

  static object_ptr<createForumTopic> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftCollection;

/**
 * Creates a collection from gifts on the current user's or a channel's profile page; requires can_post_messages administrator right in the channel chat. An owner can have up to getOption(&quot;gift_collection_count_max&quot;) gift collections. The new collection will be added to the end of the gift collection list of the owner. Returns the created collection.
 *
 * Returns object_ptr<GiftCollection>.
 */
class createGiftCollection final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that received the gifts.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Name of the collection; 1-12 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Identifier of the gifts to add to the collection; 0-getOption(&quot;gift_collection_size_max&quot;) identifiers.
  array<string> received_gift_ids_;
  static jfieldID received_gift_ids_fieldID;

  /**
   * Default constructor for a function, which creates a collection from gifts on the current user's or a channel's profile page; requires can_post_messages administrator right in the channel chat. An owner can have up to getOption(&quot;gift_collection_count_max&quot;) gift collections. The new collection will be added to the end of the gift collection list of the owner. Returns the created collection.
   *
   * Returns object_ptr<GiftCollection>.
   */
  createGiftCollection();

  /**
   * Creates a function, which creates a collection from gifts on the current user's or a channel's profile page; requires can_post_messages administrator right in the channel chat. An owner can have up to getOption(&quot;gift_collection_count_max&quot;) gift collections. The new collection will be added to the end of the gift collection list of the owner. Returns the created collection.
   *
   * Returns object_ptr<GiftCollection>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that received the gifts.
   * \param[in] name_ Name of the collection; 1-12 characters.
   * \param[in] received_gift_ids_ Identifier of the gifts to add to the collection; 0-getOption(&quot;gift_collection_size_max&quot;) identifiers.
   */
  createGiftCollection(object_ptr<MessageSender> &&owner_id_, string const &name_, array<string> &&received_gift_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -397088099;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftCollection>;

  static object_ptr<createGiftCollection> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class groupCallInfo;

class groupCallJoinParameters;

/**
 * Creates a new group call that isn't bound to a chat.
 *
 * Returns object_ptr<GroupCallInfo>.
 */
class createGroupCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Parameters to join the call; pass null to only create call link without joining the call.
  object_ptr<groupCallJoinParameters> join_parameters_;
  static jfieldID join_parameters_fieldID;

  /**
   * Default constructor for a function, which creates a new group call that isn't bound to a chat.
   *
   * Returns object_ptr<GroupCallInfo>.
   */
  createGroupCall();

  /**
   * Creates a function, which creates a new group call that isn't bound to a chat.
   *
   * Returns object_ptr<GroupCallInfo>.
   *
   * \param[in] join_parameters_ Parameters to join the call; pass null to only create call link without joining the call.
   */
  explicit createGroupCall(object_ptr<groupCallJoinParameters> &&join_parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1930068672;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCallInfo>;

  static object_ptr<createGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class httpUrl;

/**
 * Creates a link for the given invoice; for bots only.
 *
 * Returns object_ptr<HttpUrl>.
 */
class createInvoiceLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Information about the invoice of the type inputMessageInvoice.
  object_ptr<InputMessageContent> invoice_;
  static jfieldID invoice_fieldID;

  /**
   * Default constructor for a function, which creates a link for the given invoice; for bots only.
   *
   * Returns object_ptr<HttpUrl>.
   */
  createInvoiceLink();

  /**
   * Creates a function, which creates a link for the given invoice; for bots only.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request.
   * \param[in] invoice_ Information about the invoice of the type inputMessageInvoice.
   */
  createInvoiceLink(string const &business_connection_id_, object_ptr<InputMessageContent> &&invoice_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -814692249;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<createInvoiceLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class createdBasicGroupChat;

/**
 * Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns information about the newly created chat.
 *
 * Returns object_ptr<CreatedBasicGroupChat>.
 */
class createNewBasicGroupChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of users to be added to the basic group; may be empty to create a basic group without other members.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;
  /// Title of the new basic group; 1-128 characters.
  string title_;
  static jfieldID title_fieldID;
  /// Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
  int32 message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;

  /**
   * Default constructor for a function, which creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns information about the newly created chat.
   *
   * Returns object_ptr<CreatedBasicGroupChat>.
   */
  createNewBasicGroupChat();

  /**
   * Creates a function, which creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns information about the newly created chat.
   *
   * Returns object_ptr<CreatedBasicGroupChat>.
   *
   * \param[in] user_ids_ Identifiers of users to be added to the basic group; may be empty to create a basic group without other members.
   * \param[in] title_ Title of the new basic group; 1-128 characters.
   * \param[in] message_auto_delete_time_ Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
   */
  createNewBasicGroupChat(array<int53> &&user_ids_, string const &title_, int32 message_auto_delete_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1806454709;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<createdBasicGroupChat>;

  static object_ptr<createNewBasicGroupChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Creates a new secret chat. Returns the newly created chat.
 *
 * Returns object_ptr<Chat>.
 */
class createNewSecretChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which creates a new secret chat. Returns the newly created chat.
   *
   * Returns object_ptr<Chat>.
   */
  createNewSecretChat();

  /**
   * Creates a function, which creates a new secret chat. Returns the newly created chat.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] user_id_ Identifier of the target user.
   */
  explicit createNewSecretChat(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -620682651;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<createNewSecretChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class inputSticker;

class stickerSet;

/**
 * Creates a new sticker set. Returns the newly created sticker set.
 *
 * Returns object_ptr<StickerSet>.
 */
class createNewStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Sticker set title; 1-64 characters.
  string title_;
  static jfieldID title_fieldID;
  /// Sticker set name. Can contain only English letters, digits and underscores. Must end with *&quot;_by_&lt;bot username&gt;&quot;* (*&lt;bot_username&gt;* is case insensitive) for bots; 0-64 characters. If empty, then the name returned by getSuggestedStickerSetName will be used automatically.
  string name_;
  static jfieldID name_fieldID;
  /// Type of the stickers in the set.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only.
  bool needs_repainting_;
  static jfieldID needs_repainting_fieldID;
  /// List of stickers to be added to the set; 1-200 stickers for custom emoji sticker sets, and 1-120 stickers otherwise. For TGS stickers, uploadStickerFile must be used before the sticker is shown.
  array<object_ptr<inputSticker>> stickers_;
  static jfieldID stickers_fieldID;
  /// Source of the sticker set; may be empty if unknown.
  string source_;
  static jfieldID source_fieldID;

  /**
   * Default constructor for a function, which creates a new sticker set. Returns the newly created sticker set.
   *
   * Returns object_ptr<StickerSet>.
   */
  createNewStickerSet();

  /**
   * Creates a function, which creates a new sticker set. Returns the newly created sticker set.
   *
   * Returns object_ptr<StickerSet>.
   *
   * \param[in] user_id_ Sticker set owner; ignored for regular users.
   * \param[in] title_ Sticker set title; 1-64 characters.
   * \param[in] name_ Sticker set name. Can contain only English letters, digits and underscores. Must end with *&quot;_by_&lt;bot username&gt;&quot;* (*&lt;bot_username&gt;* is case insensitive) for bots; 0-64 characters. If empty, then the name returned by getSuggestedStickerSetName will be used automatically.
   * \param[in] sticker_type_ Type of the stickers in the set.
   * \param[in] needs_repainting_ Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only.
   * \param[in] stickers_ List of stickers to be added to the set; 1-200 stickers for custom emoji sticker sets, and 1-120 stickers otherwise. For TGS stickers, uploadStickerFile must be used before the sticker is shown.
   * \param[in] source_ Source of the sticker set; may be empty if unknown.
   */
  createNewStickerSet(int53 user_id_, string const &title_, string const &name_, object_ptr<StickerType> &&sticker_type_, bool needs_repainting_, array<object_ptr<inputSticker>> &&stickers_, string const &source_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -481065727;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSet>;

  static object_ptr<createNewStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

class chatLocation;

/**
 * Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat.
 *
 * Returns object_ptr<Chat>.
 */
class createNewSupergroupChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the new chat; 1-128 characters.
  string title_;
  static jfieldID title_fieldID;
  /// Pass true to create a forum supergroup chat.
  bool is_forum_;
  static jfieldID is_forum_fieldID;
  /// Pass true to create a channel chat; ignored if a forum is created.
  bool is_channel_;
  static jfieldID is_channel_fieldID;
  /// Chat description; 0-255 characters.
  string description_;
  static jfieldID description_fieldID;
  /// Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat.
  object_ptr<chatLocation> location_;
  static jfieldID location_fieldID;
  /// Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
  int32 message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;
  /// Pass true to create a supergroup for importing messages using importMessages.
  bool for_import_;
  static jfieldID for_import_fieldID;

  /**
   * Default constructor for a function, which creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat.
   *
   * Returns object_ptr<Chat>.
   */
  createNewSupergroupChat();

  /**
   * Creates a function, which creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] title_ Title of the new chat; 1-128 characters.
   * \param[in] is_forum_ Pass true to create a forum supergroup chat.
   * \param[in] is_channel_ Pass true to create a channel chat; ignored if a forum is created.
   * \param[in] description_ Chat description; 0-255 characters.
   * \param[in] location_ Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat.
   * \param[in] message_auto_delete_time_ Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
   * \param[in] for_import_ Pass true to create a supergroup for importing messages using importMessages.
   */
  createNewSupergroupChat(string const &title_, bool is_forum_, bool is_channel_, string const &description_, object_ptr<chatLocation> &&location_, int32 message_auto_delete_time_, bool for_import_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 804058822;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<createNewSupergroupChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Returns an existing chat corresponding to a given user.
 *
 * Returns object_ptr<Chat>.
 */
class createPrivateChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect.
  bool force_;
  static jfieldID force_fieldID;

  /**
   * Default constructor for a function, which returns an existing chat corresponding to a given user.
   *
   * Returns object_ptr<Chat>.
   */
  createPrivateChat();

  /**
   * Creates a function, which returns an existing chat corresponding to a given user.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] force_ Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect.
   */
  createPrivateChat(int53 user_id_, bool force_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -947758327;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<createPrivateChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Returns an existing chat corresponding to a known secret chat.
 *
 * Returns object_ptr<Chat>.
 */
class createSecretChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Secret chat identifier.
  int32 secret_chat_id_;
  static jfieldID secret_chat_id_fieldID;

  /**
   * Default constructor for a function, which returns an existing chat corresponding to a known secret chat.
   *
   * Returns object_ptr<Chat>.
   */
  createSecretChat();

  /**
   * Creates a function, which returns an existing chat corresponding to a known secret chat.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] secret_chat_id_ Secret chat identifier.
   */
  explicit createSecretChat(int32 secret_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1930285615;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<createSecretChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbum;

/**
 * Creates an album of stories; requires can_edit_stories administrator right for supergroup and channel chats.
 *
 * Returns object_ptr<StoryAlbum>.
 */
class createStoryAlbum final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the stories.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Name of the album; 1-12 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Identifiers of stories to add to the album; 0-getOption(&quot;story_album_size_max&quot;) identifiers.
  array<int32> story_ids_;
  static jfieldID story_ids_fieldID;

  /**
   * Default constructor for a function, which creates an album of stories; requires can_edit_stories administrator right for supergroup and channel chats.
   *
   * Returns object_ptr<StoryAlbum>.
   */
  createStoryAlbum();

  /**
   * Creates a function, which creates an album of stories; requires can_edit_stories administrator right for supergroup and channel chats.
   *
   * Returns object_ptr<StoryAlbum>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the stories.
   * \param[in] name_ Name of the album; 1-12 characters.
   * \param[in] story_ids_ Identifiers of stories to add to the album; 0-getOption(&quot;story_album_size_max&quot;) identifiers.
   */
  createStoryAlbum(int53 story_poster_chat_id_, string const &name_, array<int32> &&story_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -804362185;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyAlbum>;

  static object_ptr<createStoryAlbum> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Returns an existing chat corresponding to a known supergroup or channel.
 *
 * Returns object_ptr<Chat>.
 */
class createSupergroupChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup or channel identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect.
  bool force_;
  static jfieldID force_fieldID;

  /**
   * Default constructor for a function, which returns an existing chat corresponding to a known supergroup or channel.
   *
   * Returns object_ptr<Chat>.
   */
  createSupergroupChat();

  /**
   * Creates a function, which returns an existing chat corresponding to a known supergroup or channel.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] supergroup_id_ Supergroup or channel identifier.
   * \param[in] force_ Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect.
   */
  createSupergroupChat(int53 supergroup_id_, bool force_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1187475691;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<createSupergroupChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class temporaryPasswordState;

/**
 * Creates a new temporary password for processing payments.
 *
 * Returns object_ptr<TemporaryPasswordState>.
 */
class createTemporaryPassword final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;
  /// Time during which the temporary password will be valid, in seconds; must be between 60 and 86400.
  int32 valid_for_;
  static jfieldID valid_for_fieldID;

  /**
   * Default constructor for a function, which creates a new temporary password for processing payments.
   *
   * Returns object_ptr<TemporaryPasswordState>.
   */
  createTemporaryPassword();

  /**
   * Creates a function, which creates a new temporary password for processing payments.
   *
   * Returns object_ptr<TemporaryPasswordState>.
   *
   * \param[in] password_ The 2-step verification password of the current user.
   * \param[in] valid_for_ Time during which the temporary password will be valid, in seconds; must be between 60 and 86400.
   */
  createTemporaryPassword(string const &password_, int32 valid_for_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1626509434;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<temporaryPasswordState>;

  static object_ptr<createTemporaryPassword> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class textCompositionStyle;

/**
 * Creates a custom text composition style. May return an error with a message &quot;TONES_SAVED_TOO_MANY&quot; if the maximum number of added custom styles has been reached.
 *
 * Returns object_ptr<TextCompositionStyle>.
 */
class createTextCompositionStyle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Title of the style; 1-getOption(&quot;text_composition_style_title_length_max&quot;) characters.
  string title_;
  static jfieldID title_fieldID;
  /// Identifier of the custom emoji corresponding to the style.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;
  /// Prompt that will be used for text composition; 1-getOption(&quot;text_composition_style_prompt_length_max&quot;) characters.
  string prompt_;
  static jfieldID prompt_fieldID;
  /// Pass true if the current user must be shown as the creator of the style.
  bool show_creator_;
  static jfieldID show_creator_fieldID;

  /**
   * Default constructor for a function, which creates a custom text composition style. May return an error with a message &quot;TONES_SAVED_TOO_MANY&quot; if the maximum number of added custom styles has been reached.
   *
   * Returns object_ptr<TextCompositionStyle>.
   */
  createTextCompositionStyle();

  /**
   * Creates a function, which creates a custom text composition style. May return an error with a message &quot;TONES_SAVED_TOO_MANY&quot; if the maximum number of added custom styles has been reached.
   *
   * Returns object_ptr<TextCompositionStyle>.
   *
   * \param[in] title_ Title of the style; 1-getOption(&quot;text_composition_style_title_length_max&quot;) characters.
   * \param[in] custom_emoji_id_ Identifier of the custom emoji corresponding to the style.
   * \param[in] prompt_ Prompt that will be used for text composition; 1-getOption(&quot;text_composition_style_prompt_length_max&quot;) characters.
   * \param[in] show_creator_ Pass true if the current user must be shown as the creator of the style.
   */
  createTextCompositionStyle(string const &title_, int64 custom_emoji_id_, string const &prompt_, bool show_creator_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1549417869;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<textCompositionStyle>;

  static object_ptr<createTextCompositionStyle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class groupCallId;

/**
 * Creates a video chat (a group call bound to a chat); for basic groups, supergroups and channels only; requires can_manage_video_chats administrator right.
 *
 * Returns object_ptr<GroupCallId>.
 */
class createVideoChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a chat in which the video chat will be created.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Group call title; if empty, chat title will be used.
  string title_;
  static jfieldID title_fieldID;
  /// Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future.
  int32 start_date_;
  static jfieldID start_date_fieldID;
  /// Pass true to create an RTMP stream instead of an ordinary video chat.
  bool is_rtmp_stream_;
  static jfieldID is_rtmp_stream_fieldID;

  /**
   * Default constructor for a function, which creates a video chat (a group call bound to a chat); for basic groups, supergroups and channels only; requires can_manage_video_chats administrator right.
   *
   * Returns object_ptr<GroupCallId>.
   */
  createVideoChat();

  /**
   * Creates a function, which creates a video chat (a group call bound to a chat); for basic groups, supergroups and channels only; requires can_manage_video_chats administrator right.
   *
   * Returns object_ptr<GroupCallId>.
   *
   * \param[in] chat_id_ Identifier of a chat in which the video chat will be created.
   * \param[in] title_ Group call title; if empty, chat title will be used.
   * \param[in] start_date_ Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future.
   * \param[in] is_rtmp_stream_ Pass true to create an RTMP stream instead of an ordinary video chat.
   */
  createVideoChat(int53 chat_id_, string const &title_, int32 start_date_, bool is_rtmp_stream_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2124715405;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCallId>;

  static object_ptr<createVideoChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Declines an invitation to an active group call via messageGroupCall. Can be called both by the sender and the receiver of the invitation.
 *
 * Returns object_ptr<Ok>.
 */
class declineGroupCallInvitation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message of the type messageGroupCall.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which declines an invitation to an active group call via messageGroupCall. Can be called both by the sender and the receiver of the invitation.
   *
   * Returns object_ptr<Ok>.
   */
  declineGroupCallInvitation();

  /**
   * Creates a function, which declines an invitation to an active group call via messageGroupCall. Can be called both by the sender and the receiver of the invitation.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message of the type messageGroupCall.
   */
  declineGroupCallInvitation(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1843919377;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<declineGroupCallInvitation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Declines an OAuth authorization request.
 *
 * Returns object_ptr<Ok>.
 */
class declineOauthRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the OAuth deep link.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Default constructor for a function, which declines an OAuth authorization request.
   *
   * Returns object_ptr<Ok>.
   */
  declineOauthRequest();

  /**
   * Creates a function, which declines an OAuth authorization request.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] url_ URL of the OAuth deep link.
   */
  explicit declineOauthRequest(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 420650996;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<declineOauthRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Declines a suggested post in a channel direct messages chat.
 *
 * Returns object_ptr<Ok>.
 */
class declineSuggestedPost final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with the suggested post. Use messageProperties.can_be_declined to check whether the suggested post can be declined.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Comment for the creator of the suggested post; 0-128 characters.
  string comment_;
  static jfieldID comment_fieldID;

  /**
   * Default constructor for a function, which declines a suggested post in a channel direct messages chat.
   *
   * Returns object_ptr<Ok>.
   */
  declineSuggestedPost();

  /**
   * Creates a function, which declines a suggested post in a channel direct messages chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] message_id_ Identifier of the message with the suggested post. Use messageProperties.can_be_declined to check whether the suggested post can be declined.
   * \param[in] comment_ Comment for the creator of the suggested post; 0-128 characters.
   */
  declineSuggestedPost(int53 chat_id_, int53 message_id_, string const &comment_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1758260609;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<declineSuggestedPost> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GroupCallDataChannel;

class MessageSender;

class data;

/**
 * Decrypts group call data received by tgcalls.
 *
 * Returns object_ptr<Data>.
 */
class decryptGroupCallData final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier. The call must not be a video chat.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifier of the group call participant, which sent the data.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// Data channel for which data was encrypted; pass null if unknown.
  object_ptr<GroupCallDataChannel> data_channel_;
  static jfieldID data_channel_fieldID;
  /// Data to decrypt.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * Default constructor for a function, which decrypts group call data received by tgcalls.
   *
   * Returns object_ptr<Data>.
   */
  decryptGroupCallData();

  /**
   * Creates a function, which decrypts group call data received by tgcalls.
   *
   * Returns object_ptr<Data>.
   *
   * \param[in] group_call_id_ Group call identifier. The call must not be a video chat.
   * \param[in] participant_id_ Identifier of the group call participant, which sent the data.
   * \param[in] data_channel_ Data channel for which data was encrypted; pass null if unknown.
   * \param[in] data_ Data to decrypt.
   */
  decryptGroupCallData(int32 group_call_id_, object_ptr<MessageSender> &&participant_id_, object_ptr<GroupCallDataChannel> &&data_channel_, bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1781743076;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<data>;

  static object_ptr<decryptGroupCallData> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class deleteAccount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The reason why the account was deleted; optional.
  string reason_;
  static jfieldID reason_fieldID;
  /// The 2-step verification password of the current user. If the current user isn't authorized, then an empty string can be passed and account deletion can be canceled within one week.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  deleteAccount();

  /**
   * Creates a function, which deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] reason_ The reason why the account was deleted; optional.
   * \param[in] password_ The 2-step verification password of the current user. If the current user isn't authorized, then an empty string can be passed and account deletion can be canceled within one week.
   */
  deleteAccount(string const &reason_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1395816134;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteAccount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all call messages.
 *
 * Returns object_ptr<Ok>.
 */
class deleteAllCallMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to delete the messages for all users.
  bool revoke_;
  static jfieldID revoke_fieldID;

  /**
   * Default constructor for a function, which deletes all call messages.
   *
   * Returns object_ptr<Ok>.
   */
  deleteAllCallMessages();

  /**
   * Creates a function, which deletes all call messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] revoke_ Pass true to delete the messages for all users.
   */
  explicit deleteAllCallMessages(bool revoke_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1466445325;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteAllCallMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Deletes all recent reactions added by the specified sender in a chat. Supported only for basic groups and supergroups; requires can_delete_messages administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class deleteAllRecentMessageReactionsFromSender final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the sender of reactions to delete.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;

  /**
   * Default constructor for a function, which deletes all recent reactions added by the specified sender in a chat. Supported only for basic groups and supergroups; requires can_delete_messages administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  deleteAllRecentMessageReactionsFromSender();

  /**
   * Creates a function, which deletes all recent reactions added by the specified sender in a chat. Supported only for basic groups and supergroups; requires can_delete_messages administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] sender_id_ Identifier of the sender of reactions to delete.
   */
  deleteAllRecentMessageReactionsFromSender(int53 chat_id_, object_ptr<MessageSender> &&sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -699051658;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteAllRecentMessageReactionsFromSender> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
 *
 * Returns object_ptr<Ok>.
 */
class deleteAllRevokedChatInviteLinks final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner.
  int53 creator_user_id_;
  static jfieldID creator_user_id_fieldID;

  /**
   * Default constructor for a function, which deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<Ok>.
   */
  deleteAllRevokedChatInviteLinks();

  /**
   * Creates a function, which deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] creator_user_id_ User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner.
   */
  deleteAllRevokedChatInviteLinks(int53 chat_id_, int53 creator_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1112020698;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteAllRevokedChatInviteLinks> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes media previews from the list of media previews of a bot.
 *
 * Returns object_ptr<Ok>.
 */
class deleteBotMediaPreviews final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Language code of the media previews to delete.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// File identifiers of the media to delete.
  array<int32> file_ids_;
  static jfieldID file_ids_fieldID;

  /**
   * Default constructor for a function, which deletes media previews from the list of media previews of a bot.
   *
   * Returns object_ptr<Ok>.
   */
  deleteBotMediaPreviews();

  /**
   * Creates a function, which deletes media previews from the list of media previews of a bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. The bot must be owned and must have the main Web App.
   * \param[in] language_code_ Language code of the media previews to delete.
   * \param[in] file_ids_ File identifiers of the media to delete.
   */
  deleteBotMediaPreviews(int53 bot_user_id_, string const &language_code_, array<int32> &&file_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1397512722;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteBotMediaPreviews> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a business chat link of the current account.
 *
 * Returns object_ptr<Ok>.
 */
class deleteBusinessChatLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link to delete.
  string link_;
  static jfieldID link_fieldID;

  /**
   * Default constructor for a function, which deletes a business chat link of the current account.
   *
   * Returns object_ptr<Ok>.
   */
  deleteBusinessChatLink();

  /**
   * Creates a function, which deletes a business chat link of the current account.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] link_ The link to delete.
   */
  explicit deleteBusinessChatLink(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1101895865;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteBusinessChatLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes the business bot that is connected to the current user account.
 *
 * Returns object_ptr<Ok>.
 */
class deleteBusinessConnectedBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique user identifier for the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which deletes the business bot that is connected to the current user account.
   *
   * Returns object_ptr<Ok>.
   */
  deleteBusinessConnectedBot();

  /**
   * Creates a function, which deletes the business bot that is connected to the current user account.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Unique user identifier for the bot.
   */
  explicit deleteBusinessConnectedBot(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1633976747;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteBusinessConnectedBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes messages on behalf of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class deleteBusinessMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection through which the messages were received.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Identifier of the messages.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Default constructor for a function, which deletes messages on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  deleteBusinessMessages();

  /**
   * Creates a function, which deletes messages on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection through which the messages were received.
   * \param[in] message_ids_ Identifier of the messages.
   */
  deleteBusinessMessages(string const &business_connection_id_, array<int53> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1425721828;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteBusinessMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a story posted by the bot on behalf of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class deleteBusinessStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Identifier of the story to delete.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Default constructor for a function, which deletes a story posted by the bot on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  deleteBusinessStory();

  /**
   * Creates a function, which deletes a story posted by the bot on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] story_id_ Identifier of the story to delete.
   */
  deleteBusinessStory(string const &business_connection_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1024585042;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteBusinessStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChat();

  /**
   * Creates a function, which deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit deleteChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -171253666;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes background in a specific chat.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatBackground final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to restore previously set background. Can be used only in private and secret chats with non-deleted users if userFullInfo.set_chat_background == true. Supposed to be used from messageChatSetBackground messages with the currently set background that was set for both sides by the other user.
  bool restore_previous_;
  static jfieldID restore_previous_fieldID;

  /**
   * Default constructor for a function, which deletes background in a specific chat.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatBackground();

  /**
   * Creates a function, which deletes background in a specific chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] restore_previous_ Pass true to restore previously set background. Can be used only in private and secret chats with non-deleted users if userFullInfo.set_chat_background == true. Supposed to be used from messageChatSetBackground messages with the currently set background that was set for both sides by the other user.
   */
  deleteChatBackground(int53 chat_id_, bool restore_previous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 320267896;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes existing chat folder.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatFolder final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;
  /// Identifiers of the chats to leave. The chats must be pinned or always included in the folder.
  array<int53> leave_chat_ids_;
  static jfieldID leave_chat_ids_fieldID;

  /**
   * Default constructor for a function, which deletes existing chat folder.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatFolder();

  /**
   * Creates a function, which deletes existing chat folder.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   * \param[in] leave_chat_ids_ Identifiers of the chats to leave. The chats must be pinned or always included in the folder.
   */
  deleteChatFolder(int32 chat_folder_id_, array<int53> &&leave_chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1956364551;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatFolder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes an invite link for a chat folder.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatFolderInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;
  /// Invite link to be deleted.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which deletes an invite link for a chat folder.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatFolderInviteLink();

  /**
   * Creates a function, which deletes an invite link for a chat folder.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   * \param[in] invite_link_ Invite link to be deleted.
   */
  deleteChatFolderInviteLink(int32 chat_folder_id_, string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -930057858;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatFolderInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to remove the chat from all chat lists.
  bool remove_from_chat_list_;
  static jfieldID remove_from_chat_list_fieldID;
  /// Pass true to delete chat history for all users.
  bool revoke_;
  static jfieldID revoke_fieldID;

  /**
   * Default constructor for a function, which deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatHistory();

  /**
   * Creates a function, which deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] remove_from_chat_list_ Pass true to remove the chat from all chat lists.
   * \param[in] revoke_ Pass true to delete chat history for all users.
   */
  deleteChatHistory(int53 chat_id_, bool remove_from_chat_list_, bool revoke_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1472081761;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatMessagesByDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The minimum date of the messages to delete.
  int32 min_date_;
  static jfieldID min_date_fieldID;
  /// The maximum date of the messages to delete.
  int32 max_date_;
  static jfieldID max_date_fieldID;
  /// Pass true to delete chat messages for all users; private chats only.
  bool revoke_;
  static jfieldID revoke_fieldID;

  /**
   * Default constructor for a function, which deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatMessagesByDate();

  /**
   * Creates a function, which deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] min_date_ The minimum date of the messages to delete.
   * \param[in] max_date_ The maximum date of the messages to delete.
   * \param[in] revoke_ Pass true to delete chat messages for all users; private chats only.
   */
  deleteChatMessagesByDate(int53 chat_id_, int32 min_date_, int32 max_date_, bool revoke_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1639653185;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatMessagesByDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatMessagesBySender final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the sender of messages to delete.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;

  /**
   * Default constructor for a function, which deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatMessagesBySender();

  /**
   * Creates a function, which deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] sender_id_ Identifier of the sender of messages to delete.
   */
  deleteChatMessagesBySender(int53 chat_id_, object_ptr<MessageSender> &&sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1164235161;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatMessagesBySender> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a replyMarkupForceReply reply markup has been used or dismissed.
 *
 * Returns object_ptr<Ok>.
 */
class deleteChatReplyMarkup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The message identifier of the used keyboard.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which deletes the default reply markup from a chat. Must be called after a one-time keyboard or a replyMarkupForceReply reply markup has been used or dismissed.
   *
   * Returns object_ptr<Ok>.
   */
  deleteChatReplyMarkup();

  /**
   * Creates a function, which deletes the default reply markup from a chat. Must be called after a one-time keyboard or a replyMarkupForceReply reply markup has been used or dismissed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ The message identifier of the used keyboard.
   */
  deleteChatReplyMarkup(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 100637531;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteChatReplyMarkup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BotCommandScope;

class ok;

/**
 * Deletes commands supported by the bot for the given user scope and language; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class deleteCommands final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The scope to which the commands are relevant; pass null to delete commands in the default bot command scope.
  object_ptr<BotCommandScope> scope_;
  static jfieldID scope_fieldID;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which deletes commands supported by the bot for the given user scope and language; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  deleteCommands();

  /**
   * Creates a function, which deletes commands supported by the bot for the given user scope and language; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] scope_ The scope to which the commands are relevant; pass null to delete commands in the default bot command scope.
   * \param[in] language_code_ A two-letter ISO 639-1 language code or an empty string.
   */
  deleteCommands(object_ptr<BotCommandScope> &&scope_, string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1002732586;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteCommands> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes default background for chats.
 *
 * Returns object_ptr<Ok>.
 */
class deleteDefaultBackground final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true if the background is deleted for a dark theme.
  bool for_dark_theme_;
  static jfieldID for_dark_theme_fieldID;

  /**
   * Default constructor for a function, which deletes default background for chats.
   *
   * Returns object_ptr<Ok>.
   */
  deleteDefaultBackground();

  /**
   * Creates a function, which deletes default background for chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] for_dark_theme_ Pass true if the background is deleted for a dark theme.
   */
  explicit deleteDefaultBackground(bool for_dark_theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1297814210;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteDefaultBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages in the topic in a channel direct messages chat administered by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class deleteDirectMessagesChatTopicHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic which messages will be deleted.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Default constructor for a function, which deletes all messages in the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  deleteDirectMessagesChatTopicHistory();

  /**
   * Creates a function, which deletes all messages in the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] topic_id_ Identifier of the topic which messages will be deleted.
   */
  deleteDirectMessagesChatTopicHistory(int53 chat_id_, int53 topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1906080196;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteDirectMessagesChatTopicHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages between the specified dates in the topic in a channel direct messages chat administered by the current user. Messages sent in the last 30 seconds will not be deleted.
 *
 * Returns object_ptr<Ok>.
 */
class deleteDirectMessagesChatTopicMessagesByDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic which messages will be deleted.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;
  /// The minimum date of the messages to delete.
  int32 min_date_;
  static jfieldID min_date_fieldID;
  /// The maximum date of the messages to delete.
  int32 max_date_;
  static jfieldID max_date_fieldID;

  /**
   * Default constructor for a function, which deletes all messages between the specified dates in the topic in a channel direct messages chat administered by the current user. Messages sent in the last 30 seconds will not be deleted.
   *
   * Returns object_ptr<Ok>.
   */
  deleteDirectMessagesChatTopicMessagesByDate();

  /**
   * Creates a function, which deletes all messages between the specified dates in the topic in a channel direct messages chat administered by the current user. Messages sent in the last 30 seconds will not be deleted.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] topic_id_ Identifier of the topic which messages will be deleted.
   * \param[in] min_date_ The minimum date of the messages to delete.
   * \param[in] max_date_ The maximum date of the messages to delete.
   */
  deleteDirectMessagesChatTopicMessagesByDate(int53 chat_id_, int53 topic_id_, int32 min_date_, int32 max_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 945080841;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteDirectMessagesChatTopicMessagesByDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a file from the TDLib file cache.
 *
 * Returns object_ptr<Ok>.
 */
class deleteFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file to delete.
  int32 file_id_;
  static jfieldID file_id_fieldID;

  /**
   * Default constructor for a function, which deletes a file from the TDLib file cache.
   *
   * Returns object_ptr<Ok>.
   */
  deleteFile();

  /**
   * Creates a function, which deletes a file from the TDLib file cache.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the file to delete.
   */
  explicit deleteFile(int32 file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1807653676;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages.
 *
 * Returns object_ptr<Ok>.
 */
class deleteForumTopic final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which deletes all messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages.
   *
   * Returns object_ptr<Ok>.
   */
  deleteForumTopic();

  /**
   * Creates a function, which deletes all messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] forum_topic_id_ Forum topic identifier.
   */
  deleteForumTopic(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2121212039;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteForumTopic> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Deletes a gift collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat.
 *
 * Returns object_ptr<Ok>.
 */
class deleteGiftCollection final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the collection.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Identifier of the gift collection.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;

  /**
   * Default constructor for a function, which deletes a gift collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   */
  deleteGiftCollection();

  /**
   * Creates a function, which deletes a gift collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the collection.
   * \param[in] collection_id_ Identifier of the gift collection.
   */
  deleteGiftCollection(object_ptr<MessageSender> &&owner_id_, int32 collection_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -183749499;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteGiftCollection> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes messages in a group call; for live story calls only. Requires groupCallMessage.can_be_deleted right.
 *
 * Returns object_ptr<Ok>.
 */
class deleteGroupCallMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifiers of the messages to be deleted.
  array<int32> message_ids_;
  static jfieldID message_ids_fieldID;
  /// Pass true to report the messages as spam.
  bool report_spam_;
  static jfieldID report_spam_fieldID;

  /**
   * Default constructor for a function, which deletes messages in a group call; for live story calls only. Requires groupCallMessage.can_be_deleted right.
   *
   * Returns object_ptr<Ok>.
   */
  deleteGroupCallMessages();

  /**
   * Creates a function, which deletes messages in a group call; for live story calls only. Requires groupCallMessage.can_be_deleted right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] message_ids_ Identifiers of the messages to be deleted.
   * \param[in] report_spam_ Pass true to report the messages as spam.
   */
  deleteGroupCallMessages(int32 group_call_id_, array<int32> &&message_ids_, bool report_spam_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 339562398;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteGroupCallMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Deletes all messages sent by the specified message sender in a group call; for live story calls only. Requires groupCall.can_delete_messages right.
 *
 * Returns object_ptr<Ok>.
 */
class deleteGroupCallMessagesBySender final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifier of the sender of messages to delete.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Pass true to report the messages as spam.
  bool report_spam_;
  static jfieldID report_spam_fieldID;

  /**
   * Default constructor for a function, which deletes all messages sent by the specified message sender in a group call; for live story calls only. Requires groupCall.can_delete_messages right.
   *
   * Returns object_ptr<Ok>.
   */
  deleteGroupCallMessagesBySender();

  /**
   * Creates a function, which deletes all messages sent by the specified message sender in a group call; for live story calls only. Requires groupCall.can_delete_messages right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] sender_id_ Identifier of the sender of messages to delete.
   * \param[in] report_spam_ Pass true to report the messages as spam.
   */
  deleteGroupCallMessagesBySender(int32 group_call_id_, object_ptr<MessageSender> &&sender_id_, bool report_spam_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1677247618;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteGroupCallMessagesBySender> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class deleteLanguagePack final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the language pack to delete.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;

  /**
   * Default constructor for a function, which deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  deleteLanguagePack();

  /**
   * Creates a function, which deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] language_pack_id_ Identifier of the language pack to delete.
   */
  explicit deleteLanguagePack(string const &language_pack_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2108761026;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteLanguagePack> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Deletes all reactions added by the specified sender on a message.
 *
 * Returns object_ptr<Ok>.
 */
class deleteMessageReactionsFromSender final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the reactions. Use messageProperties.can_delete_reactions to check whether the method can be used for a message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the sender of reactions to delete.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;

  /**
   * Default constructor for a function, which deletes all reactions added by the specified sender on a message.
   *
   * Returns object_ptr<Ok>.
   */
  deleteMessageReactionsFromSender();

  /**
   * Creates a function, which deletes all reactions added by the specified sender on a message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message containing the reactions. Use messageProperties.can_delete_reactions to check whether the method can be used for a message.
   * \param[in] sender_id_ Identifier of the sender of reactions to delete.
   */
  deleteMessageReactionsFromSender(int53 chat_id_, int53 message_id_, object_ptr<MessageSender> &&sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 780354493;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteMessageReactionsFromSender> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes messages.
 *
 * Returns object_ptr<Ok>.
 */
class deleteMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifiers of the messages to be deleted. Use messageProperties.can_be_deleted_only_for_self and messageProperties.can_be_deleted_for_all_users to get suitable messages.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;
  /// Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats.
  bool revoke_;
  static jfieldID revoke_fieldID;

  /**
   * Default constructor for a function, which deletes messages.
   *
   * Returns object_ptr<Ok>.
   */
  deleteMessages();

  /**
   * Creates a function, which deletes messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_ids_ Identifiers of the messages to be deleted. Use messageProperties.can_be_deleted_only_for_self and messageProperties.can_be_deleted_for_all_users to get suitable messages.
   * \param[in] revoke_ Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats.
   */
  deleteMessages(int53 chat_id_, array<int53> &&message_ids_, bool revoke_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1130090173;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PassportElementType;

class ok;

/**
 * Deletes a Telegram Passport element.
 *
 * Returns object_ptr<Ok>.
 */
class deletePassportElement final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Element type.
  object_ptr<PassportElementType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which deletes a Telegram Passport element.
   *
   * Returns object_ptr<Ok>.
   */
  deletePassportElement();

  /**
   * Creates a function, which deletes a Telegram Passport element.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] type_ Element type.
   */
  explicit deletePassportElement(object_ptr<PassportElementType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1719555468;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deletePassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes an option from a poll.
 *
 * Returns object_ptr<Ok>.
 */
class deletePollOption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Unique identifier of the option. Use pollOptionProperties.can_be_deleted to check whether the option can be deleted by the user.
  string option_id_;
  static jfieldID option_id_fieldID;

  /**
   * Default constructor for a function, which deletes an option from a poll.
   *
   * Returns object_ptr<Ok>.
   */
  deletePollOption();

  /**
   * Creates a function, which deletes an option from a poll.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the poll belongs.
   * \param[in] message_id_ Identifier of the message containing the poll.
   * \param[in] option_id_ Unique identifier of the option. Use pollOptionProperties.can_be_deleted to check whether the option can be deleted by the user.
   */
  deletePollOption(int53 chat_id_, int53 message_id_, string const &option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1459634839;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deletePollOption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a profile photo.
 *
 * Returns object_ptr<Ok>.
 */
class deleteProfilePhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the profile photo to delete.
  int64 profile_photo_id_;
  static jfieldID profile_photo_id_fieldID;

  /**
   * Default constructor for a function, which deletes a profile photo.
   *
   * Returns object_ptr<Ok>.
   */
  deleteProfilePhoto();

  /**
   * Creates a function, which deletes a profile photo.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] profile_photo_id_ Identifier of the profile photo to delete.
   */
  explicit deleteProfilePhoto(int64 profile_photo_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1319794625;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteProfilePhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a quick reply shortcut.
 *
 * Returns object_ptr<Ok>.
 */
class deleteQuickReplyShortcut final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;

  /**
   * Default constructor for a function, which deletes a quick reply shortcut.
   *
   * Returns object_ptr<Ok>.
   */
  deleteQuickReplyShortcut();

  /**
   * Creates a function, which deletes a quick reply shortcut.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shortcut_id_ Unique identifier of the quick reply shortcut.
   */
  explicit deleteQuickReplyShortcut(int32 shortcut_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -246911978;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteQuickReplyShortcut> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes specified quick reply messages.
 *
 * Returns object_ptr<Ok>.
 */
class deleteQuickReplyShortcutMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the quick reply shortcut to which the messages belong.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// Unique identifiers of the messages.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Default constructor for a function, which deletes specified quick reply messages.
   *
   * Returns object_ptr<Ok>.
   */
  deleteQuickReplyShortcutMessages();

  /**
   * Creates a function, which deletes specified quick reply messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shortcut_id_ Unique identifier of the quick reply shortcut to which the messages belong.
   * \param[in] message_ids_ Unique identifiers of the messages.
   */
  deleteQuickReplyShortcutMessages(int32 shortcut_id_, array<int53> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -40522947;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteQuickReplyShortcutMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
 *
 * Returns object_ptr<Ok>.
 */
class deleteRevokedChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link to revoke.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<Ok>.
   */
  deleteRevokedChatInviteLink();

  /**
   * Creates a function, which deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link to revoke.
   */
  deleteRevokedChatInviteLink(int53 chat_id_, string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1859711873;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteRevokedChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes saved credentials for all payment provider bots.
 *
 * Returns object_ptr<Ok>.
 */
class deleteSavedCredentials final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which deletes saved credentials for all payment provider bots.
   *
   * Returns object_ptr<Ok>.
   */
  deleteSavedCredentials();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 826300114;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteSavedCredentials> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages in a Saved Messages topic.
 *
 * Returns object_ptr<Ok>.
 */
class deleteSavedMessagesTopicHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic which messages will be deleted.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;

  /**
   * Default constructor for a function, which deletes all messages in a Saved Messages topic.
   *
   * Returns object_ptr<Ok>.
   */
  deleteSavedMessagesTopicHistory();

  /**
   * Creates a function, which deletes all messages in a Saved Messages topic.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic which messages will be deleted.
   */
  explicit deleteSavedMessagesTopicHistory(int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1776237930;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteSavedMessagesTopicHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes all messages between the specified dates in a Saved Messages topic. Messages sent in the last 30 seconds will not be deleted.
 *
 * Returns object_ptr<Ok>.
 */
class deleteSavedMessagesTopicMessagesByDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic which messages will be deleted.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;
  /// The minimum date of the messages to delete.
  int32 min_date_;
  static jfieldID min_date_fieldID;
  /// The maximum date of the messages to delete.
  int32 max_date_;
  static jfieldID max_date_fieldID;

  /**
   * Default constructor for a function, which deletes all messages between the specified dates in a Saved Messages topic. Messages sent in the last 30 seconds will not be deleted.
   *
   * Returns object_ptr<Ok>.
   */
  deleteSavedMessagesTopicMessagesByDate();

  /**
   * Creates a function, which deletes all messages between the specified dates in a Saved Messages topic. Messages sent in the last 30 seconds will not be deleted.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic which messages will be deleted.
   * \param[in] min_date_ The minimum date of the messages to delete.
   * \param[in] max_date_ The maximum date of the messages to delete.
   */
  deleteSavedMessagesTopicMessagesByDate(int53 saved_messages_topic_id_, int32 min_date_, int32 max_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1444389;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteSavedMessagesTopicMessagesByDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes saved order information.
 *
 * Returns object_ptr<Ok>.
 */
class deleteSavedOrderInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which deletes saved order information.
   *
   * Returns object_ptr<Ok>.
   */
  deleteSavedOrderInfo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1629058164;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteSavedOrderInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Completely deletes a sticker set.
 *
 * Returns object_ptr<Ok>.
 */
class deleteStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which completely deletes a sticker set.
   *
   * Returns object_ptr<Ok>.
   */
  deleteStickerSet();

  /**
   * Creates a function, which completely deletes a sticker set.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ Sticker set name. The sticker set must be owned by the current user.
   */
  explicit deleteStickerSet(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1577745325;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a previously posted story. Can be called only if story.can_be_deleted == true.
 *
 * Returns object_ptr<Ok>.
 */
class deleteStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Identifier of the story to delete.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Default constructor for a function, which deletes a previously posted story. Can be called only if story.can_be_deleted == true.
   *
   * Returns object_ptr<Ok>.
   */
  deleteStory();

  /**
   * Creates a function, which deletes a previously posted story. Can be called only if story.can_be_deleted == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Identifier of the story to delete.
   */
  deleteStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2020144472;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat.
 *
 * Returns object_ptr<Ok>.
 */
class deleteStoryAlbum final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that owns the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story album.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;

  /**
   * Default constructor for a function, which deletes a story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   */
  deleteStoryAlbum();

  /**
   * Creates a function, which deletes a story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat that owns the stories.
   * \param[in] story_album_id_ Identifier of the story album.
   */
  deleteStoryAlbum(int53 chat_id_, int32 story_album_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -658327628;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteStoryAlbum> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Deletes a custom text composition style that was created by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class deleteTextCompositionStyle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which deletes a custom text composition style that was created by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  deleteTextCompositionStyle();

  /**
   * Creates a function, which deletes a custom text composition style that was created by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ Name of the style.
   */
  explicit deleteTextCompositionStyle(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1239832880;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<deleteTextCompositionStyle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class destroy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  destroy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 685331274;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<destroy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
 *
 * Returns object_ptr<Ok>.
 */
class disableAllSupergroupUsernames final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * Default constructor for a function, which disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
   *
   * Returns object_ptr<Ok>.
   */
  disableAllSupergroupUsernames();

  /**
   * Creates a function, which disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   */
  explicit disableAllSupergroupUsernames(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 843511216;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<disableAllSupergroupUsernames> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Disables the currently enabled proxy. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class disableProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which disables the currently enabled proxy. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  disableProxy();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2100095102;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<disableProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Discards a call.
 *
 * Returns object_ptr<Ok>.
 */
class discardCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  int32 call_id_;
  static jfieldID call_id_fieldID;
  /// Pass true if the user was disconnected.
  bool is_disconnected_;
  static jfieldID is_disconnected_fieldID;
  /// If the call was upgraded to a group call, pass invite link to the group call.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// The call duration, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// Pass true if the call was a video call.
  bool is_video_;
  static jfieldID is_video_fieldID;
  /// Identifier of the connection used during the call.
  int64 connection_id_;
  static jfieldID connection_id_fieldID;

  /**
   * Default constructor for a function, which discards a call.
   *
   * Returns object_ptr<Ok>.
   */
  discardCall();

  /**
   * Creates a function, which discards a call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] call_id_ Call identifier.
   * \param[in] is_disconnected_ Pass true if the user was disconnected.
   * \param[in] invite_link_ If the call was upgraded to a group call, pass invite link to the group call.
   * \param[in] duration_ The call duration, in seconds.
   * \param[in] is_video_ Pass true if the call was a video call.
   * \param[in] connection_id_ Identifier of the connection used during the call.
   */
  discardCall(int32 call_id_, bool is_disconnected_, string const &invite_link_, int32 duration_, bool is_video_, int64 connection_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1545983346;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<discardCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AffiliateType;

class connectedAffiliateProgram;

/**
 * Disconnects an affiliate program from the given affiliate and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program.
 *
 * Returns object_ptr<ConnectedAffiliateProgram>.
 */
class disconnectAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The affiliate to which the affiliate program is connected.
  object_ptr<AffiliateType> affiliate_;
  static jfieldID affiliate_fieldID;
  /// The referral link of the affiliate program.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Default constructor for a function, which disconnects an affiliate program from the given affiliate and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program.
   *
   * Returns object_ptr<ConnectedAffiliateProgram>.
   */
  disconnectAffiliateProgram();

  /**
   * Creates a function, which disconnects an affiliate program from the given affiliate and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program.
   *
   * Returns object_ptr<ConnectedAffiliateProgram>.
   *
   * \param[in] affiliate_ The affiliate to which the affiliate program is connected.
   * \param[in] url_ The referral link of the affiliate program.
   */
  disconnectAffiliateProgram(object_ptr<AffiliateType> &&affiliate_, string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -105831172;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<connectedAffiliateProgram>;

  static object_ptr<disconnectAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Disconnects all websites from the current user's Telegram account.
 *
 * Returns object_ptr<Ok>.
 */
class disconnectAllWebsites final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which disconnects all websites from the current user's Telegram account.
   *
   * Returns object_ptr<Ok>.
   */
  disconnectAllWebsites();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1082985981;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<disconnectAllWebsites> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Disconnects website from the current user's Telegram account.
 *
 * Returns object_ptr<Ok>.
 */
class disconnectWebsite final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Website identifier.
  int64 website_id_;
  static jfieldID website_id_fieldID;

  /**
   * Default constructor for a function, which disconnects website from the current user's Telegram account.
   *
   * Returns object_ptr<Ok>.
   */
  disconnectWebsite();

  /**
   * Creates a function, which disconnects website from the current user's Telegram account.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] website_id_ Website identifier.
   */
  explicit disconnectWebsite(int64 website_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -778767395;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<disconnectWebsite> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.
 *
 * Returns object_ptr<File>.
 */
class downloadFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file to download.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.
  int32 priority_;
  static jfieldID priority_fieldID;
  /// The starting position from which the file needs to be downloaded.
  int53 offset_;
  static jfieldID offset_fieldID;
  /// Number of bytes which need to be downloaded starting from the &quot;offset&quot; position before the download will automatically be canceled; use 0 to download without a limit.
  int53 limit_;
  static jfieldID limit_fieldID;
  /// Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started.
  bool synchronous_;
  static jfieldID synchronous_fieldID;

  /**
   * Default constructor for a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.
   *
   * Returns object_ptr<File>.
   */
  downloadFile();

  /**
   * Creates a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] file_id_ Identifier of the file to download.
   * \param[in] priority_ Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.
   * \param[in] offset_ The starting position from which the file needs to be downloaded.
   * \param[in] limit_ Number of bytes which need to be downloaded starting from the &quot;offset&quot; position before the download will automatically be canceled; use 0 to download without a limit.
   * \param[in] synchronous_ Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started.
   */
  downloadFile(int32 file_id_, int32 priority_, int53 offset_, int53 limit_, bool synchronous_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1059402292;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<downloadFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Drops original details for an upgraded gift.
 *
 * Returns object_ptr<Ok>.
 */
class dropGiftOriginalDetails final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// The Telegram Star amount required to pay for the operation.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which drops original details for an upgraded gift.
   *
   * Returns object_ptr<Ok>.
   */
  dropGiftOriginalDetails();

  /**
   * Creates a function, which drops original details for an upgraded gift.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] received_gift_id_ Identifier of the gift.
   * \param[in] star_count_ The Telegram Star amount required to pay for the operation.
   */
  dropGiftOriginalDetails(string const &received_gift_id_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1394445843;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<dropGiftOriginalDetails> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputStoryContent;

class botMediaPreview;

/**
 * Replaces media preview in the list of media previews of a bot. Returns the new preview after edit is completed server-side.
 *
 * Returns object_ptr<BotMediaPreview>.
 */
class editBotMediaPreview final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Language code of the media preview to edit.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// File identifier of the media to replace.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Content of the new preview.
  object_ptr<InputStoryContent> content_;
  static jfieldID content_fieldID;

  /**
   * Default constructor for a function, which replaces media preview in the list of media previews of a bot. Returns the new preview after edit is completed server-side.
   *
   * Returns object_ptr<BotMediaPreview>.
   */
  editBotMediaPreview();

  /**
   * Creates a function, which replaces media preview in the list of media previews of a bot. Returns the new preview after edit is completed server-side.
   *
   * Returns object_ptr<BotMediaPreview>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. The bot must be owned and must have the main Web App.
   * \param[in] language_code_ Language code of the media preview to edit.
   * \param[in] file_id_ File identifier of the media to replace.
   * \param[in] content_ Content of the new preview.
   */
  editBotMediaPreview(int53 bot_user_id_, string const &language_code_, int32 file_id_, object_ptr<InputStoryContent> &&content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2037031582;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botMediaPreview>;

  static object_ptr<editBotMediaPreview> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessChatLink;

class inputBusinessChatLink;

/**
 * Edits a business chat link of the current account. Requires Telegram Business subscription. Returns the edited link.
 *
 * Returns object_ptr<BusinessChatLink>.
 */
class editBusinessChatLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link to edit.
  string link_;
  static jfieldID link_fieldID;
  /// New description of the link.
  object_ptr<inputBusinessChatLink> link_info_;
  static jfieldID link_info_fieldID;

  /**
   * Default constructor for a function, which edits a business chat link of the current account. Requires Telegram Business subscription. Returns the edited link.
   *
   * Returns object_ptr<BusinessChatLink>.
   */
  editBusinessChatLink();

  /**
   * Creates a function, which edits a business chat link of the current account. Requires Telegram Business subscription. Returns the edited link.
   *
   * Returns object_ptr<BusinessChatLink>.
   *
   * \param[in] link_ The link to edit.
   * \param[in] link_info_ New description of the link.
   */
  editBusinessChatLink(string const &link_, object_ptr<inputBusinessChatLink> &&link_info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1594947110;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessChatLink>;

  static object_ptr<editBusinessChatLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class businessMessage;

class formattedText;

/**
 * Edits the caption of a message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class editBusinessMessageCaption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New message content caption; pass null to remove caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;

  /**
   * Default constructor for a function, which edits the caption of a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  editBusinessMessageCaption();

  /**
   * Creates a function, which edits the caption of a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] caption_ New message content caption; pass null to remove caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] show_caption_above_media_ Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages.
   */
  editBusinessMessageCaption(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1071562045;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<editBusinessMessageCaption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class businessMessage;

class inputChecklist;

/**
 * Edits the content of a checklist in a message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class editBusinessMessageChecklist final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The new checklist. If some tasks were completed, this information will be kept.
  object_ptr<inputChecklist> checklist_;
  static jfieldID checklist_fieldID;

  /**
   * Default constructor for a function, which edits the content of a checklist in a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  editBusinessMessageChecklist();

  /**
   * Creates a function, which edits the content of a checklist in a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] checklist_ The new checklist. If some tasks were completed, this information will be kept.
   */
  editBusinessMessageChecklist(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<inputChecklist> &&checklist_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -445013904;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<editBusinessMessageChecklist> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class businessMessage;

class location;

/**
 * Edits the content of a live location in a message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class editBusinessMessageLiveLocation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New location content of the message; pass null to stop sharing the live location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// New time relative to the message send date, for which the location can be updated, in seconds. If 0x7FFFFFFF specified, then the location can be updated forever. Otherwise, must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days. Pass 0 to keep the current live_period.
  int32 live_period_;
  static jfieldID live_period_fieldID;
  /// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  static jfieldID heading_fieldID;
  /// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
  int32 proximity_alert_radius_;
  static jfieldID proximity_alert_radius_fieldID;

  /**
   * Default constructor for a function, which edits the content of a live location in a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  editBusinessMessageLiveLocation();

  /**
   * Creates a function, which edits the content of a live location in a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] location_ New location content of the message; pass null to stop sharing the live location.
   * \param[in] live_period_ New time relative to the message send date, for which the location can be updated, in seconds. If 0x7FFFFFFF specified, then the location can be updated forever. Otherwise, must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days. Pass 0 to keep the current live_period.
   * \param[in] heading_ The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
   * \param[in] proximity_alert_radius_ The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
   */
  editBusinessMessageLiveLocation(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<location> &&location_, int32 live_period_, int32 heading_, int32 proximity_alert_radius_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 494972447;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<editBusinessMessageLiveLocation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class businessMessage;

/**
 * Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class editBusinessMessageMedia final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  editBusinessMessageMedia();

  /**
   * Creates a function, which edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] input_message_content_ New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
   */
  editBusinessMessageMedia(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -60733576;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<editBusinessMessageMedia> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class businessMessage;

/**
 * Edits the reply markup of a message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class editBusinessMessageReplyMarkup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Default constructor for a function, which edits the reply markup of a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  editBusinessMessageReplyMarkup();

  /**
   * Creates a function, which edits the reply markup of a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   */
  editBusinessMessageReplyMarkup(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 701787159;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<editBusinessMessageReplyMarkup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class businessMessage;

/**
 * Edits the text of a text or game message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class editBusinessMessageText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New text content of the message. Must be of type inputMessageText.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which edits the text of a text or game message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  editBusinessMessageText();

  /**
   * Creates a function, which edits the text of a text or game message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] input_message_content_ New text content of the message. Must be of type inputMessageText.
   */
  editBusinessMessageText(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1149169252;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<editBusinessMessageText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputStoryContent;

class StoryPrivacySettings;

class formattedText;

class inputStoryAreas;

class story;

/**
 * Changes a story posted by the bot on behalf of a business account; for bots only.
 *
 * Returns object_ptr<Story>.
 */
class editBusinessStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Identifier of the story to edit.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// New content of the story.
  object_ptr<InputStoryContent> content_;
  static jfieldID content_fieldID;
  /// New clickable rectangle areas to be shown on the story media.
  object_ptr<inputStoryAreas> areas_;
  static jfieldID areas_fieldID;
  /// New story caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// The new privacy settings for the story.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  static jfieldID privacy_settings_fieldID;

  /**
   * Default constructor for a function, which changes a story posted by the bot on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Story>.
   */
  editBusinessStory();

  /**
   * Creates a function, which changes a story posted by the bot on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Story>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Identifier of the story to edit.
   * \param[in] content_ New content of the story.
   * \param[in] areas_ New clickable rectangle areas to be shown on the story media.
   * \param[in] caption_ New story caption.
   * \param[in] privacy_settings_ The new privacy settings for the story.
   */
  editBusinessStory(int53 story_poster_chat_id_, int32 story_id_, object_ptr<InputStoryContent> &&content_, object_ptr<inputStoryAreas> &&areas_, object_ptr<formattedText> &&caption_, object_ptr<StoryPrivacySettings> &&privacy_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 472538940;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<story>;

  static object_ptr<editBusinessStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolder;

class chatFolderInfo;

/**
 * Edits existing chat folder. Returns information about the edited chat folder.
 *
 * Returns object_ptr<ChatFolderInfo>.
 */
class editChatFolder final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;
  /// The edited chat folder.
  object_ptr<chatFolder> folder_;
  static jfieldID folder_fieldID;

  /**
   * Default constructor for a function, which edits existing chat folder. Returns information about the edited chat folder.
   *
   * Returns object_ptr<ChatFolderInfo>.
   */
  editChatFolder();

  /**
   * Creates a function, which edits existing chat folder. Returns information about the edited chat folder.
   *
   * Returns object_ptr<ChatFolderInfo>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   * \param[in] folder_ The edited chat folder.
   */
  editChatFolder(int32 chat_folder_id_, object_ptr<chatFolder> &&folder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 53672754;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderInfo>;

  static object_ptr<editChatFolder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderInviteLink;

/**
 * Edits an invite link for a chat folder.
 *
 * Returns object_ptr<ChatFolderInviteLink>.
 */
class editChatFolderInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;
  /// Invite link to be edited.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// New name of the link; 0-32 characters.
  string name_;
  static jfieldID name_fieldID;
  /// New identifiers of chats to be accessible by the invite link. Use getChatsForChatFolderInviteLink to get suitable chats. Basic groups will be automatically converted to supergroups before link editing.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * Default constructor for a function, which edits an invite link for a chat folder.
   *
   * Returns object_ptr<ChatFolderInviteLink>.
   */
  editChatFolderInviteLink();

  /**
   * Creates a function, which edits an invite link for a chat folder.
   *
   * Returns object_ptr<ChatFolderInviteLink>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   * \param[in] invite_link_ Invite link to be edited.
   * \param[in] name_ New name of the link; 0-32 characters.
   * \param[in] chat_ids_ New identifiers of chats to be accessible by the invite link. Use getChatsForChatFolderInviteLink to get suitable chats. Basic groups will be automatically converted to supergroups before link editing.
   */
  editChatFolderInviteLink(int32 chat_folder_id_, string const &invite_link_, string const &name_, array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2141872095;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderInviteLink>;

  static object_ptr<editChatFolderInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

/**
 * Edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. If the link creates a subscription, then expiration_date, member_limit and creates_join_request must not be used. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
 *
 * Returns object_ptr<ChatInviteLink>.
 */
class editChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link to be edited.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Invite link name; 0-32 characters.
  string name_;
  static jfieldID name_fieldID;
  /// Point in time (Unix timestamp) when the link will expire; pass 0 if never.
  int32 expiration_date_;
  static jfieldID expiration_date_fieldID;
  /// The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.
  int32 member_limit_;
  static jfieldID member_limit_fieldID;
  /// Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, member_limit must be 0.
  bool creates_join_request_;
  static jfieldID creates_join_request_fieldID;

  /**
   * Default constructor for a function, which edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. If the link creates a subscription, then expiration_date, member_limit and creates_join_request must not be used. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<ChatInviteLink>.
   */
  editChatInviteLink();

  /**
   * Creates a function, which edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. If the link creates a subscription, then expiration_date, member_limit and creates_join_request must not be used. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<ChatInviteLink>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link to be edited.
   * \param[in] name_ Invite link name; 0-32 characters.
   * \param[in] expiration_date_ Point in time (Unix timestamp) when the link will expire; pass 0 if never.
   * \param[in] member_limit_ The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited.
   * \param[in] creates_join_request_ Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, member_limit must be 0.
   */
  editChatInviteLink(int53 chat_id_, string const &invite_link_, string const &name_, int32 expiration_date_, int32 member_limit_, bool creates_join_request_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1320303996;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLink>;

  static object_ptr<editChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

/**
 * Edits a subscription invite link for a channel chat. Requires can_invite_users right in the chat for own links and owner privileges for other links.
 *
 * Returns object_ptr<ChatInviteLink>.
 */
class editChatSubscriptionInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link to be edited.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Invite link name; 0-32 characters.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which edits a subscription invite link for a channel chat. Requires can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<ChatInviteLink>.
   */
  editChatSubscriptionInviteLink();

  /**
   * Creates a function, which edits a subscription invite link for a channel chat. Requires can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<ChatInviteLink>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link to be edited.
   * \param[in] name_ Invite link name; 0-32 characters.
   */
  editChatSubscriptionInviteLink(int53 chat_id_, string const &invite_link_, string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -951826989;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLink>;

  static object_ptr<editChatSubscriptionInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class languagePackInfo;

class ok;

/**
 * Edits information about a custom local language pack in the current localization target. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class editCustomLanguagePackInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New information about the custom local language pack.
  object_ptr<languagePackInfo> info_;
  static jfieldID info_fieldID;

  /**
   * Default constructor for a function, which edits information about a custom local language pack in the current localization target. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  editCustomLanguagePackInfo();

  /**
   * Creates a function, which edits information about a custom local language pack in the current localization target. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] info_ New information about the custom local language pack.
   */
  explicit editCustomLanguagePackInfo(object_ptr<languagePackInfo> &&info_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1320751257;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editCustomLanguagePackInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Edits title and icon of a topic in a forum supergroup chat or a chat with a bot with topics; for supergroup chats requires can_manage_topics administrator right unless the user is creator of the topic.
 *
 * Returns object_ptr<Ok>.
 */
class editForumTopic final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// New name of the topic; 0-128 characters. If empty, the previous topic name is kept.
  string name_;
  static jfieldID name_fieldID;
  /// Pass true to edit the icon of the topic. Icon of the General topic can't be edited.
  bool edit_icon_custom_emoji_;
  static jfieldID edit_icon_custom_emoji_fieldID;
  /// Identifier of the new custom emoji for topic icon; pass 0 to remove the custom emoji. Ignored if edit_icon_custom_emoji is false. Telegram Premium users can use any custom emoji, other users can use only a custom emoji returned by getForumTopicDefaultIcons.
  int64 icon_custom_emoji_id_;
  static jfieldID icon_custom_emoji_id_fieldID;

  /**
   * Default constructor for a function, which edits title and icon of a topic in a forum supergroup chat or a chat with a bot with topics; for supergroup chats requires can_manage_topics administrator right unless the user is creator of the topic.
   *
   * Returns object_ptr<Ok>.
   */
  editForumTopic();

  /**
   * Creates a function, which edits title and icon of a topic in a forum supergroup chat or a chat with a bot with topics; for supergroup chats requires can_manage_topics administrator right unless the user is creator of the topic.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] forum_topic_id_ Forum topic identifier.
   * \param[in] name_ New name of the topic; 0-128 characters. If empty, the previous topic name is kept.
   * \param[in] edit_icon_custom_emoji_ Pass true to edit the icon of the topic. Icon of the General topic can't be edited.
   * \param[in] icon_custom_emoji_id_ Identifier of the new custom emoji for topic icon; pass 0 to remove the custom emoji. Ignored if edit_icon_custom_emoji is false. Telegram Premium users can use any custom emoji, other users can use only a custom emoji returned by getForumTopicDefaultIcons.
   */
  editForumTopic(int53 chat_id_, int32 forum_topic_id_, string const &name_, bool edit_icon_custom_emoji_, int64 icon_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1112389547;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editForumTopic> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class formattedText;

class ok;

/**
 * Edits the caption of an inline message sent via a bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class editInlineMessageCaption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New message content caption; pass null to remove caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;

  /**
   * Default constructor for a function, which edits the caption of an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  editInlineMessageCaption();

  /**
   * Creates a function, which edits the caption of an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] caption_ New message content caption; pass null to remove caption; 0-getOption(&quot;message_caption_length_max&quot;) characters.
   * \param[in] show_caption_above_media_ Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages.
   */
  editInlineMessageCaption(string const &inline_message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1409762552;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editInlineMessageCaption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class location;

class ok;

/**
 * Edits the content of a live location in an inline message sent via a bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class editInlineMessageLiveLocation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New location content of the message; pass null to stop sharing the live location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// New time relative to the message send date, for which the location can be updated, in seconds. If 0x7FFFFFFF specified, then the location can be updated forever. Otherwise, must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days. Pass 0 to keep the current live_period.
  int32 live_period_;
  static jfieldID live_period_fieldID;
  /// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  static jfieldID heading_fieldID;
  /// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
  int32 proximity_alert_radius_;
  static jfieldID proximity_alert_radius_fieldID;

  /**
   * Default constructor for a function, which edits the content of a live location in an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  editInlineMessageLiveLocation();

  /**
   * Creates a function, which edits the content of a live location in an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] location_ New location content of the message; pass null to stop sharing the live location.
   * \param[in] live_period_ New time relative to the message send date, for which the location can be updated, in seconds. If 0x7FFFFFFF specified, then the location can be updated forever. Otherwise, must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days. Pass 0 to keep the current live_period.
   * \param[in] heading_ The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
   * \param[in] proximity_alert_radius_ The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
   */
  editInlineMessageLiveLocation(string const &inline_message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<location> &&location_, int32 live_period_, int32 heading_, int32 proximity_alert_radius_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2134352044;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editInlineMessageLiveLocation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class ok;

/**
 * Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class editInlineMessageMedia final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  editInlineMessageMedia();

  /**
   * Creates a function, which edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] input_message_content_ New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
   */
  editInlineMessageMedia(string const &inline_message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 23553921;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editInlineMessageMedia> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class ok;

/**
 * Edits the reply markup of an inline message sent via a bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class editInlineMessageReplyMarkup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Default constructor for a function, which edits the reply markup of an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  editInlineMessageReplyMarkup();

  /**
   * Creates a function, which edits the reply markup of an inline message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   */
  editInlineMessageReplyMarkup(string const &inline_message_id_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -67565858;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editInlineMessageReplyMarkup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class ok;

/**
 * Edits the text of an inline text or game message sent via a bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class editInlineMessageText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New text content of the message. Must be of type inputMessageText.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which edits the text of an inline text or game message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  editInlineMessageText();

  /**
   * Creates a function, which edits the text of an inline text or game message sent via a bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   * \param[in] input_message_content_ New text content of the message. Must be of type inputMessageText.
   */
  editInlineMessageText(string const &inline_message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -855457307;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editInlineMessageText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class formattedText;

class message;

/**
 * Edits the message content caption. Returns the edited message after the edit is completed on the server side.
 *
 * Returns object_ptr<Message>.
 */
class editMessageCaption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New message content caption; 0-getOption(&quot;message_caption_length_max&quot;) characters; pass null to remove caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages.
  bool show_caption_above_media_;
  static jfieldID show_caption_above_media_fieldID;

  /**
   * Default constructor for a function, which edits the message content caption. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   */
  editMessageCaption();

  /**
   * Creates a function, which edits the message content caption. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] caption_ New message content caption; 0-getOption(&quot;message_caption_length_max&quot;) characters; pass null to remove caption.
   * \param[in] show_caption_above_media_ Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages.
   */
  editMessageCaption(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<formattedText> &&caption_, bool show_caption_above_media_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2020117951;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<editMessageCaption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class inputChecklist;

class message;

/**
 * Edits the message content of a checklist. Returns the edited message after the edit is completed on the server side.
 *
 * Returns object_ptr<Message>.
 */
class editMessageChecklist final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The new checklist. If some tasks were completed, this information will be kept.
  object_ptr<inputChecklist> checklist_;
  static jfieldID checklist_fieldID;

  /**
   * Default constructor for a function, which edits the message content of a checklist. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   */
  editMessageChecklist();

  /**
   * Creates a function, which edits the message content of a checklist. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] checklist_ The new checklist. If some tasks were completed, this information will be kept.
   */
  editMessageChecklist(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<inputChecklist> &&checklist_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1497856700;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<editMessageChecklist> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class location;

class message;

/**
 * Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side.
 *
 * Returns object_ptr<Message>.
 */
class editMessageLiveLocation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New location content of the message; pass null to stop sharing the live location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// New time relative to the message send date, for which the location can be updated, in seconds. If 0x7FFFFFFF specified, then the location can be updated forever. Otherwise, must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days. Pass 0 to keep the current live_period.
  int32 live_period_;
  static jfieldID live_period_fieldID;
  /// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
  int32 heading_;
  static jfieldID heading_fieldID;
  /// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
  int32 proximity_alert_radius_;
  static jfieldID proximity_alert_radius_fieldID;

  /**
   * Default constructor for a function, which edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   */
  editMessageLiveLocation();

  /**
   * Creates a function, which edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] location_ New location content of the message; pass null to stop sharing the live location.
   * \param[in] live_period_ New time relative to the message send date, for which the location can be updated, in seconds. If 0x7FFFFFFF specified, then the location can be updated forever. Otherwise, must not exceed the current live_period by more than a day, and the live location expiration date must remain in the next 90 days. Pass 0 to keep the current live_period.
   * \param[in] heading_ The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown.
   * \param[in] proximity_alert_radius_ The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled.
   */
  editMessageLiveLocation(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<location> &&location_, int32 live_period_, int32 heading_, int32 proximity_alert_radius_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1890511980;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<editMessageLiveLocation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class message;

/**
 * Edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side.
 *
 * Returns object_ptr<Message>.
 */
class editMessageMedia final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   */
  editMessageMedia();

  /**
   * Creates a function, which edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] input_message_content_ New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo.
   */
  editMessageMedia(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1152678125;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<editMessageMedia> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class message;

/**
 * Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side.
 *
 * Returns object_ptr<Message>.
 */
class editMessageReplyMarkup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Default constructor for a function, which edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   */
  editMessageReplyMarkup();

  /**
   * Creates a function, which edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   */
  editMessageReplyMarkup(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 332127881;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<editMessageReplyMarkup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSchedulingState;

class ok;

/**
 * Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed.
 *
 * Returns object_ptr<Ok>.
 */
class editMessageSchedulingState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message scheduling state; pass null to send the message immediately. Must be null for messages in the state messageSchedulingStateSendWhenVideoProcessed.
  object_ptr<MessageSchedulingState> scheduling_state_;
  static jfieldID scheduling_state_fieldID;

  /**
   * Default constructor for a function, which edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed.
   *
   * Returns object_ptr<Ok>.
   */
  editMessageSchedulingState();

  /**
   * Creates a function, which edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable.
   * \param[in] scheduling_state_ The new message scheduling state; pass null to send the message immediately. Must be null for messages in the state messageSchedulingStateSendWhenVideoProcessed.
   */
  editMessageSchedulingState(int53 chat_id_, int53 message_id_, object_ptr<MessageSchedulingState> &&scheduling_state_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1372976192;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editMessageSchedulingState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ReplyMarkup;

class message;

/**
 * Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side.
 *
 * Returns object_ptr<Message>.
 */
class editMessageText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// New text content of the message. Must be of type inputMessageText.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   */
  editMessageText();

  /**
   * Creates a function, which edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   * \param[in] input_message_content_ New text content of the message. Must be of type inputMessageText.
   */
  editMessageText(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 196272567;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<editMessageText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class addedProxy;

class proxy;

/**
 * Edits an existing proxy server for network requests. Can be called before authorization.
 *
 * Returns object_ptr<AddedProxy>.
 */
class editProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Proxy identifier.
  int32 proxy_id_;
  static jfieldID proxy_id_fieldID;
  /// The new information about the proxy.
  object_ptr<proxy> proxy_;
  static jfieldID proxy_fieldID;
  /// Pass true to immediately enable the proxy.
  bool enable_;
  static jfieldID enable_fieldID;
  /// New comment for the proxy.
  string comment_;
  static jfieldID comment_fieldID;

  /**
   * Default constructor for a function, which edits an existing proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<AddedProxy>.
   */
  editProxy();

  /**
   * Creates a function, which edits an existing proxy server for network requests. Can be called before authorization.
   *
   * Returns object_ptr<AddedProxy>.
   *
   * \param[in] proxy_id_ Proxy identifier.
   * \param[in] proxy_ The new information about the proxy.
   * \param[in] enable_ Pass true to immediately enable the proxy.
   * \param[in] comment_ New comment for the proxy.
   */
  editProxy(int32 proxy_id_, object_ptr<proxy> &&proxy_, bool enable_, string const &comment_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 349913011;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<addedProxy>;

  static object_ptr<editProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class ok;

/**
 * Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa.
 *
 * Returns object_ptr<Ok>.
 */
class editQuickReplyMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the quick reply shortcut with the message.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageText, or inputMessageVideo.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa.
   *
   * Returns object_ptr<Ok>.
   */
  editQuickReplyMessage();

  /**
   * Creates a function, which asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shortcut_id_ Unique identifier of the quick reply shortcut with the message.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] input_message_content_ New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageText, or inputMessageVideo.
   */
  editQuickReplyMessage(int32 shortcut_id_, int53 message_id_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 80517006;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editQuickReplyMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Cancels or re-enables Telegram Star subscription.
 *
 * Returns object_ptr<Ok>.
 */
class editStarSubscription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the subscription to change.
  string subscription_id_;
  static jfieldID subscription_id_fieldID;
  /// New value of is_canceled.
  bool is_canceled_;
  static jfieldID is_canceled_fieldID;

  /**
   * Default constructor for a function, which cancels or re-enables Telegram Star subscription.
   *
   * Returns object_ptr<Ok>.
   */
  editStarSubscription();

  /**
   * Creates a function, which cancels or re-enables Telegram Star subscription.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] subscription_id_ Identifier of the subscription to change.
   * \param[in] is_canceled_ New value of is_canceled.
   */
  editStarSubscription(string const &subscription_id_, bool is_canceled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2048538904;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editStarSubscription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputStoryContent;

class formattedText;

class inputStoryAreas;

class ok;

/**
 * Changes content and caption of a story. Can be called only if story.can_be_edited == true.
 *
 * Returns object_ptr<Ok>.
 */
class editStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Identifier of the story to edit.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// New content of the story; pass null to keep the current content.
  object_ptr<InputStoryContent> content_;
  static jfieldID content_fieldID;
  /// New clickable rectangle areas to be shown on the story media; pass null to keep the current areas. Areas can't be edited if story content isn't changed.
  object_ptr<inputStoryAreas> areas_;
  static jfieldID areas_fieldID;
  /// New story caption; pass null to keep the current caption.
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;

  /**
   * Default constructor for a function, which changes content and caption of a story. Can be called only if story.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   */
  editStory();

  /**
   * Creates a function, which changes content and caption of a story. Can be called only if story.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Identifier of the story to edit.
   * \param[in] content_ New content of the story; pass null to keep the current content.
   * \param[in] areas_ New clickable rectangle areas to be shown on the story media; pass null to keep the current areas. Areas can't be edited if story content isn't changed.
   * \param[in] caption_ New story caption; pass null to keep the current caption.
   */
  editStory(int53 story_poster_chat_id_, int32 story_id_, object_ptr<InputStoryContent> &&content_, object_ptr<inputStoryAreas> &&areas_, object_ptr<formattedText> &&caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 355296788;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes cover of a video story. Can be called only if story.can_be_edited == true and the story isn't being edited now.
 *
 * Returns object_ptr<Ok>.
 */
class editStoryCover final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Identifier of the story to edit.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// New timestamp of the frame, which will be used as video thumbnail.
  double cover_frame_timestamp_;
  static jfieldID cover_frame_timestamp_fieldID;

  /**
   * Default constructor for a function, which changes cover of a video story. Can be called only if story.can_be_edited == true and the story isn't being edited now.
   *
   * Returns object_ptr<Ok>.
   */
  editStoryCover();

  /**
   * Creates a function, which changes cover of a video story. Can be called only if story.can_be_edited == true and the story isn't being edited now.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Identifier of the story to edit.
   * \param[in] cover_frame_timestamp_ New timestamp of the frame, which will be used as video thumbnail.
   */
  editStoryCover(int53 story_poster_chat_id_, int32 story_id_, double cover_frame_timestamp_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1035823266;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editStoryCover> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class textCompositionStyle;

/**
 * Edits a custom text composition style that was created by the current user.
 *
 * Returns object_ptr<TextCompositionStyle>.
 */
class editTextCompositionStyle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;
  /// Title of the style; 1-getOption(&quot;text_composition_style_title_length_max&quot;) characters.
  string title_;
  static jfieldID title_fieldID;
  /// Identifier of the custom emoji corresponding to the style.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;
  /// Prompt that will be used for text composition; 1-getOption(&quot;text_composition_style_prompt_length_max&quot;) characters.
  string prompt_;
  static jfieldID prompt_fieldID;
  /// Pass true if the current user must be shown as the creator of the style.
  bool show_creator_;
  static jfieldID show_creator_fieldID;

  /**
   * Default constructor for a function, which edits a custom text composition style that was created by the current user.
   *
   * Returns object_ptr<TextCompositionStyle>.
   */
  editTextCompositionStyle();

  /**
   * Creates a function, which edits a custom text composition style that was created by the current user.
   *
   * Returns object_ptr<TextCompositionStyle>.
   *
   * \param[in] name_ Name of the style.
   * \param[in] title_ Title of the style; 1-getOption(&quot;text_composition_style_title_length_max&quot;) characters.
   * \param[in] custom_emoji_id_ Identifier of the custom emoji corresponding to the style.
   * \param[in] prompt_ Prompt that will be used for text composition; 1-getOption(&quot;text_composition_style_prompt_length_max&quot;) characters.
   * \param[in] show_creator_ Pass true if the current user must be shown as the creator of the style.
   */
  editTextCompositionStyle(string const &name_, string const &title_, int64 custom_emoji_id_, string const &prompt_, bool show_creator_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1251035657;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<textCompositionStyle>;

  static object_ptr<editTextCompositionStyle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Cancels or re-enables Telegram Star subscription for a user; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class editUserStarSubscription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Telegram payment identifier of the subscription.
  string telegram_payment_charge_id_;
  static jfieldID telegram_payment_charge_id_fieldID;
  /// Pass true to cancel the subscription; pass false to allow the user to enable it.
  bool is_canceled_;
  static jfieldID is_canceled_fieldID;

  /**
   * Default constructor for a function, which cancels or re-enables Telegram Star subscription for a user; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  editUserStarSubscription();

  /**
   * Creates a function, which cancels or re-enables Telegram Star subscription for a user; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] telegram_payment_charge_id_ Telegram payment identifier of the subscription.
   * \param[in] is_canceled_ Pass true to cancel the subscription; pass false to allow the user to enable it.
   */
  editUserStarSubscription(int53 user_id_, string const &telegram_payment_charge_id_, bool is_canceled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1370582665;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<editUserStarSubscription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class enableProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Proxy identifier.
  int32 proxy_id_;
  static jfieldID proxy_id_fieldID;

  /**
   * Default constructor for a function, which enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  enableProxy();

  /**
   * Creates a function, which enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] proxy_id_ Proxy identifier.
   */
  explicit enableProxy(int32 proxy_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1494450838;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<enableProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GroupCallDataChannel;

class data;

/**
 * Encrypts group call data before sending them over network using tgcalls.
 *
 * Returns object_ptr<Data>.
 */
class encryptGroupCallData final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier. The call must not be a video chat.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Data channel for which data is encrypted.
  object_ptr<GroupCallDataChannel> data_channel_;
  static jfieldID data_channel_fieldID;
  /// Data to encrypt.
  bytes data_;
  static jfieldID data_fieldID;
  /// Size of data prefix that must be kept unencrypted.
  int32 unencrypted_prefix_size_;
  static jfieldID unencrypted_prefix_size_fieldID;

  /**
   * Default constructor for a function, which encrypts group call data before sending them over network using tgcalls.
   *
   * Returns object_ptr<Data>.
   */
  encryptGroupCallData();

  /**
   * Creates a function, which encrypts group call data before sending them over network using tgcalls.
   *
   * Returns object_ptr<Data>.
   *
   * \param[in] group_call_id_ Group call identifier. The call must not be a video chat.
   * \param[in] data_channel_ Data channel for which data is encrypted.
   * \param[in] data_ Data to encrypt.
   * \param[in] unencrypted_prefix_size_ Size of data prefix that must be kept unencrypted.
   */
  encryptGroupCallData(int32 group_call_id_, object_ptr<GroupCallDataChannel> &&data_channel_, bytes const &data_, int32 unencrypted_prefix_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -377997690;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<data>;

  static object_ptr<encryptGroupCallData> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Ends a group call. Requires groupCall.can_be_managed right for video chats and live stories or groupCall.is_owned otherwise.
 *
 * Returns object_ptr<Ok>.
 */
class endGroupCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which ends a group call. Requires groupCall.can_be_managed right for video chats and live stories or groupCall.is_owned otherwise.
   *
   * Returns object_ptr<Ok>.
   */
  endGroupCall();

  /**
   * Creates a function, which ends a group call. Requires groupCall.can_be_managed right for video chats and live stories or groupCall.is_owned otherwise.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit endGroupCall(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 573131959;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<endGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Ends recording of an active group call; for video chats only. Requires groupCall.can_be_managed right.
 *
 * Returns object_ptr<Ok>.
 */
class endGroupCallRecording final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which ends recording of an active group call; for video chats only. Requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   */
  endGroupCallRecording();

  /**
   * Creates a function, which ends recording of an active group call; for video chats only. Requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit endGroupCallRecording(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -75799927;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<endGroupCallRecording> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Ends screen sharing in a joined group call; not supported in live stories.
 *
 * Returns object_ptr<Ok>.
 */
class endGroupCallScreenSharing final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which ends screen sharing in a joined group call; not supported in live stories.
   *
   * Returns object_ptr<Ok>.
   */
  endGroupCallScreenSharing();

  /**
   * Creates a function, which ends screen sharing in a joined group call; not supported in live stories.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit endGroupCallScreenSharing(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2047599540;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<endGroupCallScreenSharing> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class error;

class ok;

/**
 * Finishes the file generation.
 *
 * Returns object_ptr<Ok>.
 */
class finishFileGeneration final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the generation process.
  int64 generation_id_;
  static jfieldID generation_id_fieldID;
  /// If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded.
  object_ptr<error> error_;
  static jfieldID error_fieldID;

  /**
   * Default constructor for a function, which finishes the file generation.
   *
   * Returns object_ptr<Ok>.
   */
  finishFileGeneration();

  /**
   * Creates a function, which finishes the file generation.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] generation_id_ The identifier of the generation process.
   * \param[in] error_ If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded.
   */
  finishFileGeneration(int64 generation_id_, object_ptr<error> &&error_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1055060835;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<finishFileGeneration> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class fixedText;

class formattedText;

/**
 * Fixes text using an AI model; must not be used in secret chats. May return an error with a message &quot;AICOMPOSE_FLOOD_PREMIUM&quot; if Telegram Premium is required to send further requests.
 *
 * Returns object_ptr<FixedText>.
 */
class fixTextWithAi final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The original text.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which fixes text using an AI model; must not be used in secret chats. May return an error with a message &quot;AICOMPOSE_FLOOD_PREMIUM&quot; if Telegram Premium is required to send further requests.
   *
   * Returns object_ptr<FixedText>.
   */
  fixTextWithAi();

  /**
   * Creates a function, which fixes text using an AI model; must not be used in secret chats. May return an error with a message &quot;AICOMPOSE_FLOOD_PREMIUM&quot; if Telegram Premium is required to send further requests.
   *
   * Returns object_ptr<FixedText>.
   *
   * \param[in] text_ The original text.
   */
  explicit fixTextWithAi(object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2139647563;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<fixedText>;

  static object_ptr<fixTextWithAi> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

class messageSendOptions;

class messages;

/**
 * Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message.
 *
 * Returns object_ptr<Messages>.
 */
class forwardMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which to forward messages.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic in which the messages will be forwarded; message threads aren't supported; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Identifier of the chat from which to forward messages.
  int53 from_chat_id_;
  static jfieldID from_chat_id_fieldID;
  /// Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.can_be_forwarded.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;
  /// Options to be used to send the messages; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  static jfieldID options_fieldID;
  /// Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable.
  bool send_copy_;
  static jfieldID send_copy_fieldID;
  /// Pass true to remove media captions of message copies. Ignored if send_copy is false.
  bool remove_caption_;
  static jfieldID remove_caption_fieldID;

  /**
   * Default constructor for a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message.
   *
   * Returns object_ptr<Messages>.
   */
  forwardMessages();

  /**
   * Creates a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Identifier of the chat to which to forward messages.
   * \param[in] topic_id_ Topic in which the messages will be forwarded; message threads aren't supported; pass null if none.
   * \param[in] from_chat_id_ Identifier of the chat from which to forward messages.
   * \param[in] message_ids_ Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.can_be_forwarded.
   * \param[in] options_ Options to be used to send the messages; pass null to use default options.
   * \param[in] send_copy_ Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable.
   * \param[in] remove_caption_ Pass true to remove media captions of message copies. Ignored if send_copy is false.
   */
  forwardMessages(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, int53 from_chat_id_, array<int53> &&message_ids_, object_ptr<messageSendOptions> &&options_, bool send_copy_, bool remove_caption_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -247889118;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<forwardMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class accountTtl;

/**
 * Returns the period of inactivity after which the account of the current user will automatically be deleted.
 *
 * Returns object_ptr<AccountTtl>.
 */
class getAccountTtl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the period of inactivity after which the account of the current user will automatically be deleted.
   *
   * Returns object_ptr<AccountTtl>.
   */
  getAccountTtl();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -443905161;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<accountTtl>;

  static object_ptr<getAccountTtl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class sessions;

/**
 * Returns all active sessions of the current user.
 *
 * Returns object_ptr<Sessions>.
 */
class getActiveSessions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns all active sessions of the current user.
   *
   * Returns object_ptr<Sessions>.
   */
  getActiveSessions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1119710526;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<sessions>;

  static object_ptr<getActiveSessions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passportElements;

/**
 * Returns all available Telegram Passport elements.
 *
 * Returns object_ptr<PassportElements>.
 */
class getAllPassportElements final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns all available Telegram Passport elements.
   *
   * Returns object_ptr<PassportElements>.
   */
  getAllPassportElements();

  /**
   * Creates a function, which returns all available Telegram Passport elements.
   *
   * Returns object_ptr<PassportElements>.
   *
   * \param[in] password_ The 2-step verification password of the current user.
   */
  explicit getAllPassportElements(string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2038945045;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passportElements>;

  static object_ptr<getAllPassportElements> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class emojis;

/**
 * Returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000, chat_id).
 *
 * Returns object_ptr<Emojis>.
 */
class getAllStickerEmojis final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the stickers to search for.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Search query.
  string query_;
  static jfieldID query_fieldID;
  /// Chat identifier for which to find stickers.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true if only main emoji for each found sticker must be included in the result.
  bool return_only_main_emoji_;
  static jfieldID return_only_main_emoji_fieldID;

  /**
   * Default constructor for a function, which returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000, chat_id).
   *
   * Returns object_ptr<Emojis>.
   */
  getAllStickerEmojis();

  /**
   * Creates a function, which returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000, chat_id).
   *
   * Returns object_ptr<Emojis>.
   *
   * \param[in] sticker_type_ Type of the stickers to search for.
   * \param[in] query_ Search query.
   * \param[in] chat_id_ Chat identifier for which to find stickers.
   * \param[in] return_only_main_emoji_ Pass true if only main emoji for each found sticker must be included in the result.
   */
  getAllStickerEmojis(object_ptr<StickerType> &&sticker_type_, string const &query_, int53 chat_id_, bool return_only_main_emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 296562224;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojis>;

  static object_ptr<getAllStickerEmojis> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class animatedEmoji;

/**
 * Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji.
 *
 * Returns object_ptr<AnimatedEmoji>.
 */
class getAnimatedEmoji final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The emoji.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * Default constructor for a function, which returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji.
   *
   * Returns object_ptr<AnimatedEmoji>.
   */
  getAnimatedEmoji();

  /**
   * Creates a function, which returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji.
   *
   * Returns object_ptr<AnimatedEmoji>.
   *
   * \param[in] emoji_ The emoji.
   */
  explicit getAnimatedEmoji(string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1065635702;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<animatedEmoji>;

  static object_ptr<getAnimatedEmoji> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class JsonValue;

/**
 * Returns application config, provided by the server. Can be called before authorization.
 *
 * Returns object_ptr<JsonValue>.
 */
class getApplicationConfig final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns application config, provided by the server. Can be called before authorization.
   *
   * Returns object_ptr<JsonValue>.
   */
  getApplicationConfig();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1823144318;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<JsonValue>;

  static object_ptr<getApplicationConfig> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getApplicationDownloadLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getApplicationDownloadLink();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 112013252;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getApplicationDownloadLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class archiveChatListSettings;

/**
 * Returns settings for automatic moving of chats to and from the Archive chat lists.
 *
 * Returns object_ptr<ArchiveChatListSettings>.
 */
class getArchiveChatListSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns settings for automatic moving of chats to and from the Archive chat lists.
   *
   * Returns object_ptr<ArchiveChatListSettings>.
   */
  getArchiveChatListSettings();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2087874976;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<archiveChatListSettings>;

  static object_ptr<getArchiveChatListSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class stickerSets;

/**
 * Returns a list of archived sticker sets.
 *
 * Returns object_ptr<StickerSets>.
 */
class getArchivedStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Identifier of the sticker set from which to return the result; use 0 to get results from the beginning.
  int64 offset_sticker_set_id_;
  static jfieldID offset_sticker_set_id_fieldID;
  /// The maximum number of sticker sets to return; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns a list of archived sticker sets.
   *
   * Returns object_ptr<StickerSets>.
   */
  getArchivedStickerSets();

  /**
   * Creates a function, which returns a list of archived sticker sets.
   *
   * Returns object_ptr<StickerSets>.
   *
   * \param[in] sticker_type_ Type of the sticker sets to return.
   * \param[in] offset_sticker_set_id_ Identifier of the sticker set from which to return the result; use 0 to get results from the beginning.
   * \param[in] limit_ The maximum number of sticker sets to return; up to 100.
   */
  getArchivedStickerSets(object_ptr<StickerType> &&sticker_type_, int64 offset_sticker_set_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1001931341;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSets>;

  static object_ptr<getArchivedStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickerSets;

/**
 * Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets.
 *
 * Returns object_ptr<StickerSets>.
 */
class getAttachedStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File identifier.
  int32 file_id_;
  static jfieldID file_id_fieldID;

  /**
   * Default constructor for a function, which returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets.
   *
   * Returns object_ptr<StickerSets>.
   */
  getAttachedStickerSets();

  /**
   * Creates a function, which returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets.
   *
   * Returns object_ptr<StickerSets>.
   *
   * \param[in] file_id_ File identifier.
   */
  explicit getAttachedStickerSets(int32 file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1302172429;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSets>;

  static object_ptr<getAttachedStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class attachmentMenuBot;

/**
 * Returns information about a bot that can be added to attachment or side menu.
 *
 * Returns object_ptr<AttachmentMenuBot>.
 */
class getAttachmentMenuBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Bot's user identifier.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a bot that can be added to attachment or side menu.
   *
   * Returns object_ptr<AttachmentMenuBot>.
   */
  getAttachmentMenuBot();

  /**
   * Creates a function, which returns information about a bot that can be added to attachment or side menu.
   *
   * Returns object_ptr<AttachmentMenuBot>.
   *
   * \param[in] bot_user_id_ Bot's user identifier.
   */
  explicit getAttachmentMenuBot(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1034248699;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<attachmentMenuBot>;

  static object_ptr<getAttachmentMenuBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns parameters for authentication using a passkey as JSON-serialized string.
 *
 * Returns object_ptr<Text>.
 */
class getAuthenticationPasskeyParameters final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns parameters for authentication using a passkey as JSON-serialized string.
   *
   * Returns object_ptr<Text>.
   */
  getAuthenticationPasskeyParameters();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -686037865;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getAuthenticationPasskeyParameters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AuthorizationState;

/**
 * Returns the current authorization state. This is an offline method. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization.
 *
 * Returns object_ptr<AuthorizationState>.
 */
class getAuthorizationState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the current authorization state. This is an offline method. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization.
   *
   * Returns object_ptr<AuthorizationState>.
   */
  getAuthorizationState();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1949154877;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<AuthorizationState>;

  static object_ptr<getAuthorizationState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class autoDownloadSettingsPresets;

/**
 * Returns auto-download settings presets for the current user.
 *
 * Returns object_ptr<AutoDownloadSettingsPresets>.
 */
class getAutoDownloadSettingsPresets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns auto-download settings presets for the current user.
   *
   * Returns object_ptr<AutoDownloadSettingsPresets>.
   */
  getAutoDownloadSettingsPresets();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1721088201;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<autoDownloadSettingsPresets>;

  static object_ptr<getAutoDownloadSettingsPresets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class autosaveSettings;

/**
 * Returns autosave settings for the current user.
 *
 * Returns object_ptr<AutosaveSettings>.
 */
class getAutosaveSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns autosave settings for the current user.
   *
   * Returns object_ptr<AutosaveSettings>.
   */
  getAutosaveSettings();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2136207914;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<autosaveSettings>;

  static object_ptr<getAutosaveSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostSlots;

/**
 * Returns the list of available chat boost slots for the current user.
 *
 * Returns object_ptr<ChatBoostSlots>.
 */
class getAvailableChatBoostSlots final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of available chat boost slots for the current user.
   *
   * Returns object_ptr<ChatBoostSlots>.
   */
  getAvailableChatBoostSlots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1929898965;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostSlots>;

  static object_ptr<getAvailableChatBoostSlots> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class availableGifts;

/**
 * Returns gifts that can be sent to other users and channel chats.
 *
 * Returns object_ptr<AvailableGifts>.
 */
class getAvailableGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns gifts that can be sent to other users and channel chats.
   *
   * Returns object_ptr<AvailableGifts>.
   */
  getAvailableGifts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -4559695;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<availableGifts>;

  static object_ptr<getAvailableGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundType;

class httpUrl;

/**
 * Constructs a persistent HTTP URL for a background.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getBackgroundUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Background name.
  string name_;
  static jfieldID name_fieldID;
  /// Background type; backgroundTypeChatTheme isn't supported.
  object_ptr<BackgroundType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which constructs a persistent HTTP URL for a background.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getBackgroundUrl();

  /**
   * Creates a function, which constructs a persistent HTTP URL for a background.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] name_ Background name.
   * \param[in] type_ Background type; backgroundTypeChatTheme isn't supported.
   */
  getBackgroundUrl(string const &name_, object_ptr<BackgroundType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 733769682;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getBackgroundUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class bankCardInfo;

/**
 * Returns information about a bank card.
 *
 * Returns object_ptr<BankCardInfo>.
 */
class getBankCardInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The bank card number.
  string bank_card_number_;
  static jfieldID bank_card_number_fieldID;

  /**
   * Default constructor for a function, which returns information about a bank card.
   *
   * Returns object_ptr<BankCardInfo>.
   */
  getBankCardInfo();

  /**
   * Creates a function, which returns information about a bank card.
   *
   * Returns object_ptr<BankCardInfo>.
   *
   * \param[in] bank_card_number_ The bank card number.
   */
  explicit getBankCardInfo(string const &bank_card_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1310515792;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<bankCardInfo>;

  static object_ptr<getBankCardInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class basicGroup;

/**
 * Returns information about a basic group by its identifier. This is an offline method if the current user is not a bot.
 *
 * Returns object_ptr<BasicGroup>.
 */
class getBasicGroup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Basic group identifier.
  int53 basic_group_id_;
  static jfieldID basic_group_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a basic group by its identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<BasicGroup>.
   */
  getBasicGroup();

  /**
   * Creates a function, which returns information about a basic group by its identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<BasicGroup>.
   *
   * \param[in] basic_group_id_ Basic group identifier.
   */
  explicit getBasicGroup(int53 basic_group_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1635174828;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<basicGroup>;

  static object_ptr<getBasicGroup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class basicGroupFullInfo;

/**
 * Returns full information about a basic group by its identifier.
 *
 * Returns object_ptr<BasicGroupFullInfo>.
 */
class getBasicGroupFullInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Basic group identifier.
  int53 basic_group_id_;
  static jfieldID basic_group_id_fieldID;

  /**
   * Default constructor for a function, which returns full information about a basic group by its identifier.
   *
   * Returns object_ptr<BasicGroupFullInfo>.
   */
  getBasicGroupFullInfo();

  /**
   * Creates a function, which returns full information about a basic group by its identifier.
   *
   * Returns object_ptr<BasicGroupFullInfo>.
   *
   * \param[in] basic_group_id_ Basic group identifier.
   */
  explicit getBasicGroupFullInfo(int53 basic_group_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1822039253;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<basicGroupFullInfo>;

  static object_ptr<getBasicGroupFullInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BlockList;

class messageSenders;

/**
 * Returns users and chats that were blocked by the current user.
 *
 * Returns object_ptr<MessageSenders>.
 */
class getBlockedMessageSenders final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Block list from which to return users.
  object_ptr<BlockList> block_list_;
  static jfieldID block_list_fieldID;
  /// Number of users and chats to skip in the result; must be non-negative.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of users and chats to return; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns users and chats that were blocked by the current user.
   *
   * Returns object_ptr<MessageSenders>.
   */
  getBlockedMessageSenders();

  /**
   * Creates a function, which returns users and chats that were blocked by the current user.
   *
   * Returns object_ptr<MessageSenders>.
   *
   * \param[in] block_list_ Block list from which to return users.
   * \param[in] offset_ Number of users and chats to skip in the result; must be non-negative.
   * \param[in] limit_ The maximum number of users and chats to return; up to 100.
   */
  getBlockedMessageSenders(object_ptr<BlockList> &&block_list_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1931137258;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageSenders>;

  static object_ptr<getBlockedMessageSenders> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns the text shown in the chat with a bot if the chat is empty in the given language. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Text>.
 */
class getBotInfoDescription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which returns the text shown in the chat with a bot if the chat is empty in the given language. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Text>.
   */
  getBotInfoDescription();

  /**
   * Creates a function, which returns the text shown in the chat with a bot if the chat is empty in the given language. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] language_code_ A two-letter ISO 639-1 language code or an empty string.
   */
  getBotInfoDescription(int53 bot_user_id_, string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -762841035;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getBotInfoDescription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns the text shown on a bot's profile page and sent together with the link when users share the bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Text>.
 */
class getBotInfoShortDescription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which returns the text shown on a bot's profile page and sent together with the link when users share the bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Text>.
   */
  getBotInfoShortDescription();

  /**
   * Creates a function, which returns the text shown on a bot's profile page and sent together with the link when users share the bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] language_code_ A two-letter ISO 639-1 language code or an empty string.
   */
  getBotInfoShortDescription(int53 bot_user_id_, string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1243358740;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getBotInfoShortDescription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class botMediaPreviewInfo;

/**
 * Returns the list of media previews for the given language and the list of languages for which the bot has dedicated previews.
 *
 * Returns object_ptr<BotMediaPreviewInfo>.
 */
class getBotMediaPreviewInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code for which to get previews. If empty, then default previews are returned.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which returns the list of media previews for the given language and the list of languages for which the bot has dedicated previews.
   *
   * Returns object_ptr<BotMediaPreviewInfo>.
   */
  getBotMediaPreviewInfo();

  /**
   * Creates a function, which returns the list of media previews for the given language and the list of languages for which the bot has dedicated previews.
   *
   * Returns object_ptr<BotMediaPreviewInfo>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. The bot must be owned and must have the main Web App.
   * \param[in] language_code_ A two-letter ISO 639-1 language code for which to get previews. If empty, then default previews are returned.
   */
  getBotMediaPreviewInfo(int53 bot_user_id_, string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1358299446;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botMediaPreviewInfo>;

  static object_ptr<getBotMediaPreviewInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class botMediaPreviews;

/**
 * Returns the list of media previews of a bot.
 *
 * Returns object_ptr<BotMediaPreviews>.
 */
class getBotMediaPreviews final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. The bot must have the main Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of media previews of a bot.
   *
   * Returns object_ptr<BotMediaPreviews>.
   */
  getBotMediaPreviews();

  /**
   * Creates a function, which returns the list of media previews of a bot.
   *
   * Returns object_ptr<BotMediaPreviews>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. The bot must have the main Web App.
   */
  explicit getBotMediaPreviews(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 577131608;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botMediaPreviews>;

  static object_ptr<getBotMediaPreviews> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns the name of a bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Text>.
 */
class getBotName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which returns the name of a bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Text>.
   */
  getBotName();

  /**
   * Creates a function, which returns the name of a bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] language_code_ A two-letter ISO 639-1 language code or an empty string.
   */
  getBotName(int53 bot_user_id_, string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1707118036;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getBotName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class count;

/**
 * Returns approximate number of bots similar to the given bot.
 *
 * Returns object_ptr<Count>.
 */
class getBotSimilarBotCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Pass true to get the number of bots without sending network requests, or -1 if the number of bots is unknown locally.
  bool return_local_;
  static jfieldID return_local_fieldID;

  /**
   * Default constructor for a function, which returns approximate number of bots similar to the given bot.
   *
   * Returns object_ptr<Count>.
   */
  getBotSimilarBotCount();

  /**
   * Creates a function, which returns approximate number of bots similar to the given bot.
   *
   * Returns object_ptr<Count>.
   *
   * \param[in] bot_user_id_ User identifier of the target bot.
   * \param[in] return_local_ Pass true to get the number of bots without sending network requests, or -1 if the number of bots is unknown locally.
   */
  getBotSimilarBotCount(int53 bot_user_id_, bool return_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1271545369;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  static object_ptr<getBotSimilarBotCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class users;

/**
 * Returns a list of bots similar to the given bot.
 *
 * Returns object_ptr<Users>.
 */
class getBotSimilarBots final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which returns a list of bots similar to the given bot.
   *
   * Returns object_ptr<Users>.
   */
  getBotSimilarBots();

  /**
   * Creates a function, which returns a list of bots similar to the given bot.
   *
   * Returns object_ptr<Users>.
   *
   * \param[in] bot_user_id_ User identifier of the target bot.
   */
  explicit getBotSimilarBots(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -825139275;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<users>;

  static object_ptr<getBotSimilarBots> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starAmount;

/**
 * Returns the Telegram Star amount owned by a business account; for bots only.
 *
 * Returns object_ptr<StarAmount>.
 */
class getBusinessAccountStarAmount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;

  /**
   * Default constructor for a function, which returns the Telegram Star amount owned by a business account; for bots only.
   *
   * Returns object_ptr<StarAmount>.
   */
  getBusinessAccountStarAmount();

  /**
   * Creates a function, which returns the Telegram Star amount owned by a business account; for bots only.
   *
   * Returns object_ptr<StarAmount>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   */
  explicit getBusinessAccountStarAmount(string const &business_connection_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1817136693;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starAmount>;

  static object_ptr<getBusinessAccountStarAmount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessChatLinkInfo;

/**
 * Returns information about a business chat link.
 *
 * Returns object_ptr<BusinessChatLinkInfo>.
 */
class getBusinessChatLinkInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the link.
  string link_name_;
  static jfieldID link_name_fieldID;

  /**
   * Default constructor for a function, which returns information about a business chat link.
   *
   * Returns object_ptr<BusinessChatLinkInfo>.
   */
  getBusinessChatLinkInfo();

  /**
   * Creates a function, which returns information about a business chat link.
   *
   * Returns object_ptr<BusinessChatLinkInfo>.
   *
   * \param[in] link_name_ Name of the link.
   */
  explicit getBusinessChatLinkInfo(string const &link_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 797670986;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessChatLinkInfo>;

  static object_ptr<getBusinessChatLinkInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessChatLinks;

/**
 * Returns business chat links created for the current account.
 *
 * Returns object_ptr<BusinessChatLinks>.
 */
class getBusinessChatLinks final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns business chat links created for the current account.
   *
   * Returns object_ptr<BusinessChatLinks>.
   */
  getBusinessChatLinks();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 710287703;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessChatLinks>;

  static object_ptr<getBusinessChatLinks> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessConnectedBot;

/**
 * Returns the business bot that is connected to the current user account. Returns a 404 error if there is no connected bot.
 *
 * Returns object_ptr<BusinessConnectedBot>.
 */
class getBusinessConnectedBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the business bot that is connected to the current user account. Returns a 404 error if there is no connected bot.
   *
   * Returns object_ptr<BusinessConnectedBot>.
   */
  getBusinessConnectedBot();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 911058883;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessConnectedBot>;

  static object_ptr<getBusinessConnectedBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessConnection;

/**
 * Returns information about a business connection by its identifier; for bots only.
 *
 * Returns object_ptr<BusinessConnection>.
 */
class getBusinessConnection final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the business connection to return.
  string connection_id_;
  static jfieldID connection_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a business connection by its identifier; for bots only.
   *
   * Returns object_ptr<BusinessConnection>.
   */
  getBusinessConnection();

  /**
   * Creates a function, which returns information about a business connection by its identifier; for bots only.
   *
   * Returns object_ptr<BusinessConnection>.
   *
   * \param[in] connection_id_ Identifier of the business connection to return.
   */
  explicit getBusinessConnection(string const &connection_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2114706400;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessConnection>;

  static object_ptr<getBusinessConnection> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BusinessFeature;

class businessFeatures;

/**
 * Returns information about features, available to Business users.
 *
 * Returns object_ptr<BusinessFeatures>.
 */
class getBusinessFeatures final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Source of the request; pass null if the method is called from settings or some non-standard source.
  object_ptr<BusinessFeature> source_;
  static jfieldID source_fieldID;

  /**
   * Default constructor for a function, which returns information about features, available to Business users.
   *
   * Returns object_ptr<BusinessFeatures>.
   */
  getBusinessFeatures();

  /**
   * Creates a function, which returns information about features, available to Business users.
   *
   * Returns object_ptr<BusinessFeatures>.
   *
   * \param[in] source_ Source of the request; pass null if the method is called from settings or some non-standard source.
   */
  explicit getBusinessFeatures(object_ptr<BusinessFeature> &&source_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -997171199;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessFeatures>;

  static object_ptr<getBusinessFeatures> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CallbackQueryPayload;

class callbackQueryAnswer;

/**
 * Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.
 *
 * Returns object_ptr<CallbackQueryAnswer>.
 */
class getCallbackQueryAnswer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message from which the query originated. The message must not be scheduled.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Query payload.
  object_ptr<CallbackQueryPayload> payload_;
  static jfieldID payload_fieldID;

  /**
   * Default constructor for a function, which sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.
   *
   * Returns object_ptr<CallbackQueryAnswer>.
   */
  getCallbackQueryAnswer();

  /**
   * Creates a function, which sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.
   *
   * Returns object_ptr<CallbackQueryAnswer>.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message from which the query originated. The message must not be scheduled.
   * \param[in] payload_ Query payload.
   */
  getCallbackQueryAnswer(int53 chat_id_, int53 message_id_, object_ptr<CallbackQueryPayload> &&payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 116357727;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<callbackQueryAnswer>;

  static object_ptr<getCallbackQueryAnswer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns information about a message with the callback button that originated a callback query; for bots only.
 *
 * Returns object_ptr<Message>.
 */
class getCallbackQueryMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the callback query.
  int64 callback_query_id_;
  static jfieldID callback_query_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a message with the callback button that originated a callback query; for bots only.
   *
   * Returns object_ptr<Message>.
   */
  getCallbackQueryMessage();

  /**
   * Creates a function, which returns information about a message with the callback button that originated a callback query; for bots only.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Identifier of the chat the message belongs to.
   * \param[in] message_id_ Message identifier.
   * \param[in] callback_query_id_ Identifier of the callback query.
   */
  getCallbackQueryMessage(int53 chat_id_, int53 message_id_, int64 callback_query_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1121939086;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getCallbackQueryMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Returns information about a chat by its identifier. This is an offline method if the current user is not a bot.
 *
 * Returns object_ptr<Chat>.
 */
class getChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a chat by its identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<Chat>.
   */
  getChat();

  /**
   * Creates a function, which returns information about a chat by its identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1866601536;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<getChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatActiveStories;

/**
 * Returns the list of active stories posted by the given chat.
 *
 * Returns object_ptr<ChatActiveStories>.
 */
class getChatActiveStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of active stories posted by the given chat.
   *
   * Returns object_ptr<ChatActiveStories>.
   */
  getChatActiveStories();

  /**
   * Creates a function, which returns the list of active stories posted by the given chat.
   *
   * Returns object_ptr<ChatActiveStories>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatActiveStories(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 776993781;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatActiveStories>;

  static object_ptr<getChatActiveStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatAdministrators;

/**
 * Returns a list of administrators of the chat with their custom titles.
 *
 * Returns object_ptr<ChatAdministrators>.
 */
class getChatAdministrators final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns a list of administrators of the chat with their custom titles.
   *
   * Returns object_ptr<ChatAdministrators>.
   */
  getChatAdministrators();

  /**
   * Creates a function, which returns a list of administrators of the chat with their custom titles.
   *
   * Returns object_ptr<ChatAdministrators>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatAdministrators(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1544468155;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatAdministrators>;

  static object_ptr<getChatAdministrators> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stories;

/**
 * Returns the list of all stories posted by the given chat; requires can_edit_stories administrator right in the chat. The stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
 *
 * Returns object_ptr<Stories>.
 */
class getChatArchivedStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story starting from which stories must be returned; use 0 to get results from the last story.
  int32 from_story_id_;
  static jfieldID from_story_id_fieldID;
  /// The maximum number of stories to be returned. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of all stories posted by the given chat; requires can_edit_stories administrator right in the chat. The stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
   *
   * Returns object_ptr<Stories>.
   */
  getChatArchivedStories();

  /**
   * Creates a function, which returns the list of all stories posted by the given chat; requires can_edit_stories administrator right in the chat. The stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
   *
   * Returns object_ptr<Stories>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] from_story_id_ Identifier of the story starting from which stories must be returned; use 0 to get results from the last story.
   * \param[in] limit_ The maximum number of stories to be returned. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   */
  getChatArchivedStories(int53 chat_id_, int32 from_story_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1356950392;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stories>;

  static object_ptr<getChatArchivedStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatMessageSenders;

/**
 * Returns the list of message sender identifiers, which can be used to send messages in a chat.
 *
 * Returns object_ptr<ChatMessageSenders>.
 */
class getChatAvailableMessageSenders final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of message sender identifiers, which can be used to send messages in a chat.
   *
   * Returns object_ptr<ChatMessageSenders>.
   */
  getChatAvailableMessageSenders();

  /**
   * Creates a function, which returns the list of message sender identifiers, which can be used to send messages in a chat.
   *
   * Returns object_ptr<ChatMessageSenders>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatAvailableMessageSenders(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1158670635;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatMessageSenders>;

  static object_ptr<getChatAvailableMessageSenders> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageSenders;

/**
 * Returns the list of message sender identifiers, which can be used to send a paid reaction in a chat.
 *
 * Returns object_ptr<MessageSenders>.
 */
class getChatAvailablePaidMessageReactionSenders final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of message sender identifiers, which can be used to send a paid reaction in a chat.
   *
   * Returns object_ptr<MessageSenders>.
   */
  getChatAvailablePaidMessageReactionSenders();

  /**
   * Creates a function, which returns the list of message sender identifiers, which can be used to send a paid reaction in a chat.
   *
   * Returns object_ptr<MessageSenders>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatAvailablePaidMessageReactionSenders(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1244619639;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageSenders>;

  static object_ptr<getChatAvailablePaidMessageReactionSenders> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostFeatures;

/**
 * Returns the list of features available for different chat boost levels. This is an offline method.
 *
 * Returns object_ptr<ChatBoostFeatures>.
 */
class getChatBoostFeatures final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to get the list of features for channels; pass false to get the list of features for supergroups.
  bool is_channel_;
  static jfieldID is_channel_fieldID;

  /**
   * Default constructor for a function, which returns the list of features available for different chat boost levels. This is an offline method.
   *
   * Returns object_ptr<ChatBoostFeatures>.
   */
  getChatBoostFeatures();

  /**
   * Creates a function, which returns the list of features available for different chat boost levels. This is an offline method.
   *
   * Returns object_ptr<ChatBoostFeatures>.
   *
   * \param[in] is_channel_ Pass true to get the list of features for channels; pass false to get the list of features for supergroups.
   */
  explicit getChatBoostFeatures(bool is_channel_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -389994336;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostFeatures>;

  static object_ptr<getChatBoostFeatures> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostLevelFeatures;

/**
 * Returns the list of features available on the specific chat boost level. This is an offline method.
 *
 * Returns object_ptr<ChatBoostLevelFeatures>.
 */
class getChatBoostLevelFeatures final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to get the list of features for channels; pass false to get the list of features for supergroups.
  bool is_channel_;
  static jfieldID is_channel_fieldID;
  /// Chat boost level.
  int32 level_;
  static jfieldID level_fieldID;

  /**
   * Default constructor for a function, which returns the list of features available on the specific chat boost level. This is an offline method.
   *
   * Returns object_ptr<ChatBoostLevelFeatures>.
   */
  getChatBoostLevelFeatures();

  /**
   * Creates a function, which returns the list of features available on the specific chat boost level. This is an offline method.
   *
   * Returns object_ptr<ChatBoostLevelFeatures>.
   *
   * \param[in] is_channel_ Pass true to get the list of features for channels; pass false to get the list of features for supergroups.
   * \param[in] level_ Chat boost level.
   */
  getChatBoostLevelFeatures(bool is_channel_, int32 level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1172717195;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostLevelFeatures>;

  static object_ptr<getChatBoostLevelFeatures> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostLink;

/**
 * Returns an HTTPS link to boost the specified supergroup or channel chat.
 *
 * Returns object_ptr<ChatBoostLink>.
 */
class getChatBoostLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns an HTTPS link to boost the specified supergroup or channel chat.
   *
   * Returns object_ptr<ChatBoostLink>.
   */
  getChatBoostLink();

  /**
   * Creates a function, which returns an HTTPS link to boost the specified supergroup or channel chat.
   *
   * Returns object_ptr<ChatBoostLink>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   */
  explicit getChatBoostLink(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1458662533;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostLink>;

  static object_ptr<getChatBoostLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostLinkInfo;

/**
 * Returns information about a link to boost a chat. Can be called for any internal link of the type internalLinkTypeChatBoost.
 *
 * Returns object_ptr<ChatBoostLinkInfo>.
 */
class getChatBoostLinkInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link to boost a chat.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Default constructor for a function, which returns information about a link to boost a chat. Can be called for any internal link of the type internalLinkTypeChatBoost.
   *
   * Returns object_ptr<ChatBoostLinkInfo>.
   */
  getChatBoostLinkInfo();

  /**
   * Creates a function, which returns information about a link to boost a chat. Can be called for any internal link of the type internalLinkTypeChatBoost.
   *
   * Returns object_ptr<ChatBoostLinkInfo>.
   *
   * \param[in] url_ The link to boost a chat.
   */
  explicit getChatBoostLinkInfo(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 654068572;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostLinkInfo>;

  static object_ptr<getChatBoostLinkInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatBoostStatus;

/**
 * Returns the current boost status for a supergroup or a channel chat.
 *
 * Returns object_ptr<ChatBoostStatus>.
 */
class getChatBoostStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the current boost status for a supergroup or a channel chat.
   *
   * Returns object_ptr<ChatBoostStatus>.
   */
  getChatBoostStatus();

  /**
   * Creates a function, which returns the current boost status for a supergroup or a channel chat.
   *
   * Returns object_ptr<ChatBoostStatus>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   */
  explicit getChatBoostStatus(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -810775857;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatBoostStatus>;

  static object_ptr<getChatBoostStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundChatBoosts;

/**
 * Returns the list of boosts applied to a chat; requires administrator rights in the chat.
 *
 * Returns object_ptr<FoundChatBoosts>.
 */
class getChatBoosts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to receive only boosts received from gift codes and giveaways created by the chat.
  bool only_gift_codes_;
  static jfieldID only_gift_codes_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of boosts to be returned; up to 100. For optimal performance, the number of returned boosts can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of boosts applied to a chat; requires administrator rights in the chat.
   *
   * Returns object_ptr<FoundChatBoosts>.
   */
  getChatBoosts();

  /**
   * Creates a function, which returns the list of boosts applied to a chat; requires administrator rights in the chat.
   *
   * Returns object_ptr<FoundChatBoosts>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] only_gift_codes_ Pass true to receive only boosts received from gift codes and giveaways created by the chat.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of boosts to be returned; up to 100. For optimal performance, the number of returned boosts can be smaller than the specified limit.
   */
  getChatBoosts(int53 chat_id_, bool only_gift_codes_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1419859400;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundChatBoosts>;

  static object_ptr<getChatBoosts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatEventLogFilters;

class chatEvents;

/**
 * Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id).
 *
 * Returns object_ptr<ChatEvents>.
 */
class getChatEventLog final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Search query by which to filter events.
  string query_;
  static jfieldID query_fieldID;
  /// Identifier of an event from which to return results. Use 0 to get results from the latest events.
  int64 from_event_id_;
  static jfieldID from_event_id_fieldID;
  /// The maximum number of events to return; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// The types of events to return; pass null to get chat events of all types.
  object_ptr<chatEventLogFilters> filters_;
  static jfieldID filters_fieldID;
  /// User identifiers by which to filter events. By default, events relating to all users will be returned.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Default constructor for a function, which returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id).
   *
   * Returns object_ptr<ChatEvents>.
   */
  getChatEventLog();

  /**
   * Creates a function, which returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id).
   *
   * Returns object_ptr<ChatEvents>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] query_ Search query by which to filter events.
   * \param[in] from_event_id_ Identifier of an event from which to return results. Use 0 to get results from the latest events.
   * \param[in] limit_ The maximum number of events to return; up to 100.
   * \param[in] filters_ The types of events to return; pass null to get chat events of all types.
   * \param[in] user_ids_ User identifiers by which to filter events. By default, events relating to all users will be returned.
   */
  getChatEventLog(int53 chat_id_, string const &query_, int64 from_event_id_, int32 limit_, object_ptr<chatEventLogFilters> &&filters_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1281344669;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatEvents>;

  static object_ptr<getChatEventLog> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolder;

/**
 * Returns information about a chat folder by its identifier.
 *
 * Returns object_ptr<ChatFolder>.
 */
class getChatFolder final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a chat folder by its identifier.
   *
   * Returns object_ptr<ChatFolder>.
   */
  getChatFolder();

  /**
   * Creates a function, which returns information about a chat folder by its identifier.
   *
   * Returns object_ptr<ChatFolder>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   */
  explicit getChatFolder(int32 chat_folder_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 92809880;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolder>;

  static object_ptr<getChatFolder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolder;

class count;

/**
 * Returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly.
 *
 * Returns object_ptr<Count>.
 */
class getChatFolderChatCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new chat folder.
  object_ptr<chatFolder> folder_;
  static jfieldID folder_fieldID;

  /**
   * Default constructor for a function, which returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly.
   *
   * Returns object_ptr<Count>.
   */
  getChatFolderChatCount();

  /**
   * Creates a function, which returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly.
   *
   * Returns object_ptr<Count>.
   *
   * \param[in] folder_ The new chat folder.
   */
  explicit getChatFolderChatCount(object_ptr<chatFolder> &&folder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2111097790;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  static object_ptr<getChatFolderChatCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted.
 *
 * Returns object_ptr<Chats>.
 */
class getChatFolderChatsToLeave final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;

  /**
   * Default constructor for a function, which returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted.
   *
   * Returns object_ptr<Chats>.
   */
  getChatFolderChatsToLeave();

  /**
   * Creates a function, which returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   */
  explicit getChatFolderChatsToLeave(int32 chat_folder_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1916672337;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChatFolderChatsToLeave> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolder;

class chatFolderIcon;

/**
 * Returns default icon name for a folder. Can be called synchronously.
 *
 * Returns object_ptr<ChatFolderIcon>.
 */
class getChatFolderDefaultIconName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder.
  object_ptr<chatFolder> folder_;
  static jfieldID folder_fieldID;

  /**
   * Default constructor for a function, which returns default icon name for a folder. Can be called synchronously.
   *
   * Returns object_ptr<ChatFolderIcon>.
   */
  getChatFolderDefaultIconName();

  /**
   * Creates a function, which returns default icon name for a folder. Can be called synchronously.
   *
   * Returns object_ptr<ChatFolderIcon>.
   *
   * \param[in] folder_ Chat folder.
   */
  explicit getChatFolderDefaultIconName(object_ptr<chatFolder> &&folder_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 754425959;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderIcon>;

  static object_ptr<getChatFolderDefaultIconName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatFolderInviteLinks;

/**
 * Returns invite links created by the current user for a shareable chat folder.
 *
 * Returns object_ptr<ChatFolderInviteLinks>.
 */
class getChatFolderInviteLinks final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;

  /**
   * Default constructor for a function, which returns invite links created by the current user for a shareable chat folder.
   *
   * Returns object_ptr<ChatFolderInviteLinks>.
   */
  getChatFolderInviteLinks();

  /**
   * Creates a function, which returns invite links created by the current user for a shareable chat folder.
   *
   * Returns object_ptr<ChatFolderInviteLinks>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   */
  explicit getChatFolderInviteLinks(int32 chat_folder_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 329079776;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatFolderInviteLinks>;

  static object_ptr<getChatFolderInviteLinks> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption(&quot;chat_folder_new_chats_update_period&quot;) for the given chat folder.
 *
 * Returns object_ptr<Chats>.
 */
class getChatFolderNewChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;

  /**
   * Default constructor for a function, which returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption(&quot;chat_folder_new_chats_update_period&quot;) for the given chat folder.
   *
   * Returns object_ptr<Chats>.
   */
  getChatFolderNewChats();

  /**
   * Creates a function, which returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption(&quot;chat_folder_new_chats_update_period&quot;) for the given chat folder.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   */
  explicit getChatFolderNewChats(int32 chat_folder_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2123181260;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChatFolderNewChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib. This is an offline method if only_local is true.
 *
 * Returns object_ptr<Messages>.
 */
class getChatHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Pass true to get only messages that are available without sending network requests.
  bool only_local_;
  static jfieldID only_local_fieldID;

  /**
   * Default constructor for a function, which returns messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib. This is an offline method if only_local is true.
   *
   * Returns object_ptr<Messages>.
   */
  getChatHistory();

  /**
   * Creates a function, which returns messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib. This is an offline method if only_local is true.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] from_message_id_ Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   * \param[in] only_local_ Pass true to get only messages that are available without sending network requests.
   */
  getChatHistory(int53 chat_id_, int53 from_message_id_, int32 offset_, int32 limit_, bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -799960451;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getChatHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

/**
 * Returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links.
 *
 * Returns object_ptr<ChatInviteLink>.
 */
class getChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link to get.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links.
   *
   * Returns object_ptr<ChatInviteLink>.
   */
  getChatInviteLink();

  /**
   * Creates a function, which returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links.
   *
   * Returns object_ptr<ChatInviteLink>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link to get.
   */
  getChatInviteLink(int53 chat_id_, string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -479575555;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLink>;

  static object_ptr<getChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinkCounts;

/**
 * Returns the list of chat administrators with number of their invite links. Requires owner privileges in the chat.
 *
 * Returns object_ptr<ChatInviteLinkCounts>.
 */
class getChatInviteLinkCounts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of chat administrators with number of their invite links. Requires owner privileges in the chat.
   *
   * Returns object_ptr<ChatInviteLinkCounts>.
   */
  getChatInviteLinkCounts();

  /**
   * Creates a function, which returns the list of chat administrators with number of their invite links. Requires owner privileges in the chat.
   *
   * Returns object_ptr<ChatInviteLinkCounts>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatInviteLinkCounts(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 890299025;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLinkCounts>;

  static object_ptr<getChatInviteLinkCounts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinkMember;

class chatInviteLinkMembers;

/**
 * Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
 *
 * Returns object_ptr<ChatInviteLinkMembers>.
 */
class getChatInviteLinkMembers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link for which to return chat members.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Pass true if the link is a subscription link and only members with expired subscription must be returned.
  bool only_with_expired_subscription_;
  static jfieldID only_with_expired_subscription_fieldID;
  /// A chat member from which to return next chat members; pass null to get results from the beginning.
  object_ptr<chatInviteLinkMember> offset_member_;
  static jfieldID offset_member_fieldID;
  /// The maximum number of chat members to return; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<ChatInviteLinkMembers>.
   */
  getChatInviteLinkMembers();

  /**
   * Creates a function, which returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   *
   * Returns object_ptr<ChatInviteLinkMembers>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link for which to return chat members.
   * \param[in] only_with_expired_subscription_ Pass true if the link is a subscription link and only members with expired subscription must be returned.
   * \param[in] offset_member_ A chat member from which to return next chat members; pass null to get results from the beginning.
   * \param[in] limit_ The maximum number of chat members to return; up to 100.
   */
  getChatInviteLinkMembers(int53 chat_id_, string const &invite_link_, bool only_with_expired_subscription_, object_ptr<chatInviteLinkMember> &&offset_member_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1728376124;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLinkMembers>;

  static object_ptr<getChatInviteLinkMembers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinks;

/**
 * Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links.
 *
 * Returns object_ptr<ChatInviteLinks>.
 */
class getChatInviteLinks final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// User identifier of a chat administrator. Must be an identifier of the current user for non-owner.
  int53 creator_user_id_;
  static jfieldID creator_user_id_fieldID;
  /// Pass true if revoked links needs to be returned instead of active or expired.
  bool is_revoked_;
  static jfieldID is_revoked_fieldID;
  /// Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning.
  int32 offset_date_;
  static jfieldID offset_date_fieldID;
  /// Invite link starting after which to return invite links; use empty string to get results from the beginning.
  string offset_invite_link_;
  static jfieldID offset_invite_link_fieldID;
  /// The maximum number of invite links to return; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links.
   *
   * Returns object_ptr<ChatInviteLinks>.
   */
  getChatInviteLinks();

  /**
   * Creates a function, which returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links.
   *
   * Returns object_ptr<ChatInviteLinks>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] creator_user_id_ User identifier of a chat administrator. Must be an identifier of the current user for non-owner.
   * \param[in] is_revoked_ Pass true if revoked links needs to be returned instead of active or expired.
   * \param[in] offset_date_ Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning.
   * \param[in] offset_invite_link_ Invite link starting after which to return invite links; use empty string to get results from the beginning.
   * \param[in] limit_ The maximum number of invite links to return; up to 100.
   */
  getChatInviteLinks(int53 chat_id_, int53 creator_user_id_, bool is_revoked_, int32 offset_date_, string const &offset_invite_link_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 883252396;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLinks>;

  static object_ptr<getChatInviteLinks> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatJoinRequest;

class chatJoinRequests;

/**
 * Returns pending join requests in a chat.
 *
 * Returns object_ptr<ChatJoinRequests>.
 */
class getChatJoinRequests final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link for which to return join requests. If empty, all join requests will be returned. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// A query to search for in the first names, last names and usernames of the users to return.
  string query_;
  static jfieldID query_fieldID;
  /// A chat join request from which to return next requests; pass null to get results from the beginning.
  object_ptr<chatJoinRequest> offset_request_;
  static jfieldID offset_request_fieldID;
  /// The maximum number of requests to join the chat to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns pending join requests in a chat.
   *
   * Returns object_ptr<ChatJoinRequests>.
   */
  getChatJoinRequests();

  /**
   * Creates a function, which returns pending join requests in a chat.
   *
   * Returns object_ptr<ChatJoinRequests>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link for which to return join requests. If empty, all join requests will be returned. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   * \param[in] query_ A query to search for in the first names, last names and usernames of the users to return.
   * \param[in] offset_request_ A chat join request from which to return next requests; pass null to get results from the beginning.
   * \param[in] limit_ The maximum number of requests to join the chat to return.
   */
  getChatJoinRequests(int53 chat_id_, string const &invite_link_, string const &query_, object_ptr<chatJoinRequest> &&offset_request_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -388428126;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatJoinRequests>;

  static object_ptr<getChatJoinRequests> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatLists;

/**
 * Returns chat lists to which the chat can be added. This is an offline method.
 *
 * Returns object_ptr<ChatLists>.
 */
class getChatListsToAddChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns chat lists to which the chat can be added. This is an offline method.
   *
   * Returns object_ptr<ChatLists>.
   */
  getChatListsToAddChat();

  /**
   * Creates a function, which returns chat lists to which the chat can be added. This is an offline method.
   *
   * Returns object_ptr<ChatLists>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatListsToAddChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 654956193;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatLists>;

  static object_ptr<getChatListsToAddChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class chatMember;

/**
 * Returns information about a single member of a chat.
 *
 * Returns object_ptr<ChatMember>.
 */
class getChatMember final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Member identifier.
  object_ptr<MessageSender> member_id_;
  static jfieldID member_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a single member of a chat.
   *
   * Returns object_ptr<ChatMember>.
   */
  getChatMember();

  /**
   * Creates a function, which returns information about a single member of a chat.
   *
   * Returns object_ptr<ChatMember>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] member_id_ Member identifier.
   */
  getChatMember(int53 chat_id_, object_ptr<MessageSender> &&member_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -792636814;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatMember>;

  static object_ptr<getChatMember> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist.
 *
 * Returns object_ptr<Message>.
 */
class getChatMessageByDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Point in time (Unix timestamp) relative to which to search for messages.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Default constructor for a function, which returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist.
   *
   * Returns object_ptr<Message>.
   */
  getChatMessageByDate();

  /**
   * Creates a function, which returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] date_ Point in time (Unix timestamp) relative to which to search for messages.
   */
  getChatMessageByDate(int53 chat_id_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1062564150;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getChatMessageByDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

class SearchMessagesFilter;

class messageCalendar;

/**
 * Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option &quot;utc_time_offset&quot;.
 *
 * Returns object_ptr<MessageCalendar>.
 */
class getChatMessageCalendar final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which to return information about messages.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass topic identifier to get the result only in specific topic; pass null to get the result in all topics; forum topics and message threads aren't supported.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterUnreadPollVote are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;
  /// The message identifier from which to return information about messages; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option &quot;utc_time_offset&quot;.
   *
   * Returns object_ptr<MessageCalendar>.
   */
  getChatMessageCalendar();

  /**
   * Creates a function, which returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option &quot;utc_time_offset&quot;.
   *
   * Returns object_ptr<MessageCalendar>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to return information about messages.
   * \param[in] topic_id_ Pass topic identifier to get the result only in specific topic; pass null to get the result in all topics; forum topics and message threads aren't supported.
   * \param[in] filter_ Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterUnreadPollVote are unsupported in this function.
   * \param[in] from_message_id_ The message identifier from which to return information about messages; use 0 to get results from the last message.
   */
  getChatMessageCalendar(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<SearchMessagesFilter> &&filter_, int53 from_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1644001372;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageCalendar>;

  static object_ptr<getChatMessageCalendar> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

class SearchMessagesFilter;

class count;

/**
 * Returns approximate number of messages of the specified type in the chat or its topic.
 *
 * Returns object_ptr<Count>.
 */
class getChatMessageCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which to count messages.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass topic identifier to get number of messages only in specific topic; pass null to get number of messages in all topics; message threads aren't supported.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Filter for message content; searchMessagesFilterEmpty is unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;
  /// Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally.
  bool return_local_;
  static jfieldID return_local_fieldID;

  /**
   * Default constructor for a function, which returns approximate number of messages of the specified type in the chat or its topic.
   *
   * Returns object_ptr<Count>.
   */
  getChatMessageCount();

  /**
   * Creates a function, which returns approximate number of messages of the specified type in the chat or its topic.
   *
   * Returns object_ptr<Count>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to count messages.
   * \param[in] topic_id_ Pass topic identifier to get number of messages only in specific topic; pass null to get number of messages in all topics; message threads aren't supported.
   * \param[in] filter_ Filter for message content; searchMessagesFilterEmpty is unsupported in this function.
   * \param[in] return_local_ Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally.
   */
  getChatMessageCount(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<SearchMessagesFilter> &&filter_, bool return_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1641001101;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  static object_ptr<getChatMessageCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

class SearchMessagesFilter;

class count;

/**
 * Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat and topic. Cannot be used in secret chats.
 *
 * Returns object_ptr<Count>.
 */
class getChatMessagePosition final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which to find message position.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass topic identifier to get position among messages only in specific topic; pass null to get position among all chat messages; message threads aren't supported.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterUnreadPollVote, and searchMessagesFilterFailedToSend are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat and topic. Cannot be used in secret chats.
   *
   * Returns object_ptr<Count>.
   */
  getChatMessagePosition();

  /**
   * Creates a function, which returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat and topic. Cannot be used in secret chats.
   *
   * Returns object_ptr<Count>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to find message position.
   * \param[in] topic_id_ Pass topic identifier to get position among messages only in specific topic; pass null to get position among all chat messages; message threads aren't supported.
   * \param[in] filter_ Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterUnreadPollVote, and searchMessagesFilterFailedToSend are unsupported in this function.
   * \param[in] message_id_ Message identifier.
   */
  getChatMessagePosition(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<SearchMessagesFilter> &&filter_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1468174577;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  static object_ptr<getChatMessagePosition> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class NotificationSettingsScope;

class chats;

/**
 * Returns the list of chats with non-default notification settings for new messages.
 *
 * Returns object_ptr<Chats>.
 */
class getChatNotificationSettingsExceptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If specified, only chats from the scope will be returned; pass null to return chats from all scopes.
  object_ptr<NotificationSettingsScope> scope_;
  static jfieldID scope_fieldID;
  /// Pass true to include in the response chats with only non-default sound.
  bool compare_sound_;
  static jfieldID compare_sound_fieldID;

  /**
   * Default constructor for a function, which returns the list of chats with non-default notification settings for new messages.
   *
   * Returns object_ptr<Chats>.
   */
  getChatNotificationSettingsExceptions();

  /**
   * Creates a function, which returns the list of chats with non-default notification settings for new messages.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] scope_ If specified, only chats from the scope will be returned; pass null to return chats from all scopes.
   * \param[in] compare_sound_ Pass true to include in the response chats with only non-default sound.
   */
  getChatNotificationSettingsExceptions(object_ptr<NotificationSettingsScope> &&scope_, bool compare_sound_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 201199121;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChatNotificationSettingsExceptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Returns the user who will become the owner of the chat after 7 days if the current user does not return to the supergroup or channel during that period or immediately for basic groups; requires owner privileges in the chat. Available only for basic groups, supergroups, and channel chats.
 *
 * Returns object_ptr<User>.
 */
class getChatOwnerAfterLeaving final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the user who will become the owner of the chat after 7 days if the current user does not return to the supergroup or channel during that period or immediately for basic groups; requires owner privileges in the chat. Available only for basic groups, supergroups, and channel chats.
   *
   * Returns object_ptr<User>.
   */
  getChatOwnerAfterLeaving();

  /**
   * Creates a function, which returns the user who will become the owner of the chat after 7 days if the current user does not return to the supergroup or channel during that period or immediately for basic groups; requires owner privileges in the chat. Available only for basic groups, supergroups, and channel chats.
   *
   * Returns object_ptr<User>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatOwnerAfterLeaving(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1637776102;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<getChatOwnerAfterLeaving> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist.
 *
 * Returns object_ptr<Message>.
 */
class getChatPinnedMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist.
   *
   * Returns object_ptr<Message>.
   */
  getChatPinnedMessage();

  /**
   * Creates a function, which returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Identifier of the chat the message belongs to.
   */
  explicit getChatPinnedMessage(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 359865008;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getChatPinnedMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stories;

/**
 * Returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
 *
 * Returns object_ptr<Stories>.
 */
class getChatPostedToChatPageStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story starting from which stories must be returned; use 0 to get results from pinned and the newest story.
  int32 from_story_id_;
  static jfieldID from_story_id_fieldID;
  /// The maximum number of stories to be returned. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
   *
   * Returns object_ptr<Stories>.
   */
  getChatPostedToChatPageStories();

  /**
   * Creates a function, which returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
   *
   * Returns object_ptr<Stories>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] from_story_id_ Identifier of the story starting from which stories must be returned; use 0 to get results from pinned and the newest story.
   * \param[in] limit_ The maximum number of stories to be returned. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   */
  getChatPostedToChatPageStories(int53 chat_id_, int32 from_story_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -46414037;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stories>;

  static object_ptr<getChatPostedToChatPageStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatRevenueStatistics;

/**
 * Returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true.
 *
 * Returns object_ptr<ChatRevenueStatistics>.
 */
class getChatRevenueStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true.
   *
   * Returns object_ptr<ChatRevenueStatistics>.
   */
  getChatRevenueStatistics();

  /**
   * Creates a function, which returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true.
   *
   * Returns object_ptr<ChatRevenueStatistics>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  getChatRevenueStatistics(int53 chat_id_, bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 701995836;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatRevenueStatistics>;

  static object_ptr<getChatRevenueStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatRevenueTransactions;

/**
 * Returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true.
 *
 * Returns object_ptr<ChatRevenueTransactions>.
 */
class getChatRevenueTransactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of transactions to be returned; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true.
   *
   * Returns object_ptr<ChatRevenueTransactions>.
   */
  getChatRevenueTransactions();

  /**
   * Creates a function, which returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true.
   *
   * Returns object_ptr<ChatRevenueTransactions>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] offset_ Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of transactions to be returned; up to 100.
   */
  getChatRevenueTransactions(int53 chat_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1120110117;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatRevenueTransactions>;

  static object_ptr<getChatRevenueTransactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns a URL for chat revenue withdrawal; requires owner privileges in the channel chat or the bot. Currently, this method can be used only if getOption(&quot;can_withdraw_chat_revenue&quot;) for channels with supergroupFullInfo.can_get_revenue_statistics == true or bots with userFullInfo.bot_info.can_get_revenue_statistics == true.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getChatRevenueWithdrawalUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns a URL for chat revenue withdrawal; requires owner privileges in the channel chat or the bot. Currently, this method can be used only if getOption(&quot;can_withdraw_chat_revenue&quot;) for channels with supergroupFullInfo.can_get_revenue_statistics == true or bots with userFullInfo.bot_info.can_get_revenue_statistics == true.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getChatRevenueWithdrawalUrl();

  /**
   * Creates a function, which returns a URL for chat revenue withdrawal; requires owner privileges in the channel chat or the bot. Currently, this method can be used only if getOption(&quot;can_withdraw_chat_revenue&quot;) for channels with supergroupFullInfo.can_get_revenue_statistics == true or bots with userFullInfo.bot_info.can_get_revenue_statistics == true.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] password_ The 2-step verification password of the current user.
   */
  getChatRevenueWithdrawalUrl(int53 chat_id_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 506595104;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getChatRevenueWithdrawalUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
 *
 * Returns object_ptr<Messages>.
 */
class getChatScheduledMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   *
   * Returns object_ptr<Messages>.
   */
  getChatScheduledMessages();

  /**
   * Creates a function, which returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatScheduledMessages(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -549638149;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getChatScheduledMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class count;

/**
 * Returns approximate number of chats similar to the given chat.
 *
 * Returns object_ptr<Count>.
 */
class getChatSimilarChatCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target chat; must be an identifier of a channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to get the number of chats without sending network requests, or -1 if the number of chats is unknown locally.
  bool return_local_;
  static jfieldID return_local_fieldID;

  /**
   * Default constructor for a function, which returns approximate number of chats similar to the given chat.
   *
   * Returns object_ptr<Count>.
   */
  getChatSimilarChatCount();

  /**
   * Creates a function, which returns approximate number of chats similar to the given chat.
   *
   * Returns object_ptr<Count>.
   *
   * \param[in] chat_id_ Identifier of the target chat; must be an identifier of a channel chat.
   * \param[in] return_local_ Pass true to get the number of chats without sending network requests, or -1 if the number of chats is unknown locally.
   */
  getChatSimilarChatCount(int53 chat_id_, bool return_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1178506894;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  static object_ptr<getChatSimilarChatCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns a list of chats similar to the given chat.
 *
 * Returns object_ptr<Chats>.
 */
class getChatSimilarChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target chat; must be an identifier of a channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns a list of chats similar to the given chat.
   *
   * Returns object_ptr<Chats>.
   */
  getChatSimilarChats();

  /**
   * Creates a function, which returns a list of chats similar to the given chat.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] chat_id_ Identifier of the target chat; must be an identifier of a channel chat.
   */
  explicit getChatSimilarChats(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1152348285;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChatSimilarChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class SearchMessagesFilter;

class messagePositions;

/**
 * Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.
 *
 * Returns object_ptr<MessagePositions>.
 */
class getChatSparseMessagePositions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which to return information about message positions.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterUnreadPollVote are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;
  /// The message identifier from which to return information about message positions.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;

  /**
   * Default constructor for a function, which returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.
   *
   * Returns object_ptr<MessagePositions>.
   */
  getChatSparseMessagePositions();

  /**
   * Creates a function, which returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.
   *
   * Returns object_ptr<MessagePositions>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to return information about message positions.
   * \param[in] filter_ Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterUnreadPollVote are unsupported in this function.
   * \param[in] from_message_id_ The message identifier from which to return information about message positions.
   * \param[in] limit_ The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages.
   * \param[in] saved_messages_topic_id_ If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages.
   */
  getChatSparseMessagePositions(int53 chat_id_, object_ptr<SearchMessagesFilter> &&filter_, int53 from_message_id_, int32 limit_, int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 994389757;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messagePositions>;

  static object_ptr<getChatSparseMessagePositions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class sponsoredMessages;

/**
 * Returns sponsored messages to be shown in a chat; for channel chats and chats with bots only.
 *
 * Returns object_ptr<SponsoredMessages>.
 */
class getChatSponsoredMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns sponsored messages to be shown in a chat; for channel chats and chats with bots only.
   *
   * Returns object_ptr<SponsoredMessages>.
   */
  getChatSponsoredMessages();

  /**
   * Creates a function, which returns sponsored messages to be shown in a chat; for channel chats and chats with bots only.
   *
   * Returns object_ptr<SponsoredMessages>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   */
  explicit getChatSponsoredMessages(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1353203864;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<sponsoredMessages>;

  static object_ptr<getChatSponsoredMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatStatistics;

/**
 * Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true.
 *
 * Returns object_ptr<ChatStatistics>.
 */
class getChatStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true.
   *
   * Returns object_ptr<ChatStatistics>.
   */
  getChatStatistics();

  /**
   * Creates a function, which returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true.
   *
   * Returns object_ptr<ChatStatistics>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  getChatStatistics(int53 chat_id_, bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 327057816;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ChatStatistics>;

  static object_ptr<getChatStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbums;

/**
 * Returns the list of story albums owned by the given chat.
 *
 * Returns object_ptr<StoryAlbums>.
 */
class getChatStoryAlbums final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of story albums owned by the given chat.
   *
   * Returns object_ptr<StoryAlbums>.
   */
  getChatStoryAlbums();

  /**
   * Creates a function, which returns the list of story albums owned by the given chat.
   *
   * Returns object_ptr<StoryAlbums>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getChatStoryAlbums(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1559582892;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyAlbums>;

  static object_ptr<getChatStoryAlbums> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class storyInteractions;

/**
 * Returns interactions with a story posted in a chat. Can be used only if story is posted on behalf of a chat and the user is an administrator in the chat.
 *
 * Returns object_ptr<StoryInteractions>.
 */
class getChatStoryInteractions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Pass the default heart reaction or a suggested reaction type to receive only interactions with the specified reaction type; pass null to receive all interactions; reactionTypePaid isn't supported.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;
  /// Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date.
  bool prefer_forwards_;
  static jfieldID prefer_forwards_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of story interactions to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns interactions with a story posted in a chat. Can be used only if story is posted on behalf of a chat and the user is an administrator in the chat.
   *
   * Returns object_ptr<StoryInteractions>.
   */
  getChatStoryInteractions();

  /**
   * Creates a function, which returns interactions with a story posted in a chat. Can be used only if story is posted on behalf of a chat and the user is an administrator in the chat.
   *
   * Returns object_ptr<StoryInteractions>.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story.
   * \param[in] story_id_ Story identifier.
   * \param[in] reaction_type_ Pass the default heart reaction or a suggested reaction type to receive only interactions with the specified reaction type; pass null to receive all interactions; reactionTypePaid isn't supported.
   * \param[in] prefer_forwards_ Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of story interactions to return.
   */
  getChatStoryInteractions(int53 story_poster_chat_id_, int32 story_id_, object_ptr<ReactionType> &&reaction_type_, bool prefer_forwards_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 354545268;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyInteractions>;

  static object_ptr<getChatStoryInteractions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class chats;

/**
 * Returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state.
 *
 * Returns object_ptr<Chats>.
 */
class getChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat list in which to return chats; pass null to get chats from the main chat list.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// The maximum number of chats to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state.
   *
   * Returns object_ptr<Chats>.
   */
  getChats();

  /**
   * Creates a function, which returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] chat_list_ The chat list in which to return chats; pass null to get chats from the main chat list.
   * \param[in] limit_ The maximum number of chats to be returned.
   */
  getChats(object_ptr<ChatList> &&chat_list_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -972768574;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns identifiers of chats from a chat folder, suitable for adding to a chat folder invite link.
 *
 * Returns object_ptr<Chats>.
 */
class getChatsForChatFolderInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;

  /**
   * Default constructor for a function, which returns identifiers of chats from a chat folder, suitable for adding to a chat folder invite link.
   *
   * Returns object_ptr<Chats>.
   */
  getChatsForChatFolderInviteLink();

  /**
   * Creates a function, which returns identifiers of chats from a chat folder, suitable for adding to a chat folder invite link.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   */
  explicit getChatsForChatFolderInviteLink(int32 chat_folder_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1873561929;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChatsForChatFolderInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canPostStory before actually trying to post a story there.
 *
 * Returns object_ptr<Chats>.
 */
class getChatsToPostStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canPostStory before actually trying to post a story there.
   *
   * Returns object_ptr<Chats>.
   */
  getChatsToPostStories();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1893901427;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getChatsToPostStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class users;

/**
 * Returns all close friends of the current user.
 *
 * Returns object_ptr<Users>.
 */
class getCloseFriends final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns all close friends of the current user.
   *
   * Returns object_ptr<Users>.
   */
  getCloseFriends();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1445628722;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<users>;

  static object_ptr<getCloseFriends> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CollectibleItemType;

class collectibleItemInfo;

/**
 * Returns information about a given collectible item that was purchased at https://fragment.com.
 *
 * Returns object_ptr<CollectibleItemInfo>.
 */
class getCollectibleItemInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the collectible item. The item must be used by a user and must be visible to the current user.
  object_ptr<CollectibleItemType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which returns information about a given collectible item that was purchased at https://fragment.com.
   *
   * Returns object_ptr<CollectibleItemInfo>.
   */
  getCollectibleItemInfo();

  /**
   * Creates a function, which returns information about a given collectible item that was purchased at https://fragment.com.
   *
   * Returns object_ptr<CollectibleItemInfo>.
   *
   * \param[in] type_ Type of the collectible item. The item must be used by a user and must be visible to the current user.
   */
  explicit getCollectibleItemInfo(object_ptr<CollectibleItemType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -217797238;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<collectibleItemInfo>;

  static object_ptr<getCollectibleItemInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BotCommandScope;

class botCommands;

/**
 * Returns the list of commands supported by the bot for the given user scope and language; for bots only.
 *
 * Returns object_ptr<BotCommands>.
 */
class getCommands final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The scope to which the commands are relevant; pass null to get commands in the default bot command scope.
  object_ptr<BotCommandScope> scope_;
  static jfieldID scope_fieldID;
  /// A two-letter ISO 639-1 language code or an empty string.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which returns the list of commands supported by the bot for the given user scope and language; for bots only.
   *
   * Returns object_ptr<BotCommands>.
   */
  getCommands();

  /**
   * Creates a function, which returns the list of commands supported by the bot for the given user scope and language; for bots only.
   *
   * Returns object_ptr<BotCommands>.
   *
   * \param[in] scope_ The scope to which the commands are relevant; pass null to get commands in the default bot command scope.
   * \param[in] language_code_ A two-letter ISO 639-1 language code or an empty string.
   */
  getCommands(object_ptr<BotCommandScope> &&scope_, string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1488621559;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botCommands>;

  static object_ptr<getCommands> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AffiliateType;

class connectedAffiliateProgram;

/**
 * Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program.
 *
 * Returns object_ptr<ConnectedAffiliateProgram>.
 */
class getConnectedAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The affiliate to which the affiliate program will be connected.
  object_ptr<AffiliateType> affiliate_;
  static jfieldID affiliate_fieldID;
  /// Identifier of the bot that created the program.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program.
   *
   * Returns object_ptr<ConnectedAffiliateProgram>.
   */
  getConnectedAffiliateProgram();

  /**
   * Creates a function, which returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program.
   *
   * Returns object_ptr<ConnectedAffiliateProgram>.
   *
   * \param[in] affiliate_ The affiliate to which the affiliate program will be connected.
   * \param[in] bot_user_id_ Identifier of the bot that created the program.
   */
  getConnectedAffiliateProgram(object_ptr<AffiliateType> &&affiliate_, int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1755191440;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<connectedAffiliateProgram>;

  static object_ptr<getConnectedAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AffiliateType;

class connectedAffiliatePrograms;

/**
 * Returns affiliate programs that were connected to the given affiliate.
 *
 * Returns object_ptr<ConnectedAffiliatePrograms>.
 */
class getConnectedAffiliatePrograms final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The affiliate to which the affiliate program were connected.
  object_ptr<AffiliateType> affiliate_;
  static jfieldID affiliate_fieldID;
  /// Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of affiliate programs to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns affiliate programs that were connected to the given affiliate.
   *
   * Returns object_ptr<ConnectedAffiliatePrograms>.
   */
  getConnectedAffiliatePrograms();

  /**
   * Creates a function, which returns affiliate programs that were connected to the given affiliate.
   *
   * Returns object_ptr<ConnectedAffiliatePrograms>.
   *
   * \param[in] affiliate_ The affiliate to which the affiliate program were connected.
   * \param[in] offset_ Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of affiliate programs to return.
   */
  getConnectedAffiliatePrograms(object_ptr<AffiliateType> &&affiliate_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1960029582;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<connectedAffiliatePrograms>;

  static object_ptr<getConnectedAffiliatePrograms> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class connectedWebsites;

/**
 * Returns all website where the current user used Telegram to log in.
 *
 * Returns object_ptr<ConnectedWebsites>.
 */
class getConnectedWebsites final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns all website where the current user used Telegram to log in.
   *
   * Returns object_ptr<ConnectedWebsites>.
   */
  getConnectedWebsites();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -170536110;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<connectedWebsites>;

  static object_ptr<getConnectedWebsites> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class users;

/**
 * Returns all contacts of the user.
 *
 * Returns object_ptr<Users>.
 */
class getContacts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns all contacts of the user.
   *
   * Returns object_ptr<Users>.
   */
  getContacts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1417722768;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<users>;

  static object_ptr<getContacts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class countries;

/**
 * Returns information about existing countries. Can be called before authorization.
 *
 * Returns object_ptr<Countries>.
 */
class getCountries final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns information about existing countries. Can be called before authorization.
   *
   * Returns object_ptr<Countries>.
   */
  getCountries();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -51902050;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<countries>;

  static object_ptr<getCountries> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization.
 *
 * Returns object_ptr<Text>.
 */
class getCountryCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization.
   *
   * Returns object_ptr<Text>.
   */
  getCountryCode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1540593906;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getCountryCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously.
 *
 * Returns object_ptr<Text>.
 */
class getCountryFlagEmoji final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 3166-1 alpha-2 country code as received from getCountries.
  string country_code_;
  static jfieldID country_code_fieldID;

  /**
   * Default constructor for a function, which returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   */
  getCountryFlagEmoji();

  /**
   * Creates a function, which returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code as received from getCountries.
   */
  explicit getCountryFlagEmoji(string const &country_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 981871098;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getCountryFlagEmoji> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PublicChatType;

class chats;

/**
 * Returns a list of public chats of the specified type, owned by the user.
 *
 * Returns object_ptr<Chats>.
 */
class getCreatedPublicChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the public chats to return.
  object_ptr<PublicChatType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which returns a list of public chats of the specified type, owned by the user.
   *
   * Returns object_ptr<Chats>.
   */
  getCreatedPublicChats();

  /**
   * Creates a function, which returns a list of public chats of the specified type, owned by the user.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] type_ Type of the public chats to return.
   */
  explicit getCreatedPublicChats(object_ptr<PublicChatType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 710354415;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getCreatedPublicChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class updates;

/**
 * Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization.
 *
 * Returns object_ptr<Updates>.
 */
class getCurrentState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization.
   *
   * Returns object_ptr<Updates>.
   */
  getCurrentState();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1191417719;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<updates>;

  static object_ptr<getCurrentState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class currentWeather;

class location;

/**
 * Returns the current weather in the given location.
 *
 * Returns object_ptr<CurrentWeather>.
 */
class getCurrentWeather final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The location.
  object_ptr<location> location_;
  static jfieldID location_fieldID;

  /**
   * Default constructor for a function, which returns the current weather in the given location.
   *
   * Returns object_ptr<CurrentWeather>.
   */
  getCurrentWeather();

  /**
   * Creates a function, which returns the current weather in the given location.
   *
   * Returns object_ptr<CurrentWeather>.
   *
   * \param[in] location_ The location.
   */
  explicit getCurrentWeather(object_ptr<location> &&location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1965384759;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<currentWeather>;

  static object_ptr<getCurrentWeather> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns TGS stickers with generic animations for custom emoji reactions.
 *
 * Returns object_ptr<Stickers>.
 */
class getCustomEmojiReactionAnimations final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns TGS stickers with generic animations for custom emoji reactions.
   *
   * Returns object_ptr<Stickers>.
   */
  getCustomEmojiReactionAnimations();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1232375250;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getCustomEmojiReactionAnimations> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns the list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned.
 *
 * Returns object_ptr<Stickers>.
 */
class getCustomEmojiStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of custom emoji stickers. At most 200 custom emoji stickers can be received simultaneously.
  array<int64> custom_emoji_ids_;
  static jfieldID custom_emoji_ids_fieldID;

  /**
   * Default constructor for a function, which returns the list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned.
   *
   * Returns object_ptr<Stickers>.
   */
  getCustomEmojiStickers();

  /**
   * Creates a function, which returns the list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned.
   *
   * Returns object_ptr<Stickers>.
   *
   * \param[in] custom_emoji_ids_ Identifiers of custom emoji stickers. At most 200 custom emoji stickers can be received simultaneously.
   */
  explicit getCustomEmojiStickers(array<int64> &&custom_emoji_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2127427955;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getCustomEmojiStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class databaseStatistics;

/**
 * Returns database statistics.
 *
 * Returns object_ptr<DatabaseStatistics>.
 */
class getDatabaseStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns database statistics.
   *
   * Returns object_ptr<DatabaseStatistics>.
   */
  getDatabaseStatistics();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1942760263;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<databaseStatistics>;

  static object_ptr<getDatabaseStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class deepLinkInfo;

/**
 * Returns information about a tg:// deep link. Use &quot;<a href="tg://need_update_for_some_feature">tg://need_update_for_some_feature</a>&quot; or &quot;tg:some_unsupported_feature&quot; for testing. Returns a 404 error for unknown links. Can be called before authorization.
 *
 * Returns object_ptr<DeepLinkInfo>.
 */
class getDeepLinkInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link.
  string link_;
  static jfieldID link_fieldID;

  /**
   * Default constructor for a function, which returns information about a tg:// deep link. Use &quot;<a href="tg://need_update_for_some_feature">tg://need_update_for_some_feature</a>&quot; or &quot;tg:some_unsupported_feature&quot; for testing. Returns a 404 error for unknown links. Can be called before authorization.
   *
   * Returns object_ptr<DeepLinkInfo>.
   */
  getDeepLinkInfo();

  /**
   * Creates a function, which returns information about a tg:// deep link. Use &quot;<a href="tg://need_update_for_some_feature">tg://need_update_for_some_feature</a>&quot; or &quot;tg:some_unsupported_feature&quot; for testing. Returns a 404 error for unknown links. Can be called before authorization.
   *
   * Returns object_ptr<DeepLinkInfo>.
   *
   * \param[in] link_ The link.
   */
  explicit getDeepLinkInfo(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 680673150;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<deepLinkInfo>;

  static object_ptr<getDeepLinkInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns default list of custom emoji stickers for reply background.
 *
 * Returns object_ptr<Stickers>.
 */
class getDefaultBackgroundCustomEmojiStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns default list of custom emoji stickers for reply background.
   *
   * Returns object_ptr<Stickers>.
   */
  getDefaultBackgroundCustomEmojiStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 485910542;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getDefaultBackgroundCustomEmojiStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatusCustomEmojis;

/**
 * Returns default emoji statuses for chats.
 *
 * Returns object_ptr<EmojiStatusCustomEmojis>.
 */
class getDefaultChatEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns default emoji statuses for chats.
   *
   * Returns object_ptr<EmojiStatusCustomEmojis>.
   */
  getDefaultChatEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1553698018;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatusCustomEmojis>;

  static object_ptr<getDefaultChatEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns default list of custom emoji stickers for placing on a chat photo.
 *
 * Returns object_ptr<Stickers>.
 */
class getDefaultChatPhotoCustomEmojiStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns default list of custom emoji stickers for placing on a chat photo.
   *
   * Returns object_ptr<Stickers>.
   */
  getDefaultChatPhotoCustomEmojiStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -376342683;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getDefaultChatPhotoCustomEmojiStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatusCustomEmojis;

/**
 * Returns default emoji statuses for self status.
 *
 * Returns object_ptr<EmojiStatusCustomEmojis>.
 */
class getDefaultEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns default emoji statuses for self status.
   *
   * Returns object_ptr<EmojiStatusCustomEmojis>.
   */
  getDefaultEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -539392025;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatusCustomEmojis>;

  static object_ptr<getDefaultEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageAutoDeleteTime;

/**
 * Returns default message auto-delete time setting for new chats.
 *
 * Returns object_ptr<MessageAutoDeleteTime>.
 */
class getDefaultMessageAutoDeleteTime final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns default message auto-delete time setting for new chats.
   *
   * Returns object_ptr<MessageAutoDeleteTime>.
   */
  getDefaultMessageAutoDeleteTime();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -450857574;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageAutoDeleteTime>;

  static object_ptr<getDefaultMessageAutoDeleteTime> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns default list of custom emoji stickers for placing on a profile photo.
 *
 * Returns object_ptr<Stickers>.
 */
class getDefaultProfilePhotoCustomEmojiStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns default list of custom emoji stickers for placing on a profile photo.
   *
   * Returns object_ptr<Stickers>.
   */
  getDefaultProfilePhotoCustomEmojiStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1280041655;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getDefaultProfilePhotoCustomEmojiStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class directMessagesChatTopic;

/**
 * Returns information about the topic in a channel direct messages chat administered by the current user.
 *
 * Returns object_ptr<DirectMessagesChatTopic>.
 */
class getDirectMessagesChatTopic final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic to get.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Default constructor for a function, which returns information about the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<DirectMessagesChatTopic>.
   */
  getDirectMessagesChatTopic();

  /**
   * Creates a function, which returns information about the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<DirectMessagesChatTopic>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] topic_id_ Identifier of the topic to get.
   */
  getDirectMessagesChatTopic(int53 chat_id_, int53 topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1990530052;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<directMessagesChatTopic>;

  static object_ptr<getDirectMessagesChatTopic> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns messages in the topic in a channel direct messages chat administered by the current user. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
 *
 * Returns object_ptr<Messages>.
 */
class getDirectMessagesChatTopicHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic which messages will be fetched.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;
  /// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns messages in the topic in a channel direct messages chat administered by the current user. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   *
   * Returns object_ptr<Messages>.
   */
  getDirectMessagesChatTopicHistory();

  /**
   * Creates a function, which returns messages in the topic in a channel direct messages chat administered by the current user. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] topic_id_ Identifier of the topic which messages will be fetched.
   * \param[in] from_message_id_ Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   */
  getDirectMessagesChatTopicHistory(int53 chat_id_, int53 topic_id_, int53 from_message_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1035221188;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getDirectMessagesChatTopicHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns the last message sent in the topic in a channel direct messages chat administered by the current user no later than the specified date.
 *
 * Returns object_ptr<Message>.
 */
class getDirectMessagesChatTopicMessageByDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic which messages will be fetched.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;
  /// Point in time (Unix timestamp) relative to which to search for messages.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Default constructor for a function, which returns the last message sent in the topic in a channel direct messages chat administered by the current user no later than the specified date.
   *
   * Returns object_ptr<Message>.
   */
  getDirectMessagesChatTopicMessageByDate();

  /**
   * Creates a function, which returns the last message sent in the topic in a channel direct messages chat administered by the current user no later than the specified date.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] topic_id_ Identifier of the topic which messages will be fetched.
   * \param[in] date_ Point in time (Unix timestamp) relative to which to search for messages.
   */
  getDirectMessagesChatTopicMessageByDate(int53 chat_id_, int53 topic_id_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1837500879;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getDirectMessagesChatTopicMessageByDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starCount;

/**
 * Returns the total number of Telegram Stars received by the channel chat for direct messages from the given topic.
 *
 * Returns object_ptr<StarCount>.
 */
class getDirectMessagesChatTopicRevenue final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat administered by the current user.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Default constructor for a function, which returns the total number of Telegram Stars received by the channel chat for direct messages from the given topic.
   *
   * Returns object_ptr<StarCount>.
   */
  getDirectMessagesChatTopicRevenue();

  /**
   * Creates a function, which returns the total number of Telegram Stars received by the channel chat for direct messages from the given topic.
   *
   * Returns object_ptr<StarCount>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat administered by the current user.
   * \param[in] topic_id_ Identifier of the topic.
   */
  getDirectMessagesChatTopicRevenue(int53 chat_id_, int53 topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -792382961;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starCount>;

  static object_ptr<getDirectMessagesChatTopicRevenue> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatusCustomEmojis;

/**
 * Returns the list of emoji statuses, which can't be used as chat emoji status, even if they are from a sticker set with is_allowed_as_chat_emoji_status == true.
 *
 * Returns object_ptr<EmojiStatusCustomEmojis>.
 */
class getDisallowedChatEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of emoji statuses, which can't be used as chat emoji status, even if they are from a sticker set with is_allowed_as_chat_emoji_status == true.
   *
   * Returns object_ptr<EmojiStatusCustomEmojis>.
   */
  getDisallowedChatEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2004787831;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatusCustomEmojis>;

  static object_ptr<getDisallowedChatEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class EmojiCategoryType;

class emojiCategories;

/**
 * Returns available emoji categories.
 *
 * Returns object_ptr<EmojiCategories>.
 */
class getEmojiCategories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of emoji categories to return; pass null to get default emoji categories.
  object_ptr<EmojiCategoryType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which returns available emoji categories.
   *
   * Returns object_ptr<EmojiCategories>.
   */
  getEmojiCategories();

  /**
   * Creates a function, which returns available emoji categories.
   *
   * Returns object_ptr<EmojiCategories>.
   *
   * \param[in] type_ Type of emoji categories to return; pass null to get default emoji categories.
   */
  explicit getEmojiCategories(object_ptr<EmojiCategoryType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2139537774;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiCategories>;

  static object_ptr<getEmojiCategories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiReaction;

/**
 * Returns information about an emoji reaction. Returns a 404 error if the reaction is not found.
 *
 * Returns object_ptr<EmojiReaction>.
 */
class getEmojiReaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text representation of the reaction.
  string emoji_;
  static jfieldID emoji_fieldID;

  /**
   * Default constructor for a function, which returns information about an emoji reaction. Returns a 404 error if the reaction is not found.
   *
   * Returns object_ptr<EmojiReaction>.
   */
  getEmojiReaction();

  /**
   * Creates a function, which returns information about an emoji reaction. Returns a 404 error if the reaction is not found.
   *
   * Returns object_ptr<EmojiReaction>.
   *
   * \param[in] emoji_ Text representation of the reaction.
   */
  explicit getEmojiReaction(string const &emoji_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -449572388;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiReaction>;

  static object_ptr<getEmojiReaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getEmojiSuggestionsUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Language code for which the emoji replacements will be suggested.
  string language_code_;
  static jfieldID language_code_fieldID;

  /**
   * Default constructor for a function, which returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getEmojiSuggestionsUrl();

  /**
   * Creates a function, which returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] language_code_ Language code for which the emoji replacements will be suggested.
   */
  explicit getEmojiSuggestionsUrl(string const &language_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1404101841;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getEmojiSuggestionsUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getExternalLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The HTTP link.
  string link_;
  static jfieldID link_fieldID;
  /// Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to send them messages.
  bool allow_write_access_;
  static jfieldID allow_write_access_fieldID;

  /**
   * Default constructor for a function, which returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getExternalLink();

  /**
   * Creates a function, which returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. May return an empty link if just a toast about successful login has to be shown.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] link_ The HTTP link.
   * \param[in] allow_write_access_ Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to send them messages.
   */
  getExternalLink(string const &link_, bool allow_write_access_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1586688235;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getExternalLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class LoginUrlInfo;

/**
 * Returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if link preview is disabled in secret chats.
 *
 * Returns object_ptr<LoginUrlInfo>.
 */
class getExternalLinkInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link.
  string link_;
  static jfieldID link_fieldID;

  /**
   * Default constructor for a function, which returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if link preview is disabled in secret chats.
   *
   * Returns object_ptr<LoginUrlInfo>.
   */
  getExternalLinkInfo();

  /**
   * Creates a function, which returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if link preview is disabled in secret chats.
   *
   * Returns object_ptr<LoginUrlInfo>.
   *
   * \param[in] link_ The link.
   */
  explicit getExternalLinkInfo(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1175288383;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<LoginUrlInfo>;

  static object_ptr<getExternalLinkInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns favorite stickers.
 *
 * Returns object_ptr<Stickers>.
 */
class getFavoriteStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns favorite stickers.
   *
   * Returns object_ptr<Stickers>.
   */
  getFavoriteStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -338964672;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getFavoriteStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class file;

/**
 * Returns information about a file. This is an offline method.
 *
 * Returns object_ptr<File>.
 */
class getFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file to get.
  int32 file_id_;
  static jfieldID file_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a file. This is an offline method.
   *
   * Returns object_ptr<File>.
   */
  getFile();

  /**
   * Creates a function, which returns information about a file. This is an offline method.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] file_id_ Identifier of the file to get.
   */
  explicit getFile(int32 file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1553923406;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<getFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class fileDownloadedPrefixSize;

/**
 * Returns file downloaded prefix size from a given offset, in bytes.
 *
 * Returns object_ptr<FileDownloadedPrefixSize>.
 */
class getFileDownloadedPrefixSize final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Offset from which downloaded prefix size needs to be calculated.
  int53 offset_;
  static jfieldID offset_fieldID;

  /**
   * Default constructor for a function, which returns file downloaded prefix size from a given offset, in bytes.
   *
   * Returns object_ptr<FileDownloadedPrefixSize>.
   */
  getFileDownloadedPrefixSize();

  /**
   * Creates a function, which returns file downloaded prefix size from a given offset, in bytes.
   *
   * Returns object_ptr<FileDownloadedPrefixSize>.
   *
   * \param[in] file_id_ Identifier of the file.
   * \param[in] offset_ Offset from which downloaded prefix size needs to be calculated.
   */
  getFileDownloadedPrefixSize(int32 file_id_, int53 offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 855948589;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<fileDownloadedPrefixSize>;

  static object_ptr<getFileDownloadedPrefixSize> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.
 *
 * Returns object_ptr<Text>.
 */
class getFileExtension final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The MIME type of the file.
  string mime_type_;
  static jfieldID mime_type_fieldID;

  /**
   * Default constructor for a function, which returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   */
  getFileExtension();

  /**
   * Creates a function, which returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] mime_type_ The MIME type of the file.
   */
  explicit getFileExtension(string const &mime_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -106055372;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getFileExtension> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.
 *
 * Returns object_ptr<Text>.
 */
class getFileMimeType final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The name of the file or path to the file.
  string file_name_;
  static jfieldID file_name_fieldID;

  /**
   * Default constructor for a function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   */
  getFileMimeType();

  /**
   * Creates a function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] file_name_ The name of the file or path to the file.
   */
  explicit getFileMimeType(string const &file_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2073879671;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getFileMimeType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class forumTopic;

/**
 * Returns information about a topic in a forum supergroup chat or a chat with a bot with topics.
 *
 * Returns object_ptr<ForumTopic>.
 */
class getForumTopic final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a topic in a forum supergroup chat or a chat with a bot with topics.
   *
   * Returns object_ptr<ForumTopic>.
   */
  getForumTopic();

  /**
   * Creates a function, which returns information about a topic in a forum supergroup chat or a chat with a bot with topics.
   *
   * Returns object_ptr<ForumTopic>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] forum_topic_id_ Forum topic identifier.
   */
  getForumTopic(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1931459984;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<forumTopic>;

  static object_ptr<getForumTopic> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns the list of custom emoji, which can be used as forum topic icon by all users.
 *
 * Returns object_ptr<Stickers>.
 */
class getForumTopicDefaultIcons final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of custom emoji, which can be used as forum topic icon by all users.
   *
   * Returns object_ptr<Stickers>.
   */
  getForumTopicDefaultIcons();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1479898332;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getForumTopicDefaultIcons> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns messages in a topic in a forum supergroup chat or a chat with a bot with topics. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
 *
 * Returns object_ptr<Messages>.
 */
class getForumTopicHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns messages in a topic in a forum supergroup chat or a chat with a bot with topics. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<Messages>.
   */
  getForumTopicHistory();

  /**
   * Creates a function, which returns messages in a topic in a forum supergroup chat or a chat with a bot with topics. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier.
   * \param[in] from_message_id_ Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   */
  getForumTopicHistory(int53 chat_id_, int32 forum_topic_id_, int53 from_message_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -339129791;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getForumTopicHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageLink;

/**
 * Returns an HTTPS link to a topic in a forum supergroup chat. This is an offline method.
 *
 * Returns object_ptr<MessageLink>.
 */
class getForumTopicLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which returns an HTTPS link to a topic in a forum supergroup chat. This is an offline method.
   *
   * Returns object_ptr<MessageLink>.
   */
  getForumTopicLink();

  /**
   * Creates a function, which returns an HTTPS link to a topic in a forum supergroup chat. This is an offline method.
   *
   * Returns object_ptr<MessageLink>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] forum_topic_id_ Forum topic identifier.
   */
  getForumTopicLink(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 330405972;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageLink>;

  static object_ptr<getForumTopicLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class forumTopics;

/**
 * Returns found forum topics in a forum supergroup chat or a chat with a bot with topics. This is a temporary method for getting information about topic list from the server.
 *
 * Returns object_ptr<ForumTopics>.
 */
class getForumTopics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Query to search for in the forum topic's name.
  string query_;
  static jfieldID query_fieldID;
  /// The date starting from which the results need to be fetched. Use 0 or any date in the future to get results from the last topic.
  int32 offset_date_;
  static jfieldID offset_date_fieldID;
  /// The message identifier of the last message in the last found topic, or 0 for the first request.
  int53 offset_message_id_;
  static jfieldID offset_message_id_fieldID;
  /// The forum topic identifier of the last found topic, or 0 for the first request.
  int32 offset_forum_topic_id_;
  static jfieldID offset_forum_topic_id_fieldID;
  /// The maximum number of forum topics to be returned; up to 100. For optimal performance, the number of returned forum topics is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns found forum topics in a forum supergroup chat or a chat with a bot with topics. This is a temporary method for getting information about topic list from the server.
   *
   * Returns object_ptr<ForumTopics>.
   */
  getForumTopics();

  /**
   * Creates a function, which returns found forum topics in a forum supergroup chat or a chat with a bot with topics. This is a temporary method for getting information about topic list from the server.
   *
   * Returns object_ptr<ForumTopics>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] query_ Query to search for in the forum topic's name.
   * \param[in] offset_date_ The date starting from which the results need to be fetched. Use 0 or any date in the future to get results from the last topic.
   * \param[in] offset_message_id_ The message identifier of the last message in the last found topic, or 0 for the first request.
   * \param[in] offset_forum_topic_id_ The forum topic identifier of the last found topic, or 0 for the first request.
   * \param[in] limit_ The maximum number of forum topics to be returned; up to 100. For optimal performance, the number of returned forum topics is chosen by TDLib and can be smaller than the specified limit.
   */
  getForumTopics(int53 chat_id_, string const &query_, int32 offset_date_, int53 offset_message_id_, int32 offset_forum_topic_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1368275676;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<forumTopics>;

  static object_ptr<getForumTopics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class gameHighScores;

/**
 * Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only.
 *
 * Returns object_ptr<GameHighScores>.
 */
class getGameHighScores final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat that contains the message with the game.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only.
   *
   * Returns object_ptr<GameHighScores>.
   */
  getGameHighScores();

  /**
   * Creates a function, which returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only.
   *
   * Returns object_ptr<GameHighScores>.
   *
   * \param[in] chat_id_ The chat that contains the message with the game.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] user_id_ User identifier.
   */
  getGameHighScores(int53 chat_id_, int53 message_id_, int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 15746459;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<gameHighScores>;

  static object_ptr<getGameHighScores> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftAuctionAcquiredGifts;

/**
 * Returns the gifts that were acquired by the current user on a gift auction.
 *
 * Returns object_ptr<GiftAuctionAcquiredGifts>.
 */
class getGiftAuctionAcquiredGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the auctioned gift.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;

  /**
   * Default constructor for a function, which returns the gifts that were acquired by the current user on a gift auction.
   *
   * Returns object_ptr<GiftAuctionAcquiredGifts>.
   */
  getGiftAuctionAcquiredGifts();

  /**
   * Creates a function, which returns the gifts that were acquired by the current user on a gift auction.
   *
   * Returns object_ptr<GiftAuctionAcquiredGifts>.
   *
   * \param[in] gift_id_ Identifier of the auctioned gift.
   */
  explicit getGiftAuctionAcquiredGifts(int64 gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -937975215;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftAuctionAcquiredGifts>;

  static object_ptr<getGiftAuctionAcquiredGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftAuctionState;

/**
 * Returns auction state for a gift.
 *
 * Returns object_ptr<GiftAuctionState>.
 */
class getGiftAuctionState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the auction.
  string auction_id_;
  static jfieldID auction_id_fieldID;

  /**
   * Default constructor for a function, which returns auction state for a gift.
   *
   * Returns object_ptr<GiftAuctionState>.
   */
  getGiftAuctionState();

  /**
   * Creates a function, which returns auction state for a gift.
   *
   * Returns object_ptr<GiftAuctionState>.
   *
   * \param[in] auction_id_ Unique identifier of the auction.
   */
  explicit getGiftAuctionState(string const &auction_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 989210247;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftAuctionState>;

  static object_ptr<getGiftAuctionState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftChatThemes;

/**
 * Returns available to the current user gift chat themes.
 *
 * Returns object_ptr<GiftChatThemes>.
 */
class getGiftChatThemes final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of chat themes to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns available to the current user gift chat themes.
   *
   * Returns object_ptr<GiftChatThemes>.
   */
  getGiftChatThemes();

  /**
   * Creates a function, which returns available to the current user gift chat themes.
   *
   * Returns object_ptr<GiftChatThemes>.
   *
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of chat themes to return.
   */
  getGiftChatThemes(string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1051327876;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftChatThemes>;

  static object_ptr<getGiftChatThemes> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftCollections;

/**
 * Returns collections of gifts owned by the given user or chat.
 *
 * Returns object_ptr<GiftCollections>.
 */
class getGiftCollections final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that received the gifts.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;

  /**
   * Default constructor for a function, which returns collections of gifts owned by the given user or chat.
   *
   * Returns object_ptr<GiftCollections>.
   */
  getGiftCollections();

  /**
   * Creates a function, which returns collections of gifts owned by the given user or chat.
   *
   * Returns object_ptr<GiftCollections>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that received the gifts.
   */
  explicit getGiftCollections(object_ptr<MessageSender> &&owner_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1533138835;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftCollections>;

  static object_ptr<getGiftCollections> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftUpgradePreview;

/**
 * Returns examples of possible upgraded gifts for a regular gift.
 *
 * Returns object_ptr<GiftUpgradePreview>.
 */
class getGiftUpgradePreview final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the regular gift.
  int64 regular_gift_id_;
  static jfieldID regular_gift_id_fieldID;

  /**
   * Default constructor for a function, which returns examples of possible upgraded gifts for a regular gift.
   *
   * Returns object_ptr<GiftUpgradePreview>.
   */
  getGiftUpgradePreview();

  /**
   * Creates a function, which returns examples of possible upgraded gifts for a regular gift.
   *
   * Returns object_ptr<GiftUpgradePreview>.
   *
   * \param[in] regular_gift_id_ Identifier of the regular gift.
   */
  explicit getGiftUpgradePreview(int64 regular_gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1303475628;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftUpgradePreview>;

  static object_ptr<getGiftUpgradePreview> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftsForCrafting;

/**
 * Returns upgraded gifts of the current user who can be used to craft another gifts.
 *
 * Returns object_ptr<GiftsForCrafting>.
 */
class getGiftsForCrafting final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the regular gift that will be used for crafting.
  int64 regular_gift_id_;
  static jfieldID regular_gift_id_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns upgraded gifts of the current user who can be used to craft another gifts.
   *
   * Returns object_ptr<GiftsForCrafting>.
   */
  getGiftsForCrafting();

  /**
   * Creates a function, which returns upgraded gifts of the current user who can be used to craft another gifts.
   *
   * Returns object_ptr<GiftsForCrafting>.
   *
   * \param[in] regular_gift_id_ Identifier of the regular gift that will be used for crafting.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
   */
  getGiftsForCrafting(int64 regular_gift_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1571822730;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftsForCrafting>;

  static object_ptr<getGiftsForCrafting> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GiveawayInfo;

/**
 * Returns information about a giveaway.
 *
 * Returns object_ptr<GiveawayInfo>.
 */
class getGiveawayInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat which started the giveaway.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the giveaway or a giveaway winners message in the chat.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a giveaway.
   *
   * Returns object_ptr<GiveawayInfo>.
   */
  getGiveawayInfo();

  /**
   * Creates a function, which returns information about a giveaway.
   *
   * Returns object_ptr<GiveawayInfo>.
   *
   * \param[in] chat_id_ Identifier of the channel chat which started the giveaway.
   * \param[in] message_id_ Identifier of the giveaway or a giveaway winners message in the chat.
   */
  getGiveawayInfo(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1215852357;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<GiveawayInfo>;

  static object_ptr<getGiveawayInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns greeting stickers from regular sticker sets that can be used for the start page of other users.
 *
 * Returns object_ptr<Stickers>.
 */
class getGreetingStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns greeting stickers from regular sticker sets that can be used for the start page of other users.
   *
   * Returns object_ptr<Stickers>.
   */
  getGreetingStickers();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 374873372;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getGreetingStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundUsers;

/**
 * Returns the most grossing Web App bots.
 *
 * Returns object_ptr<FoundUsers>.
 */
class getGrossingWebAppBots final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of bots to be returned; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the most grossing Web App bots.
   *
   * Returns object_ptr<FoundUsers>.
   */
  getGrossingWebAppBots();

  /**
   * Creates a function, which returns the most grossing Web App bots.
   *
   * Returns object_ptr<FoundUsers>.
   *
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of bots to be returned; up to 100.
   */
  getGrossingWebAppBots(string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1696779802;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundUsers>;

  static object_ptr<getGrossingWebAppBots> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class groupCall;

/**
 * Returns information about a group call.
 *
 * Returns object_ptr<GroupCall>.
 */
class getGroupCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a group call.
   *
   * Returns object_ptr<GroupCall>.
   */
  getGroupCall();

  /**
   * Creates a function, which returns information about a group call.
   *
   * Returns object_ptr<GroupCall>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit getGroupCall(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1468491406;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCall>;

  static object_ptr<getGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputGroupCall;

class groupCallParticipants;

/**
 * Returns information about participants of a non-joined group call that is not bound to a chat.
 *
 * Returns object_ptr<GroupCallParticipants>.
 */
class getGroupCallParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The group call which participants will be returned.
  object_ptr<InputGroupCall> input_group_call_;
  static jfieldID input_group_call_fieldID;
  /// The maximum number of participants to return; must be positive.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns information about participants of a non-joined group call that is not bound to a chat.
   *
   * Returns object_ptr<GroupCallParticipants>.
   */
  getGroupCallParticipants();

  /**
   * Creates a function, which returns information about participants of a non-joined group call that is not bound to a chat.
   *
   * Returns object_ptr<GroupCallParticipants>.
   *
   * \param[in] input_group_call_ The group call which participants will be returned.
   * \param[in] limit_ The maximum number of participants to return; must be positive.
   */
  getGroupCallParticipants(object_ptr<InputGroupCall> &&input_group_call_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1986739394;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCallParticipants>;

  static object_ptr<getGroupCallParticipants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GroupCallVideoQuality;

class data;

/**
 * Returns a file with a segment of a video chat or live story in a modified OGG format for audio or MPEG-4 format for video.
 *
 * Returns object_ptr<Data>.
 */
class getGroupCallStreamSegment final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Point in time when the stream segment begins; Unix timestamp in milliseconds.
  int53 time_offset_;
  static jfieldID time_offset_fieldID;
  /// Segment duration scale; 0-1. Segment's duration is 1000/(2**scale) milliseconds.
  int32 scale_;
  static jfieldID scale_fieldID;
  /// Identifier of an audio/video channel to get as received from tgcalls.
  int32 channel_id_;
  static jfieldID channel_id_fieldID;
  /// Video quality as received from tgcalls; pass null to get the worst available quality.
  object_ptr<GroupCallVideoQuality> video_quality_;
  static jfieldID video_quality_fieldID;

  /**
   * Default constructor for a function, which returns a file with a segment of a video chat or live story in a modified OGG format for audio or MPEG-4 format for video.
   *
   * Returns object_ptr<Data>.
   */
  getGroupCallStreamSegment();

  /**
   * Creates a function, which returns a file with a segment of a video chat or live story in a modified OGG format for audio or MPEG-4 format for video.
   *
   * Returns object_ptr<Data>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] time_offset_ Point in time when the stream segment begins; Unix timestamp in milliseconds.
   * \param[in] scale_ Segment duration scale; 0-1. Segment's duration is 1000/(2**scale) milliseconds.
   * \param[in] channel_id_ Identifier of an audio/video channel to get as received from tgcalls.
   * \param[in] video_quality_ Video quality as received from tgcalls; pass null to get the worst available quality.
   */
  getGroupCallStreamSegment(int32 group_call_id_, int53 time_offset_, int32 scale_, int32 channel_id_, object_ptr<GroupCallVideoQuality> &&video_quality_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -502273424;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<data>;

  static object_ptr<getGroupCallStreamSegment> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class groupCallStreams;

/**
 * Returns information about available streams in a video chat or a live story.
 *
 * Returns object_ptr<GroupCallStreams>.
 */
class getGroupCallStreams final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which returns information about available streams in a video chat or a live story.
   *
   * Returns object_ptr<GroupCallStreams>.
   */
  getGroupCallStreams();

  /**
   * Creates a function, which returns information about available streams in a video chat or a live story.
   *
   * Returns object_ptr<GroupCallStreams>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit getGroupCallStreams(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1619226268;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCallStreams>;

  static object_ptr<getGroupCallStreams> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns a list of common group chats with a given user. Chats are sorted by their type and creation date.
 *
 * Returns object_ptr<Chats>.
 */
class getGroupsInCommon final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Chat identifier starting from which to return chats; use 0 for the first request.
  int53 offset_chat_id_;
  static jfieldID offset_chat_id_fieldID;
  /// The maximum number of chats to be returned; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns a list of common group chats with a given user. Chats are sorted by their type and creation date.
   *
   * Returns object_ptr<Chats>.
   */
  getGroupsInCommon();

  /**
   * Creates a function, which returns a list of common group chats with a given user. Chats are sorted by their type and creation date.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] offset_chat_id_ Chat identifier starting from which to return chats; use 0 for the first request.
   * \param[in] limit_ The maximum number of chats to be returned; up to 100.
   */
  getGroupsInCommon(int53 user_id_, int53 offset_chat_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 381539178;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getGroupsInCommon> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class count;

/**
 * Returns the total number of imported contacts.
 *
 * Returns object_ptr<Count>.
 */
class getImportedContactCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the total number of imported contacts.
   *
   * Returns object_ptr<Count>.
   */
  getImportedContactCount();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -656336346;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<count>;

  static object_ptr<getImportedContactCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error &quot;CHANNELS_TOO_MUCH&quot;. Also, the limit can be increased with Telegram Premium.
 *
 * Returns object_ptr<Chats>.
 */
class getInactiveSupergroupChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error &quot;CHANNELS_TOO_MUCH&quot;. Also, the limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Chats>.
   */
  getInactiveSupergroupChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -657720907;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getInactiveSupergroupChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class gameHighScores;

/**
 * Returns game high scores and some part of the high score table in the range of the specified user; for bots only.
 *
 * Returns object_ptr<GameHighScores>.
 */
class getInlineGameHighScores final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns game high scores and some part of the high score table in the range of the specified user; for bots only.
   *
   * Returns object_ptr<GameHighScores>.
   */
  getInlineGameHighScores();

  /**
   * Creates a function, which returns game high scores and some part of the high score table in the range of the specified user; for bots only.
   *
   * Returns object_ptr<GameHighScores>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] user_id_ User identifier.
   */
  getInlineGameHighScores(string const &inline_message_id_, int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -533107798;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<gameHighScores>;

  static object_ptr<getInlineGameHighScores> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inlineQueryResults;

class location;

/**
 * Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.
 *
 * Returns object_ptr<InlineQueryResults>.
 */
class getInlineQueryResults final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the chat where the query was sent.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Location of the user; pass null if unknown or the bot doesn't need user's location.
  object_ptr<location> user_location_;
  static jfieldID user_location_fieldID;
  /// Text of the query.
  string query_;
  static jfieldID query_fieldID;
  /// Offset of the first entry to return; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;

  /**
   * Default constructor for a function, which sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.
   *
   * Returns object_ptr<InlineQueryResults>.
   */
  getInlineQueryResults();

  /**
   * Creates a function, which sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires.
   *
   * Returns object_ptr<InlineQueryResults>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] chat_id_ Identifier of the chat where the query was sent.
   * \param[in] user_location_ Location of the user; pass null if unknown or the bot doesn't need user's location.
   * \param[in] query_ Text of the query.
   * \param[in] offset_ Offset of the first entry to return; use empty string to get the first chunk of results.
   */
  getInlineQueryResults(int53 bot_user_id_, int53 chat_id_, object_ptr<location> &&user_location_, string const &query_, string const &offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2044524652;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<inlineQueryResults>;

  static object_ptr<getInlineQueryResults> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class backgrounds;

/**
 * Returns backgrounds installed by the user.
 *
 * Returns object_ptr<Backgrounds>.
 */
class getInstalledBackgrounds final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to order returned backgrounds for a dark theme.
  bool for_dark_theme_;
  static jfieldID for_dark_theme_fieldID;

  /**
   * Default constructor for a function, which returns backgrounds installed by the user.
   *
   * Returns object_ptr<Backgrounds>.
   */
  getInstalledBackgrounds();

  /**
   * Creates a function, which returns backgrounds installed by the user.
   *
   * Returns object_ptr<Backgrounds>.
   *
   * \param[in] for_dark_theme_ Pass true to order returned backgrounds for a dark theme.
   */
  explicit getInstalledBackgrounds(bool for_dark_theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1051406241;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<backgrounds>;

  static object_ptr<getInstalledBackgrounds> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class stickerSets;

/**
 * Returns a list of installed sticker sets.
 *
 * Returns object_ptr<StickerSets>.
 */
class getInstalledStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;

  /**
   * Default constructor for a function, which returns a list of installed sticker sets.
   *
   * Returns object_ptr<StickerSets>.
   */
  getInstalledStickerSets();

  /**
   * Creates a function, which returns a list of installed sticker sets.
   *
   * Returns object_ptr<StickerSets>.
   *
   * \param[in] sticker_type_ Type of the sticker sets to return.
   */
  explicit getInstalledStickerSets(object_ptr<StickerType> &&sticker_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1630467830;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSets>;

  static object_ptr<getInstalledStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

class httpUrl;

/**
 * Returns an HTTPS or a tg: link with the given type. Can be called before authorization.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getInternalLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Expected type of the link.
  object_ptr<InternalLinkType> type_;
  static jfieldID type_fieldID;
  /// Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link.
  bool is_http_;
  static jfieldID is_http_fieldID;

  /**
   * Default constructor for a function, which returns an HTTPS or a tg: link with the given type. Can be called before authorization.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getInternalLink();

  /**
   * Creates a function, which returns an HTTPS or a tg: link with the given type. Can be called before authorization.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] type_ Expected type of the link.
   * \param[in] is_http_ Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link.
   */
  getInternalLink(object_ptr<InternalLinkType> &&type_, bool is_http_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 962654640;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getInternalLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InternalLinkType;

/**
 * Returns information about the type of internal link. Returns a 404 error if the link is not internal. Can be called before authorization.
 *
 * Returns object_ptr<InternalLinkType>.
 */
class getInternalLinkType final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The link.
  string link_;
  static jfieldID link_fieldID;

  /**
   * Default constructor for a function, which returns information about the type of internal link. Returns a 404 error if the link is not internal. Can be called before authorization.
   *
   * Returns object_ptr<InternalLinkType>.
   */
  getInternalLinkType();

  /**
   * Creates a function, which returns information about the type of internal link. Returns a 404 error if the link is not internal. Can be called before authorization.
   *
   * Returns object_ptr<InternalLinkType>.
   *
   * \param[in] link_ The link.
   */
  explicit getInternalLinkType(string const &link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1948428535;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<InternalLinkType>;

  static object_ptr<getInternalLinkType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class JsonValue;

class text;

/**
 * Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously.
 *
 * Returns object_ptr<Text>.
 */
class getJsonString final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The JsonValue object.
  object_ptr<JsonValue> json_value_;
  static jfieldID json_value_fieldID;

  /**
   * Default constructor for a function, which converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   */
  getJsonString();

  /**
   * Creates a function, which converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] json_value_ The JsonValue object.
   */
  explicit getJsonString(object_ptr<JsonValue> &&json_value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 663458849;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getJsonString> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class JsonValue;

/**
 * Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously.
 *
 * Returns object_ptr<JsonValue>.
 */
class getJsonValue final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The JSON-serialized string.
  string json_;
  static jfieldID json_fieldID;

  /**
   * Default constructor for a function, which converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously.
   *
   * Returns object_ptr<JsonValue>.
   */
  getJsonValue();

  /**
   * Creates a function, which converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously.
   *
   * Returns object_ptr<JsonValue>.
   *
   * \param[in] json_ The JSON-serialized string.
   */
  explicit getJsonValue(string const &json_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1829086715;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<JsonValue>;

  static object_ptr<getJsonValue> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojis;

/**
 * Returns emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified.
 *
 * Returns object_ptr<Emojis>.
 */
class getKeywordEmojis final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text to search for.
  string text_;
  static jfieldID text_fieldID;
  /// List of possible IETF language tags of the user's input language; may be empty if unknown.
  array<string> input_language_codes_;
  static jfieldID input_language_codes_fieldID;

  /**
   * Default constructor for a function, which returns emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified.
   *
   * Returns object_ptr<Emojis>.
   */
  getKeywordEmojis();

  /**
   * Creates a function, which returns emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified.
   *
   * Returns object_ptr<Emojis>.
   *
   * \param[in] text_ Text to search for.
   * \param[in] input_language_codes_ List of possible IETF language tags of the user's input language; may be empty if unknown.
   */
  getKeywordEmojis(string const &text_, array<string> &&input_language_codes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1969795990;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojis>;

  static object_ptr<getKeywordEmojis> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class languagePackInfo;

/**
 * Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization.
 *
 * Returns object_ptr<LanguagePackInfo>.
 */
class getLanguagePackInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Language pack identifier.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization.
   *
   * Returns object_ptr<LanguagePackInfo>.
   */
  getLanguagePackInfo();

  /**
   * Creates a function, which returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization.
   *
   * Returns object_ptr<LanguagePackInfo>.
   *
   * \param[in] language_pack_id_ Language pack identifier.
   */
  explicit getLanguagePackInfo(string const &language_pack_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2077809320;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<languagePackInfo>;

  static object_ptr<getLanguagePackInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class LanguagePackStringValue;

/**
 * Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously.
 *
 * Returns object_ptr<LanguagePackStringValue>.
 */
class getLanguagePackString final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Path to the language pack database in which strings are stored.
  string language_pack_database_path_;
  static jfieldID language_pack_database_path_fieldID;
  /// Localization target to which the language pack belongs.
  string localization_target_;
  static jfieldID localization_target_fieldID;
  /// Language pack identifier.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;
  /// Language pack key of the string to be returned.
  string key_;
  static jfieldID key_fieldID;

  /**
   * Default constructor for a function, which returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously.
   *
   * Returns object_ptr<LanguagePackStringValue>.
   */
  getLanguagePackString();

  /**
   * Creates a function, which returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously.
   *
   * Returns object_ptr<LanguagePackStringValue>.
   *
   * \param[in] language_pack_database_path_ Path to the language pack database in which strings are stored.
   * \param[in] localization_target_ Localization target to which the language pack belongs.
   * \param[in] language_pack_id_ Language pack identifier.
   * \param[in] key_ Language pack key of the string to be returned.
   */
  getLanguagePackString(string const &language_pack_database_path_, string const &localization_target_, string const &language_pack_id_, string const &key_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 150789747;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<LanguagePackStringValue>;

  static object_ptr<getLanguagePackString> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class languagePackStrings;

/**
 * Returns strings from a language pack in the current localization target by their keys. Can be called before authorization.
 *
 * Returns object_ptr<LanguagePackStrings>.
 */
class getLanguagePackStrings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Language pack identifier of the strings to be returned.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;
  /// Language pack keys of the strings to be returned; leave empty to request all available strings.
  array<string> keys_;
  static jfieldID keys_fieldID;

  /**
   * Default constructor for a function, which returns strings from a language pack in the current localization target by their keys. Can be called before authorization.
   *
   * Returns object_ptr<LanguagePackStrings>.
   */
  getLanguagePackStrings();

  /**
   * Creates a function, which returns strings from a language pack in the current localization target by their keys. Can be called before authorization.
   *
   * Returns object_ptr<LanguagePackStrings>.
   *
   * \param[in] language_pack_id_ Language pack identifier of the strings to be returned.
   * \param[in] keys_ Language pack keys of the strings to be returned; leave empty to request all available strings.
   */
  getLanguagePackStrings(string const &language_pack_id_, array<string> &&keys_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1246259088;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<languagePackStrings>;

  static object_ptr<getLanguagePackStrings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class linkPreview;

class linkPreviewOptions;

/**
 * Returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.
 *
 * Returns object_ptr<LinkPreview>.
 */
class getLinkPreview final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Message text with formatting.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Options to be used for generation of the link preview; pass null to use default link preview options.
  object_ptr<linkPreviewOptions> link_preview_options_;
  static jfieldID link_preview_options_fieldID;

  /**
   * Default constructor for a function, which returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.
   *
   * Returns object_ptr<LinkPreview>.
   */
  getLinkPreview();

  /**
   * Creates a function, which returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.
   *
   * Returns object_ptr<LinkPreview>.
   *
   * \param[in] text_ Message text with formatting.
   * \param[in] link_preview_options_ Options to be used for generation of the link preview; pass null to use default link preview options.
   */
  getLinkPreview(object_ptr<formattedText> &&text_, object_ptr<linkPreviewOptions> &&link_preview_options_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1039572191;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<linkPreview>;

  static object_ptr<getLinkPreview> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatMessageSenders;

/**
 * Returns the list of message sender identifiers, on whose behalf messages can be sent to a live story.
 *
 * Returns object_ptr<ChatMessageSenders>.
 */
class getLiveStoryAvailableMessageSenders final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of message sender identifiers, on whose behalf messages can be sent to a live story.
   *
   * Returns object_ptr<ChatMessageSenders>.
   */
  getLiveStoryAvailableMessageSenders();

  /**
   * Creates a function, which returns the list of message sender identifiers, on whose behalf messages can be sent to a live story.
   *
   * Returns object_ptr<ChatMessageSenders>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit getLiveStoryAvailableMessageSenders(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1252390532;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatMessageSenders>;

  static object_ptr<getLiveStoryAvailableMessageSenders> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class rtmpUrl;

/**
 * Returns RTMP URL for streaming to a live story; requires can_post_stories administrator right for channel chats.
 *
 * Returns object_ptr<RtmpUrl>.
 */
class getLiveStoryRtmpUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns RTMP URL for streaming to a live story; requires can_post_stories administrator right for channel chats.
   *
   * Returns object_ptr<RtmpUrl>.
   */
  getLiveStoryRtmpUrl();

  /**
   * Creates a function, which returns RTMP URL for streaming to a live story; requires can_post_stories administrator right for channel chats.
   *
   * Returns object_ptr<RtmpUrl>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getLiveStoryRtmpUrl(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1267168178;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<rtmpUrl>;

  static object_ptr<getLiveStoryRtmpUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class groupCallParticipant;

/**
 * Returns information about the user or the chat that streams to a live story; for live stories that aren't an RTMP stream only.
 *
 * Returns object_ptr<GroupCallParticipant>.
 */
class getLiveStoryStreamer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which returns information about the user or the chat that streams to a live story; for live stories that aren't an RTMP stream only.
   *
   * Returns object_ptr<GroupCallParticipant>.
   */
  getLiveStoryStreamer();

  /**
   * Creates a function, which returns information about the user or the chat that streams to a live story; for live stories that aren't an RTMP stream only.
   *
   * Returns object_ptr<GroupCallParticipant>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit getLiveStoryStreamer(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -718164721;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCallParticipant>;

  static object_ptr<getLiveStoryStreamer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class liveStoryDonors;

/**
 * Returns the list of top live story donors.
 *
 * Returns object_ptr<LiveStoryDonors>.
 */
class getLiveStoryTopDonors final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier of the live story.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of top live story donors.
   *
   * Returns object_ptr<LiveStoryDonors>.
   */
  getLiveStoryTopDonors();

  /**
   * Creates a function, which returns the list of top live story donors.
   *
   * Returns object_ptr<LiveStoryDonors>.
   *
   * \param[in] group_call_id_ Group call identifier of the live story.
   */
  explicit getLiveStoryTopDonors(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -700264064;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<liveStoryDonors>;

  static object_ptr<getLiveStoryTopDonors> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class localizationTargetInfo;

/**
 * Returns information about the current localization target. This is an offline method if only_local is true. Can be called before authorization.
 *
 * Returns object_ptr<LocalizationTargetInfo>.
 */
class getLocalizationTargetInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;
  static jfieldID only_local_fieldID;

  /**
   * Default constructor for a function, which returns information about the current localization target. This is an offline method if only_local is true. Can be called before authorization.
   *
   * Returns object_ptr<LocalizationTargetInfo>.
   */
  getLocalizationTargetInfo();

  /**
   * Creates a function, which returns information about the current localization target. This is an offline method if only_local is true. Can be called before authorization.
   *
   * Returns object_ptr<LocalizationTargetInfo>.
   *
   * \param[in] only_local_ Pass true to get only locally available information without sending network requests.
   */
  explicit getLocalizationTargetInfo(bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1849499526;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<localizationTargetInfo>;

  static object_ptr<getLocalizationTargetInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class LogStream;

/**
 * Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously.
 *
 * Returns object_ptr<LogStream>.
 */
class getLogStream final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns information about currently used log stream for internal logging of TDLib. Can be called synchronously.
   *
   * Returns object_ptr<LogStream>.
   */
  getLogStream();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1167608667;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<LogStream>;

  static object_ptr<getLogStream> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class logVerbosityLevel;

/**
 * Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously.
 *
 * Returns object_ptr<LogVerbosityLevel>.
 */
class getLogTagVerbosityLevel final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Logging tag to change verbosity level.
  string tag_;
  static jfieldID tag_fieldID;

  /**
   * Default constructor for a function, which returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously.
   *
   * Returns object_ptr<LogVerbosityLevel>.
   */
  getLogTagVerbosityLevel();

  /**
   * Creates a function, which returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously.
   *
   * Returns object_ptr<LogVerbosityLevel>.
   *
   * \param[in] tag_ Logging tag to change verbosity level.
   */
  explicit getLogTagVerbosityLevel(string const &tag_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 951004547;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<logVerbosityLevel>;

  static object_ptr<getLogTagVerbosityLevel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class logTags;

/**
 * Returns the list of available TDLib internal log tags, for example, [&quot;actor&quot;, &quot;binlog&quot;, &quot;connections&quot;, &quot;notifications&quot;, &quot;proxy&quot;]. Can be called synchronously.
 *
 * Returns object_ptr<LogTags>.
 */
class getLogTags final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of available TDLib internal log tags, for example, [&quot;actor&quot;, &quot;binlog&quot;, &quot;connections&quot;, &quot;notifications&quot;, &quot;proxy&quot;]. Can be called synchronously.
   *
   * Returns object_ptr<LogTags>.
   */
  getLogTags();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -254449190;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<logTags>;

  static object_ptr<getLogTags> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class logVerbosityLevel;

/**
 * Returns current verbosity level of the internal logging of TDLib. Can be called synchronously.
 *
 * Returns object_ptr<LogVerbosityLevel>.
 */
class getLogVerbosityLevel final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns current verbosity level of the internal logging of TDLib. Can be called synchronously.
   *
   * Returns object_ptr<LogVerbosityLevel>.
   */
  getLogVerbosityLevel();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 594057956;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<logVerbosityLevel>;

  static object_ptr<getLogVerbosityLevel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passkeys;

/**
 * Returns the list of passkeys allowed to be used for the login by the current user.
 *
 * Returns object_ptr<Passkeys>.
 */
class getLoginPasskeys final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of passkeys allowed to be used for the login by the current user.
   *
   * Returns object_ptr<Passkeys>.
   */
  getLoginPasskeys();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -165927873;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passkeys>;

  static object_ptr<getLoginPasskeys> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getLoginUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message with the button.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier of the message with the button.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Button identifier.
  int53 button_id_;
  static jfieldID button_id_fieldID;
  /// Pass true to allow the bot to send messages to the current user. Phone number access can't be requested using the button.
  bool allow_write_access_;
  static jfieldID allow_write_access_fieldID;

  /**
   * Default constructor for a function, which returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getLoginUrl();

  /**
   * Creates a function, which returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] chat_id_ Chat identifier of the message with the button.
   * \param[in] message_id_ Message identifier of the message with the button.
   * \param[in] button_id_ Button identifier.
   * \param[in] allow_write_access_ Pass true to allow the bot to send messages to the current user. Phone number access can't be requested using the button.
   */
  getLoginUrl(int53 chat_id_, int53 message_id_, int53 button_id_, bool allow_write_access_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 791844305;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getLoginUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class LoginUrlInfo;

/**
 * Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button.
 *
 * Returns object_ptr<LoginUrlInfo>.
 */
class getLoginUrlInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message with the button.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier of the message with the button. The message must not be scheduled.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Button identifier.
  int53 button_id_;
  static jfieldID button_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button.
   *
   * Returns object_ptr<LoginUrlInfo>.
   */
  getLoginUrlInfo();

  /**
   * Creates a function, which returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button.
   *
   * Returns object_ptr<LoginUrlInfo>.
   *
   * \param[in] chat_id_ Chat identifier of the message with the button.
   * \param[in] message_id_ Message identifier of the message with the button. The message must not be scheduled.
   * \param[in] button_id_ Button identifier.
   */
  getLoginUrlInfo(int53 chat_id_, int53 message_id_, int53 button_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -859202125;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<LoginUrlInfo>;

  static object_ptr<getLoginUrlInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class mainWebApp;

class webAppOpenParameters;

/**
 * Returns information needed to open the main Web App of a bot.
 *
 * Returns object_ptr<MainWebApp>.
 */
class getMainWebApp final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which the Web App is opened; pass 0 if none.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Start parameter from internalLinkTypeMainWebApp.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which returns information needed to open the main Web App of a bot.
   *
   * Returns object_ptr<MainWebApp>.
   */
  getMainWebApp();

  /**
   * Creates a function, which returns information needed to open the main Web App of a bot.
   *
   * Returns object_ptr<MainWebApp>.
   *
   * \param[in] chat_id_ Identifier of the chat in which the Web App is opened; pass 0 if none.
   * \param[in] bot_user_id_ Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method.
   * \param[in] start_parameter_ Start parameter from internalLinkTypeMainWebApp.
   * \param[in] parameters_ Parameters to use to open the Web App.
   */
  getMainWebApp(int53 chat_id_, int53 bot_user_id_, string const &start_parameter_, object_ptr<webAppOpenParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 594050214;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<mainWebApp>;

  static object_ptr<getMainWebApp> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class botAccessSettings;

/**
 * Returns access settings of a managed bot; for bots only.
 *
 * Returns object_ptr<BotAccessSettings>.
 */
class getManagedBotAccessSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the managed bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which returns access settings of a managed bot; for bots only.
   *
   * Returns object_ptr<BotAccessSettings>.
   */
  getManagedBotAccessSettings();

  /**
   * Creates a function, which returns access settings of a managed bot; for bots only.
   *
   * Returns object_ptr<BotAccessSettings>.
   *
   * \param[in] bot_user_id_ Identifier of the managed bot.
   */
  explicit getManagedBotAccessSettings(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -867390575;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botAccessSettings>;

  static object_ptr<getManagedBotAccessSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns token of a managed bot; for bots only.
 *
 * Returns object_ptr<Text>.
 */
class getManagedBotToken final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the managed bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Pass true to revoke the current token and create a new one.
  bool revoke_;
  static jfieldID revoke_fieldID;

  /**
   * Default constructor for a function, which returns token of a managed bot; for bots only.
   *
   * Returns object_ptr<Text>.
   */
  getManagedBotToken();

  /**
   * Creates a function, which returns token of a managed bot; for bots only.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] bot_user_id_ Identifier of the managed bot.
   * \param[in] revoke_ Pass true to revoke the current token and create a new one.
   */
  getManagedBotToken(int53 bot_user_id_, bool revoke_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -938215629;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getManagedBotToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class file;

class location;

/**
 * Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded.
 *
 * Returns object_ptr<File>.
 */
class getMapThumbnailFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Location of the map center.
  object_ptr<location> location_;
  static jfieldID location_fieldID;
  /// Map zoom level; 13-20.
  int32 zoom_;
  static jfieldID zoom_fieldID;
  /// Map width in pixels before applying scale; 16-1024.
  int32 width_;
  static jfieldID width_fieldID;
  /// Map height in pixels before applying scale; 16-1024.
  int32 height_;
  static jfieldID height_fieldID;
  /// Map scale; 1-3.
  int32 scale_;
  static jfieldID scale_fieldID;
  /// Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded.
   *
   * Returns object_ptr<File>.
   */
  getMapThumbnailFile();

  /**
   * Creates a function, which returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] location_ Location of the map center.
   * \param[in] zoom_ Map zoom level; 13-20.
   * \param[in] width_ Map width in pixels before applying scale; 16-1024.
   * \param[in] height_ Map height in pixels before applying scale; 16-1024.
   * \param[in] scale_ Map scale; 1-3.
   * \param[in] chat_id_ Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown.
   */
  getMapThumbnailFile(object_ptr<location> &&location_, int32 zoom_, int32 width_, int32 height_, int32 scale_, int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -152660070;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<getMapThumbnailFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously.
 *
 * Returns object_ptr<FormattedText>.
 */
class getMarkdownText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously.
   *
   * Returns object_ptr<FormattedText>.
   */
  getMarkdownText();

  /**
   * Creates a function, which replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] text_ The text.
   */
  explicit getMarkdownText(object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 164524584;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<getMarkdownText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Returns the current user.
 *
 * Returns object_ptr<User>.
 */
class getMe final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the current user.
   *
   * Returns object_ptr<User>.
   */
  getMe();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -191516033;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<getMe> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class botMenuButton;

/**
 * Returns menu button set by the bot for the given user; for bots only.
 *
 * Returns object_ptr<BotMenuButton>.
 */
class getMenuButton final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or 0 to get the default menu button.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns menu button set by the bot for the given user; for bots only.
   *
   * Returns object_ptr<BotMenuButton>.
   */
  getMenuButton();

  /**
   * Creates a function, which returns menu button set by the bot for the given user; for bots only.
   *
   * Returns object_ptr<BotMenuButton>.
   *
   * \param[in] user_id_ Identifier of the user or 0 to get the default menu button.
   */
  explicit getMenuButton(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -437324736;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<botMenuButton>;

  static object_ptr<getMenuButton> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns information about a message. Returns a 404 error if the message doesn't exist.
 *
 * Returns object_ptr<Message>.
 */
class getMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message to get.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a message. Returns a 404 error if the message doesn't exist.
   *
   * Returns object_ptr<Message>.
   */
  getMessage();

  /**
   * Creates a function, which returns information about a message. Returns a 404 error if the message doesn't exist.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Identifier of the chat the message belongs to.
   * \param[in] message_id_ Identifier of the message to get.
   */
  getMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1821196160;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class addedReactions;

/**
 * Returns reactions added for a message, along with their sender.
 *
 * Returns object_ptr<AddedReactions>.
 */
class getMessageAddedReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use message.interaction_info.reactions.can_get_added_reactions to check whether added reactions can be received for the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Type of the reactions to return; pass null to return all added reactions; reactionTypePaid isn't supported.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of reactions to be returned; must be positive and can't be greater than 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns reactions added for a message, along with their sender.
   *
   * Returns object_ptr<AddedReactions>.
   */
  getMessageAddedReactions();

  /**
   * Creates a function, which returns reactions added for a message, along with their sender.
   *
   * Returns object_ptr<AddedReactions>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message. Use message.interaction_info.reactions.can_get_added_reactions to check whether added reactions can be received for the message.
   * \param[in] reaction_type_ Type of the reactions to return; pass null to return all added reactions; reactionTypePaid isn't supported.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of reactions to be returned; must be positive and can't be greater than 100.
   */
  getMessageAddedReactions(int53 chat_id_, int53 message_id_, object_ptr<ReactionType> &&reaction_type_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2110172754;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<addedReactions>;

  static object_ptr<getMessageAddedReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Returns information about actual author of a message sent on behalf of a channel. The method can be called if messageProperties.can_get_author == true.
 *
 * Returns object_ptr<User>.
 */
class getMessageAuthor final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about actual author of a message sent on behalf of a channel. The method can be called if messageProperties.can_get_author == true.
   *
   * Returns object_ptr<User>.
   */
  getMessageAuthor();

  /**
   * Creates a function, which returns information about actual author of a message sent on behalf of a channel. The method can be called if messageProperties.can_get_author == true.
   *
   * Returns object_ptr<User>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message.
   */
  getMessageAuthor(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1890166449;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<getMessageAuthor> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class availableReactions;

/**
 * Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message.
 *
 * Returns object_ptr<AvailableReactions>.
 */
class getMessageAvailableReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Number of reaction per row, 5-25.
  int32 row_size_;
  static jfieldID row_size_fieldID;

  /**
   * Default constructor for a function, which returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message.
   *
   * Returns object_ptr<AvailableReactions>.
   */
  getMessageAvailableReactions();

  /**
   * Creates a function, which returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message.
   *
   * Returns object_ptr<AvailableReactions>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] row_size_ Number of reaction per row, 5-25.
   */
  getMessageAvailableReactions(int53 chat_id_, int53 message_id_, int32 row_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1994098354;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<availableReactions>;

  static object_ptr<getMessageAvailableReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageEffect;

/**
 * Returns information about a message effect. Returns a 404 error if the effect is not found.
 *
 * Returns object_ptr<MessageEffect>.
 */
class getMessageEffect final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the effect.
  int64 effect_id_;
  static jfieldID effect_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a message effect. Returns a 404 error if the effect is not found.
   *
   * Returns object_ptr<MessageEffect>.
   */
  getMessageEffect();

  /**
   * Creates a function, which returns information about a message effect. Returns a 404 error if the effect is not found.
   *
   * Returns object_ptr<MessageEffect>.
   *
   * \param[in] effect_id_ Unique identifier of the effect.
   */
  explicit getMessageEffect(int64 effect_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1638843116;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageEffect>;

  static object_ptr<getMessageEffect> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns an HTML code for embedding the message. Available only if messageProperties.can_get_embedding_code.
 *
 * Returns object_ptr<Text>.
 */
class getMessageEmbeddingCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true to return an HTML code for embedding of the whole media album.
  bool for_album_;
  static jfieldID for_album_fieldID;

  /**
   * Default constructor for a function, which returns an HTML code for embedding the message. Available only if messageProperties.can_get_embedding_code.
   *
   * Returns object_ptr<Text>.
   */
  getMessageEmbeddingCode();

  /**
   * Creates a function, which returns an HTML code for embedding the message. Available only if messageProperties.can_get_embedding_code.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] for_album_ Pass true to return an HTML code for embedding of the whole media album.
   */
  getMessageEmbeddingCode(int53 chat_id_, int53 message_id_, bool for_album_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1654967561;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getMessageEmbeddingCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageFileType;

/**
 * Returns information about a file with messages exported from another application.
 *
 * Returns object_ptr<MessageFileType>.
 */
class getMessageFileType final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Beginning of the message file; up to 100 first lines.
  string message_file_head_;
  static jfieldID message_file_head_fieldID;

  /**
   * Default constructor for a function, which returns information about a file with messages exported from another application.
   *
   * Returns object_ptr<MessageFileType>.
   */
  getMessageFileType();

  /**
   * Creates a function, which returns information about a file with messages exported from another application.
   *
   * Returns object_ptr<MessageFileType>.
   *
   * \param[in] message_file_head_ Beginning of the message file; up to 100 first lines.
   */
  explicit getMessageFileType(string const &message_file_head_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -490270764;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<MessageFileType>;

  static object_ptr<getMessageFileType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns a confirmation text to be shown to the user before starting message import.
 *
 * Returns object_ptr<Text>.
 */
class getMessageImportConfirmationText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns a confirmation text to be shown to the user before starting message import.
   *
   * Returns object_ptr<Text>.
   */
  getMessageImportConfirmationText();

  /**
   * Creates a function, which returns a confirmation text to be shown to the user before starting message import.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] chat_id_ Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right.
   */
  explicit getMessageImportConfirmationText(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 390627752;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getMessageImportConfirmationText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageLink;

/**
 * Returns an HTTPS link to a message in a chat. Available only if messageProperties.can_get_link, or if messageProperties.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline method.
 *
 * Returns object_ptr<MessageLink>.
 */
class getMessageLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// If not 0, timestamp from which the video/audio/video note/voice note/story playing must start, in seconds. The media can be in the message content or in its link preview.
  int32 media_timestamp_;
  static jfieldID media_timestamp_fieldID;
  /// If not 0, identifier of the checklist task in the message to be linked.
  int32 checklist_task_id_;
  static jfieldID checklist_task_id_fieldID;
  /// If not empty, identifier of the poll option in the message to be linked.
  string poll_option_id_;
  static jfieldID poll_option_id_fieldID;
  /// Pass true to create a link for the whole media album.
  bool for_album_;
  static jfieldID for_album_fieldID;
  /// Pass true to create a link to the message as a channel post comment, in a message thread, or a forum topic.
  bool in_message_thread_;
  static jfieldID in_message_thread_fieldID;

  /**
   * Default constructor for a function, which returns an HTTPS link to a message in a chat. Available only if messageProperties.can_get_link, or if messageProperties.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline method.
   *
   * Returns object_ptr<MessageLink>.
   */
  getMessageLink();

  /**
   * Creates a function, which returns an HTTPS link to a message in a chat. Available only if messageProperties.can_get_link, or if messageProperties.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline method.
   *
   * Returns object_ptr<MessageLink>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] media_timestamp_ If not 0, timestamp from which the video/audio/video note/voice note/story playing must start, in seconds. The media can be in the message content or in its link preview.
   * \param[in] checklist_task_id_ If not 0, identifier of the checklist task in the message to be linked.
   * \param[in] poll_option_id_ If not empty, identifier of the poll option in the message to be linked.
   * \param[in] for_album_ Pass true to create a link for the whole media album.
   * \param[in] in_message_thread_ Pass true to create a link to the message as a channel post comment, in a message thread, or a forum topic.
   */
  getMessageLink(int53 chat_id_, int53 message_id_, int32 media_timestamp_, int32 checklist_task_id_, string const &poll_option_id_, bool for_album_, bool in_message_thread_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -498469915;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageLink>;

  static object_ptr<getMessageLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageLinkInfo;

/**
 * Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage.
 *
 * Returns object_ptr<MessageLinkInfo>.
 */
class getMessageLinkInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The message link.
  string url_;
  static jfieldID url_fieldID;

  /**
   * Default constructor for a function, which returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage.
   *
   * Returns object_ptr<MessageLinkInfo>.
   */
  getMessageLinkInfo();

  /**
   * Creates a function, which returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage.
   *
   * Returns object_ptr<MessageLinkInfo>.
   *
   * \param[in] url_ The message link.
   */
  explicit getMessageLinkInfo(string const &url_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -700533672;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageLinkInfo>;

  static object_ptr<getMessageLinkInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns information about a message, if it is available without sending network request. Returns a 404 error if message isn't available locally. This is an offline method.
 *
 * Returns object_ptr<Message>.
 */
class getMessageLocally final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message to get.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a message, if it is available without sending network request. Returns a 404 error if message isn't available locally. This is an offline method.
   *
   * Returns object_ptr<Message>.
   */
  getMessageLocally();

  /**
   * Creates a function, which returns information about a message, if it is available without sending network request. Returns a 404 error if message isn't available locally. This is an offline method.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Identifier of the chat the message belongs to.
   * \param[in] message_id_ Identifier of the message to get.
   */
  getMessageLocally(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -603575444;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getMessageLocally> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageProperties;

/**
 * Returns properties of a message. This is an offline method.
 *
 * Returns object_ptr<MessageProperties>.
 */
class getMessageProperties final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns properties of a message. This is an offline method.
   *
   * Returns object_ptr<MessageProperties>.
   */
  getMessageProperties();

  /**
   * Creates a function, which returns properties of a message. This is an offline method.
   *
   * Returns object_ptr<MessageProperties>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message.
   */
  getMessageProperties(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 773382571;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageProperties>;

  static object_ptr<getMessageProperties> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class publicForwards;

/**
 * Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
 *
 * Returns object_ptr<PublicForwards>.
 */
class getMessagePublicForwards final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
   *
   * Returns object_ptr<PublicForwards>.
   */
  getMessagePublicForwards();

  /**
   * Creates a function, which returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
   *
   * Returns object_ptr<PublicForwards>.
   *
   * \param[in] chat_id_ Chat identifier of the message.
   * \param[in] message_id_ Message identifier.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
   */
  getMessagePublicForwards(int53 chat_id_, int53 message_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1369285812;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<publicForwards>;

  static object_ptr<getMessagePublicForwards> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageReadDate;

/**
 * Returns read date of a recent outgoing message in a private chat. The method can be called if messageProperties.can_get_read_date == true.
 *
 * Returns object_ptr<MessageReadDate>.
 */
class getMessageReadDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns read date of a recent outgoing message in a private chat. The method can be called if messageProperties.can_get_read_date == true.
   *
   * Returns object_ptr<MessageReadDate>.
   */
  getMessageReadDate();

  /**
   * Creates a function, which returns read date of a recent outgoing message in a private chat. The method can be called if messageProperties.can_get_read_date == true.
   *
   * Returns object_ptr<MessageReadDate>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message.
   */
  getMessageReadDate(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1484455101;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<MessageReadDate>;

  static object_ptr<getMessageReadDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageStatistics;

/**
 * Returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true.
 *
 * Returns object_ptr<MessageStatistics>.
 */
class getMessageStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true.
   *
   * Returns object_ptr<MessageStatistics>.
   */
  getMessageStatistics();

  /**
   * Creates a function, which returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true.
   *
   * Returns object_ptr<MessageStatistics>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  getMessageStatistics(int53 chat_id_, int53 message_id_, bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1270194648;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageStatistics>;

  static object_ptr<getMessageStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageThreadInfo;

/**
 * Returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true.
 *
 * Returns object_ptr<MessageThreadInfo>.
 */
class getMessageThread final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true.
   *
   * Returns object_ptr<MessageThreadInfo>.
   */
  getMessageThread();

  /**
   * Creates a function, which returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true.
   *
   * Returns object_ptr<MessageThreadInfo>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message.
   */
  getMessageThread(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2062695998;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageThreadInfo>;

  static object_ptr<getMessageThread> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns messages in a message thread of a message. Can be used only if messageProperties.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
 *
 * Returns object_ptr<Messages>.
 */
class getMessageThreadHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier, which thread history needs to be returned.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns messages in a message thread of a message. Can be used only if messageProperties.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<Messages>.
   */
  getMessageThreadHistory();

  /**
   * Creates a function, which returns messages in a message thread of a message. Can be used only if messageProperties.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier, which thread history needs to be returned.
   * \param[in] from_message_id_ Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   */
  getMessageThreadHistory(int53 chat_id_, int53 message_id_, int53 from_message_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1808411608;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getMessageThreadHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageViewers;

/**
 * Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true.
 *
 * Returns object_ptr<MessageViewers>.
 */
class getMessageViewers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true.
   *
   * Returns object_ptr<MessageViewers>.
   */
  getMessageViewers();

  /**
   * Creates a function, which returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true.
   *
   * Returns object_ptr<MessageViewers>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message.
   */
  getMessageViewers(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1584457010;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageViewers>;

  static object_ptr<getMessageViewers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns information about messages. If a message is not found, returns null on the corresponding position of the result.
 *
 * Returns object_ptr<Messages>.
 */
class getMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat the messages belong to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifiers of the messages to get.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Default constructor for a function, which returns information about messages. If a message is not found, returns null on the corresponding position of the result.
   *
   * Returns object_ptr<Messages>.
   */
  getMessages();

  /**
   * Creates a function, which returns information about messages. If a message is not found, returns null on the corresponding position of the result.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Identifier of the chat the messages belong to.
   * \param[in] message_ids_ Identifiers of the messages to get.
   */
  getMessages(int53 chat_id_, array<int53> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 425299338;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class networkStatistics;

/**
 * Returns network data usage statistics. Can be called before authorization.
 *
 * Returns object_ptr<NetworkStatistics>.
 */
class getNetworkStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to get statistics only for the current library launch.
  bool only_current_;
  static jfieldID only_current_fieldID;

  /**
   * Default constructor for a function, which returns network data usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<NetworkStatistics>.
   */
  getNetworkStatistics();

  /**
   * Creates a function, which returns network data usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<NetworkStatistics>.
   *
   * \param[in] only_current_ Pass true to get statistics only for the current library launch.
   */
  explicit getNetworkStatistics(bool only_current_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -986228706;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<networkStatistics>;

  static object_ptr<getNetworkStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class newChatPrivacySettings;

/**
 * Returns privacy settings for new chat creation.
 *
 * Returns object_ptr<NewChatPrivacySettings>.
 */
class getNewChatPrivacySettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns privacy settings for new chat creation.
   *
   * Returns object_ptr<NewChatPrivacySettings>.
   */
  getNewChatPrivacySettings();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1295299657;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<newChatPrivacySettings>;

  static object_ptr<getNewChatPrivacySettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class oauthLinkInfo;

/**
 * Returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest to process the link.
 *
 * Returns object_ptr<OauthLinkInfo>.
 */
class getOauthLinkInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// URL of the link.
  string url_;
  static jfieldID url_fieldID;
  /// Origin of the OAuth request if the request was received from the in-app browser; pass an empty string otherwise.
  string in_app_origin_;
  static jfieldID in_app_origin_fieldID;

  /**
   * Default constructor for a function, which returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest to process the link.
   *
   * Returns object_ptr<OauthLinkInfo>.
   */
  getOauthLinkInfo();

  /**
   * Creates a function, which returns information about an OAuth deep link. Use checkOauthRequestMatchCode, acceptOauthRequest or declineOauthRequest to process the link.
   *
   * Returns object_ptr<OauthLinkInfo>.
   *
   * \param[in] url_ URL of the link.
   * \param[in] in_app_origin_ Origin of the OAuth request if the request was received from the in-app browser; pass an empty string otherwise.
   */
  getOauthLinkInfo(string const &url_, string const &in_app_origin_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1235634833;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<oauthLinkInfo>;

  static object_ptr<getOauthLinkInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class OptionValue;

/**
 * Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. Can be called synchronously for options &quot;version&quot; and &quot;commit_hash&quot;.
 *
 * Returns object_ptr<OptionValue>.
 */
class getOption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The name of the option.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. Can be called synchronously for options &quot;version&quot; and &quot;commit_hash&quot;.
   *
   * Returns object_ptr<OptionValue>.
   */
  getOption();

  /**
   * Creates a function, which returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. Can be called synchronously for options &quot;version&quot; and &quot;commit_hash&quot;.
   *
   * Returns object_ptr<OptionValue>.
   *
   * \param[in] name_ The name of the option.
   */
  explicit getOption(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1572495746;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<OptionValue>;

  static object_ptr<getOption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class users;

/**
 * Returns the list of bots owned by the current user.
 *
 * Returns object_ptr<Users>.
 */
class getOwnedBots final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of bots owned by the current user.
   *
   * Returns object_ptr<Users>.
   */
  getOwnedBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1954035715;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<users>;

  static object_ptr<getOwnedBots> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickerSets;

/**
 * Returns sticker sets owned by the current user.
 *
 * Returns object_ptr<StickerSets>.
 */
class getOwnedStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set from which to return owned sticker sets; use 0 to get results from the beginning.
  int64 offset_sticker_set_id_;
  static jfieldID offset_sticker_set_id_fieldID;
  /// The maximum number of sticker sets to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns sticker sets owned by the current user.
   *
   * Returns object_ptr<StickerSets>.
   */
  getOwnedStickerSets();

  /**
   * Creates a function, which returns sticker sets owned by the current user.
   *
   * Returns object_ptr<StickerSets>.
   *
   * \param[in] offset_sticker_set_id_ Identifier of the sticker set from which to return owned sticker sets; use 0 to get results from the beginning.
   * \param[in] limit_ The maximum number of sticker sets to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
   */
  getOwnedStickerSets(int64 offset_sticker_set_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1493074208;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSets>;

  static object_ptr<getOwnedStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starCount;

/**
 * Returns the total number of Telegram Stars received by the current user for paid messages from the given user.
 *
 * Returns object_ptr<StarCount>.
 */
class getPaidMessageRevenue final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns the total number of Telegram Stars received by the current user for paid messages from the given user.
   *
   * Returns object_ptr<StarCount>.
   */
  getPaidMessageRevenue();

  /**
   * Creates a function, which returns the total number of Telegram Stars received by the current user for paid messages from the given user.
   *
   * Returns object_ptr<StarCount>.
   *
   * \param[in] user_id_ Identifier of the user.
   */
  explicit getPaidMessageRevenue(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1976589102;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starCount>;

  static object_ptr<getPaidMessageRevenue> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns parameters for creating of a new passkey as JSON-serialized string.
 *
 * Returns object_ptr<Text>.
 */
class getPasskeyParameters final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns parameters for creating of a new passkey as JSON-serialized string.
   *
   * Returns object_ptr<Text>.
   */
  getPasskeyParameters();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -680161058;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getPasskeyParameters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passportAuthorizationForm;

/**
 * Returns a Telegram Passport authorization form for sharing data with a service.
 *
 * Returns object_ptr<PassportAuthorizationForm>.
 */
class getPassportAuthorizationForm final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the service's bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Telegram Passport element types requested by the service.
  string scope_;
  static jfieldID scope_fieldID;
  /// Service's public key.
  string public_key_;
  static jfieldID public_key_fieldID;
  /// Unique request identifier provided by the service.
  string nonce_;
  static jfieldID nonce_fieldID;

  /**
   * Default constructor for a function, which returns a Telegram Passport authorization form for sharing data with a service.
   *
   * Returns object_ptr<PassportAuthorizationForm>.
   */
  getPassportAuthorizationForm();

  /**
   * Creates a function, which returns a Telegram Passport authorization form for sharing data with a service.
   *
   * Returns object_ptr<PassportAuthorizationForm>.
   *
   * \param[in] bot_user_id_ User identifier of the service's bot.
   * \param[in] scope_ Telegram Passport element types requested by the service.
   * \param[in] public_key_ Service's public key.
   * \param[in] nonce_ Unique request identifier provided by the service.
   */
  getPassportAuthorizationForm(int53 bot_user_id_, string const &scope_, string const &public_key_, string const &nonce_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1636107398;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passportAuthorizationForm>;

  static object_ptr<getPassportAuthorizationForm> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passportElementsWithErrors;

/**
 * Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form.
 *
 * Returns object_ptr<PassportElementsWithErrors>.
 */
class getPassportAuthorizationFormAvailableElements final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Authorization form identifier.
  int32 authorization_form_id_;
  static jfieldID authorization_form_id_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form.
   *
   * Returns object_ptr<PassportElementsWithErrors>.
   */
  getPassportAuthorizationFormAvailableElements();

  /**
   * Creates a function, which returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form.
   *
   * Returns object_ptr<PassportElementsWithErrors>.
   *
   * \param[in] authorization_form_id_ Authorization form identifier.
   * \param[in] password_ The 2-step verification password of the current user.
   */
  getPassportAuthorizationFormAvailableElements(int32 authorization_form_id_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1068700924;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passportElementsWithErrors>;

  static object_ptr<getPassportAuthorizationFormAvailableElements> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PassportElement;

class PassportElementType;

/**
 * Returns one of the available Telegram Passport elements.
 *
 * Returns object_ptr<PassportElement>.
 */
class getPassportElement final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Telegram Passport element type.
  object_ptr<PassportElementType> type_;
  static jfieldID type_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns one of the available Telegram Passport elements.
   *
   * Returns object_ptr<PassportElement>.
   */
  getPassportElement();

  /**
   * Creates a function, which returns one of the available Telegram Passport elements.
   *
   * Returns object_ptr<PassportElement>.
   *
   * \param[in] type_ Telegram Passport element type.
   * \param[in] password_ The 2-step verification password of the current user.
   */
  getPassportElement(object_ptr<PassportElementType> &&type_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1882398342;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<PassportElement>;

  static object_ptr<getPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Returns the current state of 2-step verification.
 *
 * Returns object_ptr<PasswordState>.
 */
class getPasswordState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the current state of 2-step verification.
   *
   * Returns object_ptr<PasswordState>.
   */
  getPasswordState();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -174752904;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<getPasswordState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputInvoice;

class paymentForm;

class themeParameters;

/**
 * Returns an invoice payment form. This method must be called when the user presses inline button of the type inlineKeyboardButtonTypeBuy, or wants to buy access to media in a messagePaidMedia message.
 *
 * Returns object_ptr<PaymentForm>.
 */
class getPaymentForm final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The invoice.
  object_ptr<InputInvoice> input_invoice_;
  static jfieldID input_invoice_fieldID;
  /// Preferred payment form theme; pass null to use the default theme.
  object_ptr<themeParameters> theme_;
  static jfieldID theme_fieldID;

  /**
   * Default constructor for a function, which returns an invoice payment form. This method must be called when the user presses inline button of the type inlineKeyboardButtonTypeBuy, or wants to buy access to media in a messagePaidMedia message.
   *
   * Returns object_ptr<PaymentForm>.
   */
  getPaymentForm();

  /**
   * Creates a function, which returns an invoice payment form. This method must be called when the user presses inline button of the type inlineKeyboardButtonTypeBuy, or wants to buy access to media in a messagePaidMedia message.
   *
   * Returns object_ptr<PaymentForm>.
   *
   * \param[in] input_invoice_ The invoice.
   * \param[in] theme_ Preferred payment form theme; pass null to use the default theme.
   */
  getPaymentForm(object_ptr<InputInvoice> &&input_invoice_, object_ptr<themeParameters> &&theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1924172076;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<paymentForm>;

  static object_ptr<getPaymentForm> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class paymentReceipt;

/**
 * Returns information about a successful payment.
 *
 * Returns object_ptr<PaymentReceipt>.
 */
class getPaymentReceipt final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the messagePaymentSuccessful message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a successful payment.
   *
   * Returns object_ptr<PaymentReceipt>.
   */
  getPaymentReceipt();

  /**
   * Creates a function, which returns information about a successful payment.
   *
   * Returns object_ptr<PaymentReceipt>.
   *
   * \param[in] chat_id_ Chat identifier of the messagePaymentSuccessful message.
   * \param[in] message_id_ Message identifier.
   */
  getPaymentReceipt(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1013758294;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<paymentReceipt>;

  static object_ptr<getPaymentReceipt> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns messages in the personal chat of a given user; for bots only.
 *
 * Returns object_ptr<Messages>.
 */
class getPersonalChatHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The maximum number of messages to be returned; 1-20.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns messages in the personal chat of a given user; for bots only.
   *
   * Returns object_ptr<Messages>.
   */
  getPersonalChatHistory();

  /**
   * Creates a function, which returns messages in the personal chat of a given user; for bots only.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] limit_ The maximum number of messages to be returned; 1-20.
   */
  getPersonalChatHistory(int53 user_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1727554525;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getPersonalChatHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class phoneNumberInfo;

/**
 * Returns information about a phone number by its prefix. Can be called before authorization.
 *
 * Returns object_ptr<PhoneNumberInfo>.
 */
class getPhoneNumberInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The phone number prefix.
  string phone_number_prefix_;
  static jfieldID phone_number_prefix_fieldID;

  /**
   * Default constructor for a function, which returns information about a phone number by its prefix. Can be called before authorization.
   *
   * Returns object_ptr<PhoneNumberInfo>.
   */
  getPhoneNumberInfo();

  /**
   * Creates a function, which returns information about a phone number by its prefix. Can be called before authorization.
   *
   * Returns object_ptr<PhoneNumberInfo>.
   *
   * \param[in] phone_number_prefix_ The phone number prefix.
   */
  explicit getPhoneNumberInfo(string const &phone_number_prefix_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1608344583;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<phoneNumberInfo>;

  static object_ptr<getPhoneNumberInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class phoneNumberInfo;

/**
 * Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously.
 *
 * Returns object_ptr<PhoneNumberInfo>.
 */
class getPhoneNumberInfoSync final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 639-1 language code for country information localization.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// The phone number prefix.
  string phone_number_prefix_;
  static jfieldID phone_number_prefix_fieldID;

  /**
   * Default constructor for a function, which returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously.
   *
   * Returns object_ptr<PhoneNumberInfo>.
   */
  getPhoneNumberInfoSync();

  /**
   * Creates a function, which returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously.
   *
   * Returns object_ptr<PhoneNumberInfo>.
   *
   * \param[in] language_code_ A two-letter ISO 639-1 language code for country information localization.
   * \param[in] phone_number_prefix_ The phone number prefix.
   */
  getPhoneNumberInfoSync(string const &language_code_, string const &phone_number_prefix_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 547061048;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<phoneNumberInfo>;

  static object_ptr<getPhoneNumberInfoSync> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class pollOptionProperties;

/**
 * Returns properties of a poll option. This is an offline method.
 *
 * Returns object_ptr<PollOptionProperties>.
 */
class getPollOptionProperties final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Unique identifier of the answer option, which properties will be returned.
  string poll_option_id_;
  static jfieldID poll_option_id_fieldID;

  /**
   * Default constructor for a function, which returns properties of a poll option. This is an offline method.
   *
   * Returns object_ptr<PollOptionProperties>.
   */
  getPollOptionProperties();

  /**
   * Creates a function, which returns properties of a poll option. This is an offline method.
   *
   * Returns object_ptr<PollOptionProperties>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] poll_option_id_ Unique identifier of the answer option, which properties will be returned.
   */
  getPollOptionProperties(int53 chat_id_, int53 message_id_, string const &poll_option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1191094872;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<pollOptionProperties>;

  static object_ptr<getPollOptionProperties> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class pollVoteStatistics;

/**
 * Returns statistics of poll votes in a poll.
 *
 * Returns object_ptr<PollVoteStatistics>.
 */
class getPollVoteStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll. Use messageProperties.can_get_poll_vote_statistics to check whether the method can be used for a message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns statistics of poll votes in a poll.
   *
   * Returns object_ptr<PollVoteStatistics>.
   */
  getPollVoteStatistics();

  /**
   * Creates a function, which returns statistics of poll votes in a poll.
   *
   * Returns object_ptr<PollVoteStatistics>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the poll belongs.
   * \param[in] message_id_ Identifier of the message containing the poll. Use messageProperties.can_get_poll_vote_statistics to check whether the method can be used for a message.
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  getPollVoteStatistics(int53 chat_id_, int53 message_id_, bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -379637947;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<pollVoteStatistics>;

  static object_ptr<getPollVoteStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class pollVoters;

/**
 * Returns message senders voted for the specified option in a poll; use poll.can_get_voters to check whether the method can be used. For optimal performance, the number of returned users is chosen by TDLib.
 *
 * Returns object_ptr<PollVoters>.
 */
class getPollVoters final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// 0-based identifier of the answer option.
  int32 option_id_;
  static jfieldID option_id_fieldID;
  /// Number of voters to skip in the result; must be non-negative.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of voters to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned voters is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns message senders voted for the specified option in a poll; use poll.can_get_voters to check whether the method can be used. For optimal performance, the number of returned users is chosen by TDLib.
   *
   * Returns object_ptr<PollVoters>.
   */
  getPollVoters();

  /**
   * Creates a function, which returns message senders voted for the specified option in a poll; use poll.can_get_voters to check whether the method can be used. For optimal performance, the number of returned users is chosen by TDLib.
   *
   * Returns object_ptr<PollVoters>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the poll belongs.
   * \param[in] message_id_ Identifier of the message containing the poll.
   * \param[in] option_id_ 0-based identifier of the answer option.
   * \param[in] offset_ Number of voters to skip in the result; must be non-negative.
   * \param[in] limit_ The maximum number of voters to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned voters is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached.
   */
  getPollVoters(int53 chat_id_, int53 message_id_, int32 option_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1602915575;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<pollVoters>;

  static object_ptr<getPollVoters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown.
 *
 * Returns object_ptr<Text>.
 */
class getPreferredCountryLanguage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// A two-letter ISO 3166-1 alpha-2 country code.
  string country_code_;
  static jfieldID country_code_fieldID;

  /**
   * Default constructor for a function, which returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown.
   *
   * Returns object_ptr<Text>.
   */
  getPreferredCountryLanguage();

  /**
   * Creates a function, which returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] country_code_ A two-letter ISO 3166-1 alpha-2 country code.
   */
  explicit getPreferredCountryLanguage(string const &country_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -933049386;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getPreferredCountryLanguage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PremiumSource;

class premiumFeatures;

/**
 * Returns information about features, available to Premium users.
 *
 * Returns object_ptr<PremiumFeatures>.
 */
class getPremiumFeatures final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Source of the request; pass null if the method is called from some non-standard source.
  object_ptr<PremiumSource> source_;
  static jfieldID source_fieldID;

  /**
   * Default constructor for a function, which returns information about features, available to Premium users.
   *
   * Returns object_ptr<PremiumFeatures>.
   */
  getPremiumFeatures();

  /**
   * Creates a function, which returns information about features, available to Premium users.
   *
   * Returns object_ptr<PremiumFeatures>.
   *
   * \param[in] source_ Source of the request; pass null if the method is called from some non-standard source.
   */
  explicit getPremiumFeatures(object_ptr<PremiumSource> &&source_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1260640695;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumFeatures>;

  static object_ptr<getPremiumFeatures> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class premiumGiftPaymentOptions;

/**
 * Returns available options for gifting Telegram Premium to a user.
 *
 * Returns object_ptr<PremiumGiftPaymentOptions>.
 */
class getPremiumGiftPaymentOptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns available options for gifting Telegram Premium to a user.
   *
   * Returns object_ptr<PremiumGiftPaymentOptions>.
   */
  getPremiumGiftPaymentOptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -480334244;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumGiftPaymentOptions>;

  static object_ptr<getPremiumGiftPaymentOptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class premiumGiveawayPaymentOptions;

/**
 * Returns available options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members.
 *
 * Returns object_ptr<PremiumGiveawayPaymentOptions>.
 */
class getPremiumGiveawayPaymentOptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user.
  int53 boosted_chat_id_;
  static jfieldID boosted_chat_id_fieldID;

  /**
   * Default constructor for a function, which returns available options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members.
   *
   * Returns object_ptr<PremiumGiveawayPaymentOptions>.
   */
  getPremiumGiveawayPaymentOptions();

  /**
   * Creates a function, which returns available options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members.
   *
   * Returns object_ptr<PremiumGiveawayPaymentOptions>.
   *
   * \param[in] boosted_chat_id_ Identifier of the supergroup or channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user.
   */
  explicit getPremiumGiveawayPaymentOptions(int53 boosted_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1222168073;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumGiveawayPaymentOptions>;

  static object_ptr<getPremiumGiveawayPaymentOptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class sticker;

/**
 * Returns the sticker to be used as representation of the Telegram Premium subscription.
 *
 * Returns object_ptr<Sticker>.
 */
class getPremiumInfoSticker final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of months the Telegram Premium subscription will be active.
  int32 month_count_;
  static jfieldID month_count_fieldID;

  /**
   * Default constructor for a function, which returns the sticker to be used as representation of the Telegram Premium subscription.
   *
   * Returns object_ptr<Sticker>.
   */
  getPremiumInfoSticker();

  /**
   * Creates a function, which returns the sticker to be used as representation of the Telegram Premium subscription.
   *
   * Returns object_ptr<Sticker>.
   *
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active.
   */
  explicit getPremiumInfoSticker(int32 month_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2043562651;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<sticker>;

  static object_ptr<getPremiumInfoSticker> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PremiumLimitType;

class premiumLimit;

/**
 * Returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown.
 *
 * Returns object_ptr<PremiumLimit>.
 */
class getPremiumLimit final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the limit.
  object_ptr<PremiumLimitType> limit_type_;
  static jfieldID limit_type_fieldID;

  /**
   * Default constructor for a function, which returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown.
   *
   * Returns object_ptr<PremiumLimit>.
   */
  getPremiumLimit();

  /**
   * Creates a function, which returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown.
   *
   * Returns object_ptr<PremiumLimit>.
   *
   * \param[in] limit_type_ Type of the limit.
   */
  explicit getPremiumLimit(object_ptr<PremiumLimitType> &&limit_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1075313898;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumLimit>;

  static object_ptr<getPremiumLimit> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class premiumState;

/**
 * Returns state of Telegram Premium subscription and promotion videos for Premium features.
 *
 * Returns object_ptr<PremiumState>.
 */
class getPremiumState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns state of Telegram Premium subscription and promotion videos for Premium features.
   *
   * Returns object_ptr<PremiumState>.
   */
  getPremiumState();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 663632610;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<premiumState>;

  static object_ptr<getPremiumState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns examples of premium stickers for demonstration purposes.
 *
 * Returns object_ptr<Stickers>.
 */
class getPremiumStickerExamples final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns examples of premium stickers for demonstration purposes.
   *
   * Returns object_ptr<Stickers>.
   */
  getPremiumStickerExamples();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1399442328;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getPremiumStickerExamples> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns premium stickers from regular sticker sets.
 *
 * Returns object_ptr<Stickers>.
 */
class getPremiumStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum number of stickers to be returned; 0-100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns premium stickers from regular sticker sets.
   *
   * Returns object_ptr<Stickers>.
   */
  getPremiumStickers();

  /**
   * Creates a function, which returns premium stickers from regular sticker sets.
   *
   * Returns object_ptr<Stickers>.
   *
   * \param[in] limit_ The maximum number of stickers to be returned; 0-100.
   */
  explicit getPremiumStickers(int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -280950192;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getPremiumStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class preparedInlineMessage;

/**
 * Saves an inline message to be sent by the given user.
 *
 * Returns object_ptr<PreparedInlineMessage>.
 */
class getPreparedInlineMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot that created the message.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the prepared message.
  string prepared_message_id_;
  static jfieldID prepared_message_id_fieldID;

  /**
   * Default constructor for a function, which saves an inline message to be sent by the given user.
   *
   * Returns object_ptr<PreparedInlineMessage>.
   */
  getPreparedInlineMessage();

  /**
   * Creates a function, which saves an inline message to be sent by the given user.
   *
   * Returns object_ptr<PreparedInlineMessage>.
   *
   * \param[in] bot_user_id_ Identifier of the bot that created the message.
   * \param[in] prepared_message_id_ Identifier of the prepared message.
   */
  getPreparedInlineMessage(int53 bot_user_id_, string const &prepared_message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -83179701;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<preparedInlineMessage>;

  static object_ptr<getPreparedInlineMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class keyboardButton;

/**
 * Returns a keyboard button prepared by the bot for the user. The button will be of the type keyboardButtonTypeRequestUsers, keyboardButtonTypeRequestChat, or keyboardButtonTypeRequestManagedBot.
 *
 * Returns object_ptr<KeyboardButton>.
 */
class getPreparedKeyboardButton final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot that created the button.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the prepared button.
  string prepared_button_id_;
  static jfieldID prepared_button_id_fieldID;

  /**
   * Default constructor for a function, which returns a keyboard button prepared by the bot for the user. The button will be of the type keyboardButtonTypeRequestUsers, keyboardButtonTypeRequestChat, or keyboardButtonTypeRequestManagedBot.
   *
   * Returns object_ptr<KeyboardButton>.
   */
  getPreparedKeyboardButton();

  /**
   * Creates a function, which returns a keyboard button prepared by the bot for the user. The button will be of the type keyboardButtonTypeRequestUsers, keyboardButtonTypeRequestChat, or keyboardButtonTypeRequestManagedBot.
   *
   * Returns object_ptr<KeyboardButton>.
   *
   * \param[in] bot_user_id_ Identifier of the bot that created the button.
   * \param[in] prepared_button_id_ Identifier of the prepared button.
   */
  getPreparedKeyboardButton(int53 bot_user_id_, string const &prepared_button_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1162619742;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<keyboardButton>;

  static object_ptr<getPreparedKeyboardButton> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class addedProxies;

/**
 * Returns the list of proxies that are currently set up. Can be called before authorization.
 *
 * Returns object_ptr<AddedProxies>.
 */
class getProxies final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of proxies that are currently set up. Can be called before authorization.
   *
   * Returns object_ptr<AddedProxies>.
   */
  getProxies();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1234066431;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<addedProxies>;

  static object_ptr<getProxies> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class publicPostSearchLimits;

/**
 * Checks public post search limits without actually performing the search.
 *
 * Returns object_ptr<PublicPostSearchLimits>.
 */
class getPublicPostSearchLimits final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query that will be searched for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Default constructor for a function, which checks public post search limits without actually performing the search.
   *
   * Returns object_ptr<PublicPostSearchLimits>.
   */
  getPublicPostSearchLimits();

  /**
   * Creates a function, which checks public post search limits without actually performing the search.
   *
   * Returns object_ptr<PublicPostSearchLimits>.
   *
   * \param[in] query_ Query that will be searched for.
   */
  explicit getPublicPostSearchLimits(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1724216773;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<publicPostSearchLimits>;

  static object_ptr<getPublicPostSearchLimits> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class pushReceiverId;

/**
 * Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously.
 *
 * Returns object_ptr<PushReceiverId>.
 */
class getPushReceiverId final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// JSON-encoded push notification payload.
  string payload_;
  static jfieldID payload_fieldID;

  /**
   * Default constructor for a function, which returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously.
   *
   * Returns object_ptr<PushReceiverId>.
   */
  getPushReceiverId();

  /**
   * Creates a function, which returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously.
   *
   * Returns object_ptr<PushReceiverId>.
   *
   * \param[in] payload_ JSON-encoded push notification payload.
   */
  explicit getPushReceiverId(string const &payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -286505294;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<pushReceiverId>;

  static object_ptr<getPushReceiverId> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class readDatePrivacySettings;

/**
 * Returns privacy settings for message read date.
 *
 * Returns object_ptr<ReadDatePrivacySettings>.
 */
class getReadDatePrivacySettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns privacy settings for message read date.
   *
   * Returns object_ptr<ReadDatePrivacySettings>.
   */
  getReadDatePrivacySettings();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 451435451;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<readDatePrivacySettings>;

  static object_ptr<getReadDatePrivacySettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class receivedGift;

/**
 * Returns information about a received gift.
 *
 * Returns object_ptr<ReceivedGift>.
 */
class getReceivedGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a received gift.
   *
   * Returns object_ptr<ReceivedGift>.
   */
  getReceivedGift();

  /**
   * Creates a function, which returns information about a received gift.
   *
   * Returns object_ptr<ReceivedGift>.
   *
   * \param[in] received_gift_id_ Identifier of the gift.
   */
  explicit getReceivedGift(string const &received_gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -446535239;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<receivedGift>;

  static object_ptr<getReceivedGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class receivedGifts;

/**
 * Returns gifts received by the given user or chat.
 *
 * Returns object_ptr<ReceivedGifts>.
 */
class getReceivedGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request; for bots only.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Identifier of the gift receiver.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Pass collection identifier to get gifts only from the specified collection; pass 0 to get gifts regardless of collections.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;
  /// Pass true to exclude gifts that aren't saved to the chat's profile page. Always true for gifts received by other users and channel chats without can_post_messages administrator right.
  bool exclude_unsaved_;
  static jfieldID exclude_unsaved_fieldID;
  /// Pass true to exclude gifts that are saved to the chat's profile page. Always false for gifts received by other users and channel chats without can_post_messages administrator right.
  bool exclude_saved_;
  static jfieldID exclude_saved_fieldID;
  /// Pass true to exclude gifts that can be purchased unlimited number of times.
  bool exclude_unlimited_;
  static jfieldID exclude_unlimited_fieldID;
  /// Pass true to exclude gifts that can be purchased limited number of times and can be upgraded.
  bool exclude_upgradable_;
  static jfieldID exclude_upgradable_fieldID;
  /// Pass true to exclude gifts that can be purchased limited number of times and can't be upgraded.
  bool exclude_non_upgradable_;
  static jfieldID exclude_non_upgradable_fieldID;
  /// Pass true to exclude upgraded gifts.
  bool exclude_upgraded_;
  static jfieldID exclude_upgraded_fieldID;
  /// Pass true to exclude gifts that can't be used in setUpgradedGiftColors.
  bool exclude_without_colors_;
  static jfieldID exclude_without_colors_fieldID;
  /// Pass true to exclude gifts that are just hosted and are not owned by the owner.
  bool exclude_hosted_;
  static jfieldID exclude_hosted_fieldID;
  /// Pass true to sort results by gift price instead of send date.
  bool sort_by_price_;
  static jfieldID sort_by_price_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns gifts received by the given user or chat.
   *
   * Returns object_ptr<ReceivedGifts>.
   */
  getReceivedGifts();

  /**
   * Creates a function, which returns gifts received by the given user or chat.
   *
   * Returns object_ptr<ReceivedGifts>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request; for bots only.
   * \param[in] owner_id_ Identifier of the gift receiver.
   * \param[in] collection_id_ Pass collection identifier to get gifts only from the specified collection; pass 0 to get gifts regardless of collections.
   * \param[in] exclude_unsaved_ Pass true to exclude gifts that aren't saved to the chat's profile page. Always true for gifts received by other users and channel chats without can_post_messages administrator right.
   * \param[in] exclude_saved_ Pass true to exclude gifts that are saved to the chat's profile page. Always false for gifts received by other users and channel chats without can_post_messages administrator right.
   * \param[in] exclude_unlimited_ Pass true to exclude gifts that can be purchased unlimited number of times.
   * \param[in] exclude_upgradable_ Pass true to exclude gifts that can be purchased limited number of times and can be upgraded.
   * \param[in] exclude_non_upgradable_ Pass true to exclude gifts that can be purchased limited number of times and can't be upgraded.
   * \param[in] exclude_upgraded_ Pass true to exclude upgraded gifts.
   * \param[in] exclude_without_colors_ Pass true to exclude gifts that can't be used in setUpgradedGiftColors.
   * \param[in] exclude_hosted_ Pass true to exclude gifts that are just hosted and are not owned by the owner.
   * \param[in] sort_by_price_ Pass true to sort results by gift price instead of send date.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
   */
  getReceivedGifts(string const &business_connection_id_, object_ptr<MessageSender> &&owner_id_, int32 collection_id_, bool exclude_unsaved_, bool exclude_saved_, bool exclude_unlimited_, bool exclude_upgradable_, bool exclude_non_upgradable_, bool exclude_upgraded_, bool exclude_without_colors_, bool exclude_hosted_, bool sort_by_price_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1411782110;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<receivedGifts>;

  static object_ptr<getReceivedGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatuses;

/**
 * Returns recent emoji statuses for self status.
 *
 * Returns object_ptr<EmojiStatuses>.
 */
class getRecentEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns recent emoji statuses for self status.
   *
   * Returns object_ptr<EmojiStatuses>.
   */
  getRecentEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1371914967;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  static object_ptr<getRecentEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class users;

/**
 * Returns up to 20 recently used inline bots in the order of their last usage.
 *
 * Returns object_ptr<Users>.
 */
class getRecentInlineBots final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns up to 20 recently used inline bots in the order of their last usage.
   *
   * Returns object_ptr<Users>.
   */
  getRecentInlineBots();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1437823548;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<users>;

  static object_ptr<getRecentInlineBots> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickers;

/**
 * Returns a list of recently used stickers.
 *
 * Returns object_ptr<Stickers>.
 */
class getRecentStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers.
  bool is_attached_;
  static jfieldID is_attached_fieldID;

  /**
   * Default constructor for a function, which returns a list of recently used stickers.
   *
   * Returns object_ptr<Stickers>.
   */
  getRecentStickers();

  /**
   * Creates a function, which returns a list of recently used stickers.
   *
   * Returns object_ptr<Stickers>.
   *
   * \param[in] is_attached_ Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers.
   */
  explicit getRecentStickers(bool is_attached_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -579622241;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getRecentStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns recently opened chats. This is an offline method. Returns chats in the order of last opening.
 *
 * Returns object_ptr<Chats>.
 */
class getRecentlyOpenedChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum number of chats to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns recently opened chats. This is an offline method. Returns chats in the order of last opening.
   *
   * Returns object_ptr<Chats>.
   */
  getRecentlyOpenedChats();

  /**
   * Creates a function, which returns recently opened chats. This is an offline method. Returns chats in the order of last opening.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] limit_ The maximum number of chats to be returned.
   */
  explicit getRecentlyOpenedChats(int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1924156893;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getRecentlyOpenedChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class tMeUrls;

/**
 * Returns t.me URLs recently visited by a newly registered user.
 *
 * Returns object_ptr<TMeUrls>.
 */
class getRecentlyVisitedTMeUrls final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Google Play referrer to identify the user.
  string referrer_;
  static jfieldID referrer_fieldID;

  /**
   * Default constructor for a function, which returns t.me URLs recently visited by a newly registered user.
   *
   * Returns object_ptr<TMeUrls>.
   */
  getRecentlyVisitedTMeUrls();

  /**
   * Creates a function, which returns t.me URLs recently visited by a newly registered user.
   *
   * Returns object_ptr<TMeUrls>.
   *
   * \param[in] referrer_ Google Play referrer to identify the user.
   */
  explicit getRecentlyVisitedTMeUrls(string const &referrer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 806754961;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<tMeUrls>;

  static object_ptr<getRecentlyVisitedTMeUrls> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class recommendedChatFolders;

/**
 * Returns recommended chat folders for the current user.
 *
 * Returns object_ptr<RecommendedChatFolders>.
 */
class getRecommendedChatFolders final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns recommended chat folders for the current user.
   *
   * Returns object_ptr<RecommendedChatFolders>.
   */
  getRecommendedChatFolders();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -145540217;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<recommendedChatFolders>;

  static object_ptr<getRecommendedChatFolders> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns a list of channel chats recommended to the current user.
 *
 * Returns object_ptr<Chats>.
 */
class getRecommendedChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns a list of channel chats recommended to the current user.
   *
   * Returns object_ptr<Chats>.
   */
  getRecommendedChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -649884303;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getRecommendedChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class recoveryEmailAddress;

/**
 * Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user.
 *
 * Returns object_ptr<RecoveryEmailAddress>.
 */
class getRecoveryEmailAddress final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password for the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user.
   *
   * Returns object_ptr<RecoveryEmailAddress>.
   */
  getRecoveryEmailAddress();

  /**
   * Creates a function, which returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user.
   *
   * Returns object_ptr<RecoveryEmailAddress>.
   *
   * \param[in] password_ The 2-step verification password for the current user.
   */
  explicit getRecoveryEmailAddress(string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1594770947;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<recoveryEmailAddress>;

  static object_ptr<getRecoveryEmailAddress> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class FileType;

class file;

/**
 * Returns information about a file by its remote identifier. This is an offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
 *
 * Returns object_ptr<File>.
 */
class getRemoteFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Remote identifier of the file to get.
  string remote_file_id_;
  static jfieldID remote_file_id_fieldID;
  /// File type; pass null if unknown.
  object_ptr<FileType> file_type_;
  static jfieldID file_type_fieldID;

  /**
   * Default constructor for a function, which returns information about a file by its remote identifier. This is an offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
   *
   * Returns object_ptr<File>.
   */
  getRemoteFile();

  /**
   * Creates a function, which returns information about a file by its remote identifier. This is an offline method. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] remote_file_id_ Remote identifier of the file to get.
   * \param[in] file_type_ File type; pass null if unknown.
   */
  getRemoteFile(string const &remote_file_id_, object_ptr<FileType> &&file_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2137204530;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<getRemoteFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message for messagePinMessage, the game message for messageGameScore, the invoice message for messagePaymentSuccessful, the message with a previously set same background for messageChatSetBackground, the giveaway message for messageGiveawayCompleted, the checklist message for messageChecklistTasksDone, messageChecklistTasksAdded, the message with suggested post information for messageSuggestedPostApprovalFailed, messageSuggestedPostApproved, messageSuggestedPostDeclined, messageSuggestedPostPaid, messageSuggestedPostRefunded, the message with the regular gift that was upgraded for messageUpgradedGift with origin of the type upgradedGiftOriginUpgrade, the message with gift purchase offer for messageUpgradedGiftPurchaseOfferRejected, the message with the request to disable content protection for messageChatHasProtectedContentToggled, the message with the poll for messagePollOptionAdded and messagePollOptionDeleted, and the topic creation message for topic messages without non-bundled replied message. Returns a 404 error if the message doesn't exist.
 *
 * Returns object_ptr<Message>.
 */
class getRepliedMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the reply message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message for messagePinMessage, the game message for messageGameScore, the invoice message for messagePaymentSuccessful, the message with a previously set same background for messageChatSetBackground, the giveaway message for messageGiveawayCompleted, the checklist message for messageChecklistTasksDone, messageChecklistTasksAdded, the message with suggested post information for messageSuggestedPostApprovalFailed, messageSuggestedPostApproved, messageSuggestedPostDeclined, messageSuggestedPostPaid, messageSuggestedPostRefunded, the message with the regular gift that was upgraded for messageUpgradedGift with origin of the type upgradedGiftOriginUpgrade, the message with gift purchase offer for messageUpgradedGiftPurchaseOfferRejected, the message with the request to disable content protection for messageChatHasProtectedContentToggled, the message with the poll for messagePollOptionAdded and messagePollOptionDeleted, and the topic creation message for topic messages without non-bundled replied message. Returns a 404 error if the message doesn't exist.
   *
   * Returns object_ptr<Message>.
   */
  getRepliedMessage();

  /**
   * Creates a function, which returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message for messagePinMessage, the game message for messageGameScore, the invoice message for messagePaymentSuccessful, the message with a previously set same background for messageChatSetBackground, the giveaway message for messageGiveawayCompleted, the checklist message for messageChecklistTasksDone, messageChecklistTasksAdded, the message with suggested post information for messageSuggestedPostApprovalFailed, messageSuggestedPostApproved, messageSuggestedPostDeclined, messageSuggestedPostPaid, messageSuggestedPostRefunded, the message with the regular gift that was upgraded for messageUpgradedGift with origin of the type upgradedGiftOriginUpgrade, the message with gift purchase offer for messageUpgradedGiftPurchaseOfferRejected, the message with the request to disable content protection for messageChatHasProtectedContentToggled, the message with the poll for messagePollOptionAdded and messagePollOptionDeleted, and the topic creation message for topic messages without non-bundled replied message. Returns a 404 error if the message doesn't exist.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Identifier of the chat the message belongs to.
   * \param[in] message_id_ Identifier of the reply message.
   */
  getRepliedMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -641918531;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getRepliedMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class animations;

/**
 * Returns saved animations.
 *
 * Returns object_ptr<Animations>.
 */
class getSavedAnimations final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns saved animations.
   *
   * Returns object_ptr<Animations>.
   */
  getSavedAnimations();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 7051032;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<animations>;

  static object_ptr<getSavedAnimations> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class savedMessagesTags;

/**
 * Returns tags used in Saved Messages or a Saved Messages topic.
 *
 * Returns object_ptr<SavedMessagesTags>.
 */
class getSavedMessagesTags final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic which tags will be returned; pass 0 to get all Saved Messages tags.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;

  /**
   * Default constructor for a function, which returns tags used in Saved Messages or a Saved Messages topic.
   *
   * Returns object_ptr<SavedMessagesTags>.
   */
  getSavedMessagesTags();

  /**
   * Creates a function, which returns tags used in Saved Messages or a Saved Messages topic.
   *
   * Returns object_ptr<SavedMessagesTags>.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic which tags will be returned; pass 0 to get all Saved Messages tags.
   */
  explicit getSavedMessagesTags(int53 saved_messages_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1932105815;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<savedMessagesTags>;

  static object_ptr<getSavedMessagesTags> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns messages in a Saved Messages topic. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
 *
 * Returns object_ptr<Messages>.
 */
class getSavedMessagesTopicHistory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic which messages will be fetched.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;
  /// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns messages in a Saved Messages topic. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   *
   * Returns object_ptr<Messages>.
   */
  getSavedMessagesTopicHistory();

  /**
   * Creates a function, which returns messages in a Saved Messages topic. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic which messages will be fetched.
   * \param[in] from_message_id_ Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number from -99 to -1 to get additionally -offset newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   */
  getSavedMessagesTopicHistory(int53 saved_messages_topic_id_, int53 from_message_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2011552360;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<getSavedMessagesTopicHistory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Returns the last message sent in a Saved Messages topic no later than the specified date.
 *
 * Returns object_ptr<Message>.
 */
class getSavedMessagesTopicMessageByDate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic which message will be returned.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;
  /// Point in time (Unix timestamp) relative to which to search for messages.
  int32 date_;
  static jfieldID date_fieldID;

  /**
   * Default constructor for a function, which returns the last message sent in a Saved Messages topic no later than the specified date.
   *
   * Returns object_ptr<Message>.
   */
  getSavedMessagesTopicMessageByDate();

  /**
   * Creates a function, which returns the last message sent in a Saved Messages topic no later than the specified date.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic which message will be returned.
   * \param[in] date_ Point in time (Unix timestamp) relative to which to search for messages.
   */
  getSavedMessagesTopicMessageByDate(int53 saved_messages_topic_id_, int32 date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1050786176;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<getSavedMessagesTopicMessageByDate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class notificationSound;

/**
 * Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier.
 *
 * Returns object_ptr<NotificationSound>.
 */
class getSavedNotificationSound final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the notification sound.
  int64 notification_sound_id_;
  static jfieldID notification_sound_id_fieldID;

  /**
   * Default constructor for a function, which returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier.
   *
   * Returns object_ptr<NotificationSound>.
   */
  getSavedNotificationSound();

  /**
   * Creates a function, which returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier.
   *
   * Returns object_ptr<NotificationSound>.
   *
   * \param[in] notification_sound_id_ Identifier of the notification sound.
   */
  explicit getSavedNotificationSound(int64 notification_sound_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1790319616;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<notificationSound>;

  static object_ptr<getSavedNotificationSound> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class notificationSounds;

/**
 * Returns the list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used.
 *
 * Returns object_ptr<NotificationSounds>.
 */
class getSavedNotificationSounds final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used.
   *
   * Returns object_ptr<NotificationSounds>.
   */
  getSavedNotificationSounds();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1070305368;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<notificationSounds>;

  static object_ptr<getSavedNotificationSounds> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class orderInfo;

/**
 * Returns saved order information. Returns a 404 error if there is no saved order information.
 *
 * Returns object_ptr<OrderInfo>.
 */
class getSavedOrderInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns saved order information. Returns a 404 error if there is no saved order information.
   *
   * Returns object_ptr<OrderInfo>.
   */
  getSavedOrderInfo();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1152016675;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<orderInfo>;

  static object_ptr<getSavedOrderInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class NotificationSettingsScope;

class scopeNotificationSettings;

/**
 * Returns the notification settings for chats of a given type.
 *
 * Returns object_ptr<ScopeNotificationSettings>.
 */
class getScopeNotificationSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Types of chats for which to return the notification settings information.
  object_ptr<NotificationSettingsScope> scope_;
  static jfieldID scope_fieldID;

  /**
   * Default constructor for a function, which returns the notification settings for chats of a given type.
   *
   * Returns object_ptr<ScopeNotificationSettings>.
   */
  getScopeNotificationSettings();

  /**
   * Creates a function, which returns the notification settings for chats of a given type.
   *
   * Returns object_ptr<ScopeNotificationSettings>.
   *
   * \param[in] scope_ Types of chats for which to return the notification settings information.
   */
  explicit getScopeNotificationSettings(object_ptr<NotificationSettingsScope> &&scope_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -995613361;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<scopeNotificationSettings>;

  static object_ptr<getScopeNotificationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class sponsoredChats;

/**
 * Returns sponsored chats to be shown in the search results.
 *
 * Returns object_ptr<SponsoredChats>.
 */
class getSearchSponsoredChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query the user searches for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Default constructor for a function, which returns sponsored chats to be shown in the search results.
   *
   * Returns object_ptr<SponsoredChats>.
   */
  getSearchSponsoredChats();

  /**
   * Creates a function, which returns sponsored chats to be shown in the search results.
   *
   * Returns object_ptr<SponsoredChats>.
   *
   * \param[in] query_ Query the user searches for.
   */
  explicit getSearchSponsoredChats(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1568505164;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<sponsoredChats>;

  static object_ptr<getSearchSponsoredChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class hashtags;

/**
 * Returns recently searched for hashtags or cashtags by their prefix.
 *
 * Returns object_ptr<Hashtags>.
 */
class getSearchedForTags final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Prefix of hashtags or cashtags to return.
  string tag_prefix_;
  static jfieldID tag_prefix_fieldID;
  /// The maximum number of items to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns recently searched for hashtags or cashtags by their prefix.
   *
   * Returns object_ptr<Hashtags>.
   */
  getSearchedForTags();

  /**
   * Creates a function, which returns recently searched for hashtags or cashtags by their prefix.
   *
   * Returns object_ptr<Hashtags>.
   *
   * \param[in] tag_prefix_ Prefix of hashtags or cashtags to return.
   * \param[in] limit_ The maximum number of items to be returned.
   */
  getSearchedForTags(string const &tag_prefix_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1692716851;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<hashtags>;

  static object_ptr<getSearchedForTags> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class secretChat;

/**
 * Returns information about a secret chat by its identifier. This is an offline method.
 *
 * Returns object_ptr<SecretChat>.
 */
class getSecretChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Secret chat identifier.
  int32 secret_chat_id_;
  static jfieldID secret_chat_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a secret chat by its identifier. This is an offline method.
   *
   * Returns object_ptr<SecretChat>.
   */
  getSecretChat();

  /**
   * Creates a function, which returns information about a secret chat by its identifier. This is an offline method.
   *
   * Returns object_ptr<SecretChat>.
   *
   * \param[in] secret_chat_id_ Secret chat identifier.
   */
  explicit getSecretChat(int32 secret_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 40599169;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<secretChat>;

  static object_ptr<getSecretChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stakeDiceState;

/**
 * Returns the current state of stake dice.
 *
 * Returns object_ptr<StakeDiceState>.
 */
class getStakeDiceState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the current state of stake dice.
   *
   * Returns object_ptr<StakeDiceState>.
   */
  getStakeDiceState();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1389168065;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stakeDiceState>;

  static object_ptr<getStakeDiceState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class httpUrl;

/**
 * Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for the chat paid in the owned Telegram Stars.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getStarAdAccountUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owner of the Telegram Stars; can be identifier of an owned bot, or identifier of an owned channel chat.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;

  /**
   * Default constructor for a function, which returns a URL for a Telegram Ad platform account that can be used to set up advertisements for the chat paid in the owned Telegram Stars.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getStarAdAccountUrl();

  /**
   * Creates a function, which returns a URL for a Telegram Ad platform account that can be used to set up advertisements for the chat paid in the owned Telegram Stars.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] owner_id_ Identifier of the owner of the Telegram Stars; can be identifier of an owned bot, or identifier of an owned channel chat.
   */
  explicit getStarAdAccountUrl(object_ptr<MessageSender> &&owner_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1940473181;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getStarAdAccountUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starPaymentOptions;

/**
 * Returns available options for Telegram Stars gifting.
 *
 * Returns object_ptr<StarPaymentOptions>.
 */
class getStarGiftPaymentOptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who will receive Telegram Stars; pass 0 to get options for an unspecified user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns available options for Telegram Stars gifting.
   *
   * Returns object_ptr<StarPaymentOptions>.
   */
  getStarGiftPaymentOptions();

  /**
   * Creates a function, which returns available options for Telegram Stars gifting.
   *
   * Returns object_ptr<StarPaymentOptions>.
   *
   * \param[in] user_id_ Identifier of the user who will receive Telegram Stars; pass 0 to get options for an unspecified user.
   */
  explicit getStarGiftPaymentOptions(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -500735773;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starPaymentOptions>;

  static object_ptr<getStarGiftPaymentOptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starGiveawayPaymentOptions;

/**
 * Returns available options for Telegram Star giveaway creation.
 *
 * Returns object_ptr<StarGiveawayPaymentOptions>.
 */
class getStarGiveawayPaymentOptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns available options for Telegram Star giveaway creation.
   *
   * Returns object_ptr<StarGiveawayPaymentOptions>.
   */
  getStarGiveawayPaymentOptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -883172578;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starGiveawayPaymentOptions>;

  static object_ptr<getStarGiveawayPaymentOptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starPaymentOptions;

/**
 * Returns available options for Telegram Stars purchase.
 *
 * Returns object_ptr<StarPaymentOptions>.
 */
class getStarPaymentOptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns available options for Telegram Stars purchase.
   *
   * Returns object_ptr<StarPaymentOptions>.
   */
  getStarPaymentOptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1838351940;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starPaymentOptions>;

  static object_ptr<getStarPaymentOptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class starRevenueStatistics;

/**
 * Returns detailed Telegram Star revenue statistics.
 *
 * Returns object_ptr<StarRevenueStatistics>.
 */
class getStarRevenueStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owner of the Telegram Stars; can be identifier of the current user, an owned bot, or a supergroup or a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns detailed Telegram Star revenue statistics.
   *
   * Returns object_ptr<StarRevenueStatistics>.
   */
  getStarRevenueStatistics();

  /**
   * Creates a function, which returns detailed Telegram Star revenue statistics.
   *
   * Returns object_ptr<StarRevenueStatistics>.
   *
   * \param[in] owner_id_ Identifier of the owner of the Telegram Stars; can be identifier of the current user, an owned bot, or a supergroup or a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true.
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  getStarRevenueStatistics(object_ptr<MessageSender> &&owner_id_, bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -260356841;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starRevenueStatistics>;

  static object_ptr<getStarRevenueStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class starSubscriptions;

/**
 * Returns the list of Telegram Star subscriptions for the current user.
 *
 * Returns object_ptr<StarSubscriptions>.
 */
class getStarSubscriptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to receive only expiring subscriptions for which there are no enough Telegram Stars to extend.
  bool only_expiring_;
  static jfieldID only_expiring_fieldID;
  /// Offset of the first subscription to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;

  /**
   * Default constructor for a function, which returns the list of Telegram Star subscriptions for the current user.
   *
   * Returns object_ptr<StarSubscriptions>.
   */
  getStarSubscriptions();

  /**
   * Creates a function, which returns the list of Telegram Star subscriptions for the current user.
   *
   * Returns object_ptr<StarSubscriptions>.
   *
   * \param[in] only_expiring_ Pass true to receive only expiring subscriptions for which there are no enough Telegram Stars to extend.
   * \param[in] offset_ Offset of the first subscription to return as received from the previous request; use empty string to get the first chunk of results.
   */
  getStarSubscriptions(bool only_expiring_, string const &offset_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -641223956;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starSubscriptions>;

  static object_ptr<getStarSubscriptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class TransactionDirection;

class starTransactions;

/**
 * Returns the list of Telegram Star transactions for the specified owner.
 *
 * Returns object_ptr<StarTransactions>.
 */
class getStarTransactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owner of the Telegram Stars; can be the identifier of the current user, identifier of an owned bot, or identifier of a supergroup or a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// If non-empty, only transactions related to the Star Subscription will be returned.
  string subscription_id_;
  static jfieldID subscription_id_fieldID;
  /// Direction of the transactions to receive; pass null to get all transactions.
  object_ptr<TransactionDirection> direction_;
  static jfieldID direction_fieldID;
  /// Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of transactions to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of Telegram Star transactions for the specified owner.
   *
   * Returns object_ptr<StarTransactions>.
   */
  getStarTransactions();

  /**
   * Creates a function, which returns the list of Telegram Star transactions for the specified owner.
   *
   * Returns object_ptr<StarTransactions>.
   *
   * \param[in] owner_id_ Identifier of the owner of the Telegram Stars; can be the identifier of the current user, identifier of an owned bot, or identifier of a supergroup or a channel chat with supergroupFullInfo.can_get_star_revenue_statistics == true.
   * \param[in] subscription_id_ If non-empty, only transactions related to the Star Subscription will be returned.
   * \param[in] direction_ Direction of the transactions to receive; pass null to get all transactions.
   * \param[in] offset_ Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of transactions to return.
   */
  getStarTransactions(object_ptr<MessageSender> &&owner_id_, string const &subscription_id_, object_ptr<TransactionDirection> &&direction_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -304141747;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<starTransactions>;

  static object_ptr<getStarTransactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class httpUrl;

/**
 * Returns a URL for Telegram Star withdrawal.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getStarWithdrawalUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owner of the Telegram Stars; can be identifier of the current user, an owned bot, or an owned supergroup or channel chat.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The number of Telegram Stars to withdraw; must be between getOption(&quot;star_withdrawal_count_min&quot;) and getOption(&quot;star_withdrawal_count_max&quot;).
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns a URL for Telegram Star withdrawal.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getStarWithdrawalUrl();

  /**
   * Creates a function, which returns a URL for Telegram Star withdrawal.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] owner_id_ Identifier of the owner of the Telegram Stars; can be identifier of the current user, an owned bot, or an owned supergroup or channel chat.
   * \param[in] star_count_ The number of Telegram Stars to withdraw; must be between getOption(&quot;star_withdrawal_count_min&quot;) and getOption(&quot;star_withdrawal_count_max&quot;).
   * \param[in] password_ The 2-step verification password of the current user.
   */
  getStarWithdrawalUrl(object_ptr<MessageSender> &&owner_id_, int53 star_count_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1445841134;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getStarWithdrawalUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StatisticalGraph;

/**
 * Loads an asynchronous or a zoomed in statistical graph.
 *
 * Returns object_ptr<StatisticalGraph>.
 */
class getStatisticalGraph final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The token for graph loading.
  string token_;
  static jfieldID token_fieldID;
  /// X-value for zoomed in graph or 0 otherwise.
  int53 x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which loads an asynchronous or a zoomed in statistical graph.
   *
   * Returns object_ptr<StatisticalGraph>.
   */
  getStatisticalGraph();

  /**
   * Creates a function, which loads an asynchronous or a zoomed in statistical graph.
   *
   * Returns object_ptr<StatisticalGraph>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] token_ The token for graph loading.
   * \param[in] x_ X-value for zoomed in graph or 0 otherwise.
   */
  getStatisticalGraph(int53 chat_id_, string const &token_, int53 x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1100975515;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<StatisticalGraph>;

  static object_ptr<getStatisticalGraph> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class emojis;

/**
 * Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object.
 *
 * Returns object_ptr<Emojis>.
 */
class getStickerEmojis final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker file identifier.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object.
   *
   * Returns object_ptr<Emojis>.
   */
  getStickerEmojis();

  /**
   * Creates a function, which returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object.
   *
   * Returns object_ptr<Emojis>.
   *
   * \param[in] sticker_ Sticker file identifier.
   */
  explicit getStickerEmojis(object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1895508665;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojis>;

  static object_ptr<getStickerEmojis> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class outline;

/**
 * Returns outline of a sticker. This is an offline method. Returns a 404 error if the outline isn't known.
 *
 * Returns object_ptr<Outline>.
 */
class getStickerOutline final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File identifier of the sticker.
  int32 sticker_file_id_;
  static jfieldID sticker_file_id_fieldID;
  /// Pass true to get the outline scaled for animated emoji.
  bool for_animated_emoji_;
  static jfieldID for_animated_emoji_fieldID;
  /// Pass true to get the outline scaled for clicked animated emoji message.
  bool for_clicked_animated_emoji_message_;
  static jfieldID for_clicked_animated_emoji_message_fieldID;

  /**
   * Default constructor for a function, which returns outline of a sticker. This is an offline method. Returns a 404 error if the outline isn't known.
   *
   * Returns object_ptr<Outline>.
   */
  getStickerOutline();

  /**
   * Creates a function, which returns outline of a sticker. This is an offline method. Returns a 404 error if the outline isn't known.
   *
   * Returns object_ptr<Outline>.
   *
   * \param[in] sticker_file_id_ File identifier of the sticker.
   * \param[in] for_animated_emoji_ Pass true to get the outline scaled for animated emoji.
   * \param[in] for_clicked_animated_emoji_message_ Pass true to get the outline scaled for clicked animated emoji message.
   */
  getStickerOutline(int32 sticker_file_id_, bool for_animated_emoji_, bool for_clicked_animated_emoji_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1550504539;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<outline>;

  static object_ptr<getStickerOutline> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns outline of a sticker as an SVG path. This is an offline method. Returns an empty string if the outline isn't known.
 *
 * Returns object_ptr<Text>.
 */
class getStickerOutlineSvgPath final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File identifier of the sticker.
  int32 sticker_file_id_;
  static jfieldID sticker_file_id_fieldID;
  /// Pass true to get the outline scaled for animated emoji.
  bool for_animated_emoji_;
  static jfieldID for_animated_emoji_fieldID;
  /// Pass true to get the outline scaled for clicked animated emoji message.
  bool for_clicked_animated_emoji_message_;
  static jfieldID for_clicked_animated_emoji_message_fieldID;

  /**
   * Default constructor for a function, which returns outline of a sticker as an SVG path. This is an offline method. Returns an empty string if the outline isn't known.
   *
   * Returns object_ptr<Text>.
   */
  getStickerOutlineSvgPath();

  /**
   * Creates a function, which returns outline of a sticker as an SVG path. This is an offline method. Returns an empty string if the outline isn't known.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] sticker_file_id_ File identifier of the sticker.
   * \param[in] for_animated_emoji_ Pass true to get the outline scaled for animated emoji.
   * \param[in] for_clicked_animated_emoji_message_ Pass true to get the outline scaled for clicked animated emoji message.
   */
  getStickerOutlineSvgPath(int32 sticker_file_id_, bool for_animated_emoji_, bool for_clicked_animated_emoji_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1615497803;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getStickerOutlineSvgPath> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickerSet;

/**
 * Returns information about a sticker set by its identifier.
 *
 * Returns object_ptr<StickerSet>.
 */
class getStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set.
  int64 set_id_;
  static jfieldID set_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a sticker set by its identifier.
   *
   * Returns object_ptr<StickerSet>.
   */
  getStickerSet();

  /**
   * Creates a function, which returns information about a sticker set by its identifier.
   *
   * Returns object_ptr<StickerSet>.
   *
   * \param[in] set_id_ Identifier of the sticker set.
   */
  explicit getStickerSet(int64 set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1052318659;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSet>;

  static object_ptr<getStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns name of a sticker set by its identifier.
 *
 * Returns object_ptr<Text>.
 */
class getStickerSetName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the sticker set.
  int64 set_id_;
  static jfieldID set_id_fieldID;

  /**
   * Default constructor for a function, which returns name of a sticker set by its identifier.
   *
   * Returns object_ptr<Text>.
   */
  getStickerSetName();

  /**
   * Creates a function, which returns name of a sticker set by its identifier.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] set_id_ Identifier of the sticker set.
   */
  explicit getStickerSetName(int64 set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1039849089;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getStickerSetName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class stickers;

/**
 * Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned.
 *
 * Returns object_ptr<Stickers>.
 */
class getStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the stickers to return.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Search query; a space-separated list of emojis or a keyword prefix. If empty, returns all known installed stickers.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of stickers to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Chat identifier for which to return stickers. Available custom emoji stickers may be different for different chats.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned.
   *
   * Returns object_ptr<Stickers>.
   */
  getStickers();

  /**
   * Creates a function, which returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned.
   *
   * Returns object_ptr<Stickers>.
   *
   * \param[in] sticker_type_ Type of the stickers to return.
   * \param[in] query_ Search query; a space-separated list of emojis or a keyword prefix. If empty, returns all known installed stickers.
   * \param[in] limit_ The maximum number of stickers to be returned.
   * \param[in] chat_id_ Chat identifier for which to return stickers. Available custom emoji stickers may be different for different chats.
   */
  getStickers(object_ptr<StickerType> &&sticker_type_, string const &query_, int32 limit_, int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1158058819;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<getStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storageStatistics;

/**
 * Returns storage usage statistics. Can be called before authorization.
 *
 * Returns object_ptr<StorageStatistics>.
 */
class getStorageStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum number of chats with the largest storage usage for which separate statistics need to be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0.
  int32 chat_limit_;
  static jfieldID chat_limit_fieldID;

  /**
   * Default constructor for a function, which returns storage usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<StorageStatistics>.
   */
  getStorageStatistics();

  /**
   * Creates a function, which returns storage usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<StorageStatistics>.
   *
   * \param[in] chat_limit_ The maximum number of chats with the largest storage usage for which separate statistics need to be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0.
   */
  explicit getStorageStatistics(int32 chat_limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -853193929;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storageStatistics>;

  static object_ptr<getStorageStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storageStatisticsFast;

/**
 * Quickly returns approximate storage usage statistics. Can be called before authorization.
 *
 * Returns object_ptr<StorageStatisticsFast>.
 */
class getStorageStatisticsFast final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which quickly returns approximate storage usage statistics. Can be called before authorization.
   *
   * Returns object_ptr<StorageStatisticsFast>.
   */
  getStorageStatisticsFast();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 61368066;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storageStatisticsFast>;

  static object_ptr<getStorageStatisticsFast> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class story;

/**
 * Returns a story.
 *
 * Returns object_ptr<Story>.
 */
class getStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;
  static jfieldID only_local_fieldID;

  /**
   * Default constructor for a function, which returns a story.
   *
   * Returns object_ptr<Story>.
   */
  getStory();

  /**
   * Creates a function, which returns a story.
   *
   * Returns object_ptr<Story>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Story identifier.
   * \param[in] only_local_ Pass true to get only locally available information without sending network requests.
   */
  getStory(int53 story_poster_chat_id_, int32 story_id_, bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2011076366;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<story>;

  static object_ptr<getStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stories;

/**
 * Returns the list of stories added to the given story album. For optimal performance, the number of returned stories is chosen by TDLib.
 *
 * Returns object_ptr<Stories>.
 */
class getStoryAlbumStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Story album identifier.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;
  /// Offset of the first entry to return; use 0 to get results from the first album story.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of stories to be returned. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of stories added to the given story album. For optimal performance, the number of returned stories is chosen by TDLib.
   *
   * Returns object_ptr<Stories>.
   */
  getStoryAlbumStories();

  /**
   * Creates a function, which returns the list of stories added to the given story album. For optimal performance, the number of returned stories is chosen by TDLib.
   *
   * Returns object_ptr<Stories>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] story_album_id_ Story album identifier.
   * \param[in] offset_ Offset of the first entry to return; use 0 to get results from the first album story.
   * \param[in] limit_ The maximum number of stories to be returned. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   */
  getStoryAlbumStories(int53 chat_id_, int32 story_album_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1915090076;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stories>;

  static object_ptr<getStoryAlbumStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class availableReactions;

/**
 * Returns reactions, which can be chosen for a story.
 *
 * Returns object_ptr<AvailableReactions>.
 */
class getStoryAvailableReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of reaction per row, 5-25.
  int32 row_size_;
  static jfieldID row_size_fieldID;

  /**
   * Default constructor for a function, which returns reactions, which can be chosen for a story.
   *
   * Returns object_ptr<AvailableReactions>.
   */
  getStoryAvailableReactions();

  /**
   * Creates a function, which returns reactions, which can be chosen for a story.
   *
   * Returns object_ptr<AvailableReactions>.
   *
   * \param[in] row_size_ Number of reaction per row, 5-25.
   */
  explicit getStoryAvailableReactions(int32 row_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 595938619;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<availableReactions>;

  static object_ptr<getStoryAvailableReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyInteractions;

/**
 * Returns interactions with a story. The method can be called only for stories posted on behalf of the current user.
 *
 * Returns object_ptr<StoryInteractions>.
 */
class getStoryInteractions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Query to search for in names, usernames and titles; may be empty to get all relevant interactions.
  string query_;
  static jfieldID query_fieldID;
  /// Pass true to get only interactions by contacts; pass false to get all relevant interactions.
  bool only_contacts_;
  static jfieldID only_contacts_fieldID;
  /// Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date.
  bool prefer_forwards_;
  static jfieldID prefer_forwards_fieldID;
  /// Pass true to get interactions with reaction first; pass false to get interactions sorted just by interaction date. Ignored if prefer_forwards == true.
  bool prefer_with_reaction_;
  static jfieldID prefer_with_reaction_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of story interactions to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns interactions with a story. The method can be called only for stories posted on behalf of the current user.
   *
   * Returns object_ptr<StoryInteractions>.
   */
  getStoryInteractions();

  /**
   * Creates a function, which returns interactions with a story. The method can be called only for stories posted on behalf of the current user.
   *
   * Returns object_ptr<StoryInteractions>.
   *
   * \param[in] story_id_ Story identifier.
   * \param[in] query_ Query to search for in names, usernames and titles; may be empty to get all relevant interactions.
   * \param[in] only_contacts_ Pass true to get only interactions by contacts; pass false to get all relevant interactions.
   * \param[in] prefer_forwards_ Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date.
   * \param[in] prefer_with_reaction_ Pass true to get interactions with reaction first; pass false to get interactions sorted just by interaction date. Ignored if prefer_forwards == true.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of story interactions to return.
   */
  getStoryInteractions(int32 story_id_, string const &query_, bool only_contacts_, bool prefer_forwards_, bool prefer_with_reaction_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 483475469;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyInteractions>;

  static object_ptr<getStoryInteractions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns the list of chats with non-default notification settings for stories.
 *
 * Returns object_ptr<Chats>.
 */
class getStoryNotificationSettingsExceptions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of chats with non-default notification settings for stories.
   *
   * Returns object_ptr<Chats>.
   */
  getStoryNotificationSettingsExceptions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 627715760;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getStoryNotificationSettingsExceptions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class publicForwards;

/**
 * Returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
 *
 * Returns object_ptr<PublicForwards>.
 */
class getStoryPublicForwards final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
   *
   * Returns object_ptr<PublicForwards>.
   */
  getStoryPublicForwards();

  /**
   * Creates a function, which returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
   *
   * Returns object_ptr<PublicForwards>.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story.
   * \param[in] story_id_ The identifier of the story.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit.
   */
  getStoryPublicForwards(int53 story_poster_chat_id_, int32 story_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1810378546;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<publicForwards>;

  static object_ptr<getStoryPublicForwards> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyStatistics;

/**
 * Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true.
 *
 * Returns object_ptr<StoryStatistics>.
 */
class getStoryStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Story identifier.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns detailed statistics about a story. Can be used only if story.can_get_statistics == true.
   *
   * Returns object_ptr<StoryStatistics>.
   */
  getStoryStatistics();

  /**
   * Creates a function, which returns detailed statistics about a story. Can be used only if story.can_get_statistics == true.
   *
   * Returns object_ptr<StoryStatistics>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] story_id_ Story identifier.
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  getStoryStatistics(int53 chat_id_, int32 story_id_, bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 982926146;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyStatistics>;

  static object_ptr<getStoryStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns suggested name for saving a file in a given directory.
 *
 * Returns object_ptr<Text>.
 */
class getSuggestedFileName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Directory in which the file is expected to be saved.
  string directory_;
  static jfieldID directory_fieldID;

  /**
   * Default constructor for a function, which returns suggested name for saving a file in a given directory.
   *
   * Returns object_ptr<Text>.
   */
  getSuggestedFileName();

  /**
   * Creates a function, which returns suggested name for saving a file in a given directory.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] file_id_ Identifier of the file.
   * \param[in] directory_ Directory in which the file is expected to be saved.
   */
  getSuggestedFileName(int32 file_id_, string const &directory_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2049399674;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getSuggestedFileName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns a suggested name for a new sticker set with a given title.
 *
 * Returns object_ptr<Text>.
 */
class getSuggestedStickerSetName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set title; 1-64 characters.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Default constructor for a function, which returns a suggested name for a new sticker set with a given title.
   *
   * Returns object_ptr<Text>.
   */
  getSuggestedStickerSetName();

  /**
   * Creates a function, which returns a suggested name for a new sticker set with a given title.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] title_ Sticker set title; 1-64 characters.
   */
  explicit getSuggestedStickerSetName(string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1340995520;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getSuggestedStickerSetName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first.
 *
 * Returns object_ptr<Chats>.
 */
class getSuitableDiscussionChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first.
   *
   * Returns object_ptr<Chats>.
   */
  getSuitableDiscussionChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 49044982;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getSuitableDiscussionChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Returns a list of channel chats, which can be used as a personal chat.
 *
 * Returns object_ptr<Chats>.
 */
class getSuitablePersonalChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns a list of channel chats, which can be used as a personal chat.
   *
   * Returns object_ptr<Chats>.
   */
  getSuitablePersonalChats();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1870357515;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getSuitablePersonalChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class supergroup;

/**
 * Returns information about a supergroup or a channel by its identifier. This is an offline method if the current user is not a bot.
 *
 * Returns object_ptr<Supergroup>.
 */
class getSupergroup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup or channel identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a supergroup or a channel by its identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<Supergroup>.
   */
  getSupergroup();

  /**
   * Creates a function, which returns information about a supergroup or a channel by its identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<Supergroup>.
   *
   * \param[in] supergroup_id_ Supergroup or channel identifier.
   */
  explicit getSupergroup(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 989663458;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<supergroup>;

  static object_ptr<getSupergroup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class supergroupFullInfo;

/**
 * Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.
 *
 * Returns object_ptr<SupergroupFullInfo>.
 */
class getSupergroupFullInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup or channel identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * Default constructor for a function, which returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.
   *
   * Returns object_ptr<SupergroupFullInfo>.
   */
  getSupergroupFullInfo();

  /**
   * Creates a function, which returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.
   *
   * Returns object_ptr<SupergroupFullInfo>.
   *
   * \param[in] supergroup_id_ Supergroup or channel identifier.
   */
  explicit getSupergroupFullInfo(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1099776056;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<supergroupFullInfo>;

  static object_ptr<getSupergroupFullInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class SupergroupMembersFilter;

class chatMembers;

/**
 * Returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters.
 *
 * Returns object_ptr<ChatMembers>.
 */
class getSupergroupMembers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The type of users to return; pass null to use supergroupMembersFilterRecent.
  object_ptr<SupergroupMembersFilter> filter_;
  static jfieldID filter_fieldID;
  /// Number of users to skip.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of users to be returned; up to 200.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters.
   *
   * Returns object_ptr<ChatMembers>.
   */
  getSupergroupMembers();

  /**
   * Creates a function, which returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters.
   *
   * Returns object_ptr<ChatMembers>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   * \param[in] filter_ The type of users to return; pass null to use supergroupMembersFilterRecent.
   * \param[in] offset_ Number of users to skip.
   * \param[in] limit_ The maximum number of users to be returned; up to 200.
   */
  getSupergroupMembers(int53 supergroup_id_, object_ptr<SupergroupMembersFilter> &&filter_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -570940984;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatMembers>;

  static object_ptr<getSupergroupMembers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Returns localized name of the Telegram support user; for Telegram support only.
 *
 * Returns object_ptr<Text>.
 */
class getSupportName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns localized name of the Telegram support user; for Telegram support only.
   *
   * Returns object_ptr<Text>.
   */
  getSupportName();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1302205794;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getSupportName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Returns a user who can be contacted to get support.
 *
 * Returns object_ptr<User>.
 */
class getSupportUser final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns a user who can be contacted to get support.
   *
   * Returns object_ptr<User>.
   */
  getSupportUser();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1733497700;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<getSupportUser> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class temporaryPasswordState;

/**
 * Returns information about the current temporary password.
 *
 * Returns object_ptr<TemporaryPasswordState>.
 */
class getTemporaryPasswordState final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns information about the current temporary password.
   *
   * Returns object_ptr<TemporaryPasswordState>.
   */
  getTemporaryPasswordState();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -12670830;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<temporaryPasswordState>;

  static object_ptr<getTemporaryPasswordState> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class textCompositionStyleExample;

/**
 * Returns an example of usage of a custom text composition style.
 *
 * Returns object_ptr<TextCompositionStyleExample>.
 */
class getTextCompositionStyleExample final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;
  /// 0-based unique number of the requested example; must be non-negative and less than getOption(&quot;text_composition_style_example_count&quot;).
  int32 example_number_;
  static jfieldID example_number_fieldID;

  /**
   * Default constructor for a function, which returns an example of usage of a custom text composition style.
   *
   * Returns object_ptr<TextCompositionStyleExample>.
   */
  getTextCompositionStyleExample();

  /**
   * Creates a function, which returns an example of usage of a custom text composition style.
   *
   * Returns object_ptr<TextCompositionStyleExample>.
   *
   * \param[in] name_ Name of the style.
   * \param[in] example_number_ 0-based unique number of the requested example; must be non-negative and less than getOption(&quot;text_composition_style_example_count&quot;).
   */
  getTextCompositionStyleExample(string const &name_, int32 example_number_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1657648173;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<textCompositionStyleExample>;

  static object_ptr<getTextCompositionStyleExample> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class textEntities;

/**
 * Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously.
 *
 * Returns object_ptr<TextEntities>.
 */
class getTextEntities final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text in which to look for entities.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously.
   *
   * Returns object_ptr<TextEntities>.
   */
  getTextEntities();

  /**
   * Creates a function, which returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously.
   *
   * Returns object_ptr<TextEntities>.
   *
   * \param[in] text_ The text in which to look for entities.
   */
  explicit getTextEntities(string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -341490693;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<textEntities>;

  static object_ptr<getTextEntities> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

class themeParameters;

/**
 * Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously.
 *
 * Returns object_ptr<Text>.
 */
class getThemeParametersJsonString final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Theme parameters to convert to JSON.
  object_ptr<themeParameters> theme_;
  static jfieldID theme_fieldID;

  /**
   * Default constructor for a function, which converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   */
  getThemeParametersJsonString();

  /**
   * Creates a function, which converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] theme_ Theme parameters to convert to JSON.
   */
  explicit getThemeParametersJsonString(object_ptr<themeParameters> &&theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1850145288;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<getThemeParametersJsonString> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatusCustomEmojis;

/**
 * Returns up to 8 emoji statuses, which must be shown in the emoji status list for chats.
 *
 * Returns object_ptr<EmojiStatusCustomEmojis>.
 */
class getThemedChatEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns up to 8 emoji statuses, which must be shown in the emoji status list for chats.
   *
   * Returns object_ptr<EmojiStatusCustomEmojis>.
   */
  getThemedChatEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1924568314;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatusCustomEmojis>;

  static object_ptr<getThemedChatEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatusCustomEmojis;

/**
 * Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list for self status.
 *
 * Returns object_ptr<EmojiStatusCustomEmojis>.
 */
class getThemedEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list for self status.
   *
   * Returns object_ptr<EmojiStatusCustomEmojis>.
   */
  getThemedEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1468220543;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatusCustomEmojis>;

  static object_ptr<getThemedEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class timeZones;

/**
 * Returns the list of supported time zones.
 *
 * Returns object_ptr<TimeZones>.
 */
class getTimeZones final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns the list of supported time zones.
   *
   * Returns object_ptr<TimeZones>.
   */
  getTimeZones();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1340268632;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<timeZones>;

  static object_ptr<getTimeZones> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class tonRevenueStatistics;

/**
 * Returns detailed Toncoin revenue statistics of the current user.
 *
 * Returns object_ptr<TonRevenueStatistics>.
 */
class getTonRevenueStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true if a dark theme is used by the application.
  bool is_dark_;
  static jfieldID is_dark_fieldID;

  /**
   * Default constructor for a function, which returns detailed Toncoin revenue statistics of the current user.
   *
   * Returns object_ptr<TonRevenueStatistics>.
   */
  getTonRevenueStatistics();

  /**
   * Creates a function, which returns detailed Toncoin revenue statistics of the current user.
   *
   * Returns object_ptr<TonRevenueStatistics>.
   *
   * \param[in] is_dark_ Pass true if a dark theme is used by the application.
   */
  explicit getTonRevenueStatistics(bool is_dark_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1315591160;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<tonRevenueStatistics>;

  static object_ptr<getTonRevenueStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class TransactionDirection;

class tonTransactions;

/**
 * Returns the list of Toncoin transactions of the current user.
 *
 * Returns object_ptr<TonTransactions>.
 */
class getTonTransactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Direction of the transactions to receive; pass null to get all transactions.
  object_ptr<TransactionDirection> direction_;
  static jfieldID direction_fieldID;
  /// Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of transactions to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of Toncoin transactions of the current user.
   *
   * Returns object_ptr<TonTransactions>.
   */
  getTonTransactions();

  /**
   * Creates a function, which returns the list of Toncoin transactions of the current user.
   *
   * Returns object_ptr<TonTransactions>.
   *
   * \param[in] direction_ Direction of the transactions to receive; pass null to get all transactions.
   * \param[in] offset_ Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of transactions to return.
   */
  getTonTransactions(object_ptr<TransactionDirection> &&direction_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1935011115;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<tonTransactions>;

  static object_ptr<getTonTransactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns a URL for Toncoin withdrawal from the current user's account. The user must have at least 10 toncoins to withdraw and can withdraw up to 100000 Toncoins in one transaction.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getTonWithdrawalUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns a URL for Toncoin withdrawal from the current user's account. The user must have at least 10 toncoins to withdraw and can withdraw up to 100000 Toncoins in one transaction.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getTonWithdrawalUrl();

  /**
   * Creates a function, which returns a URL for Toncoin withdrawal from the current user's account. The user must have at least 10 toncoins to withdraw and can withdraw up to 100000 Toncoins in one transaction.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] password_ The 2-step verification password of the current user.
   */
  explicit getTonWithdrawalUrl(string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1482519601;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getTonWithdrawalUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class TopChatCategory;

class chats;

/**
 * Returns a list of frequently used chats.
 *
 * Returns object_ptr<Chats>.
 */
class getTopChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Category of chats to be returned.
  object_ptr<TopChatCategory> category_;
  static jfieldID category_fieldID;
  /// The maximum number of chats to be returned; up to 30.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns a list of frequently used chats.
   *
   * Returns object_ptr<Chats>.
   */
  getTopChats();

  /**
   * Creates a function, which returns a list of frequently used chats.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] category_ Category of chats to be returned.
   * \param[in] limit_ The maximum number of chats to be returned; up to 30.
   */
  getTopChats(object_ptr<TopChatCategory> &&category_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -388410847;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<getTopChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class trendingStickerSets;

/**
 * Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib.
 *
 * Returns object_ptr<TrendingStickerSets>.
 */
class getTrendingStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// The offset from which to return the sticker sets; must be non-negative.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib.
   *
   * Returns object_ptr<TrendingStickerSets>.
   */
  getTrendingStickerSets();

  /**
   * Creates a function, which returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib.
   *
   * Returns object_ptr<TrendingStickerSets>.
   *
   * \param[in] sticker_type_ Type of the sticker sets to return.
   * \param[in] offset_ The offset from which to return the sticker sets; must be non-negative.
   * \param[in] limit_ The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached.
   */
  getTrendingStickerSets(object_ptr<StickerType> &&sticker_type_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -531085986;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<trendingStickerSets>;

  static object_ptr<getTrendingStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGift;

/**
 * Returns information about an upgraded gift by its name.
 *
 * Returns object_ptr<UpgradedGift>.
 */
class getUpgradedGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique name of the upgraded gift.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which returns information about an upgraded gift by its name.
   *
   * Returns object_ptr<UpgradedGift>.
   */
  getUpgradedGift();

  /**
   * Creates a function, which returns information about an upgraded gift by its name.
   *
   * Returns object_ptr<UpgradedGift>.
   *
   * \param[in] name_ Unique name of the upgraded gift.
   */
  explicit getUpgradedGift(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1331821135;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<upgradedGift>;

  static object_ptr<getUpgradedGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatuses;

/**
 * Returns available upgraded gift emoji statuses for self status.
 *
 * Returns object_ptr<EmojiStatuses>.
 */
class getUpgradedGiftEmojiStatuses final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns available upgraded gift emoji statuses for self status.
   *
   * Returns object_ptr<EmojiStatuses>.
   */
  getUpgradedGiftEmojiStatuses();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1748975723;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiStatuses>;

  static object_ptr<getUpgradedGiftEmojiStatuses> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class upgradedGiftValueInfo;

/**
 * Returns information about value of an upgraded gift by its name.
 *
 * Returns object_ptr<UpgradedGiftValueInfo>.
 */
class getUpgradedGiftValueInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique name of the upgraded gift.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which returns information about value of an upgraded gift by its name.
   *
   * Returns object_ptr<UpgradedGiftValueInfo>.
   */
  getUpgradedGiftValueInfo();

  /**
   * Creates a function, which returns information about value of an upgraded gift by its name.
   *
   * Returns object_ptr<UpgradedGiftValueInfo>.
   *
   * \param[in] name_ Unique name of the upgraded gift.
   */
  explicit getUpgradedGiftValueInfo(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1818813417;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<upgradedGiftValueInfo>;

  static object_ptr<getUpgradedGiftValueInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftUpgradeVariants;

/**
 * Returns all possible variants of upgraded gifts for a regular gift.
 *
 * Returns object_ptr<GiftUpgradeVariants>.
 */
class getUpgradedGiftVariants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the regular gift.
  int64 regular_gift_id_;
  static jfieldID regular_gift_id_fieldID;
  /// Pass true to get models that can be obtained by upgrading a regular gift.
  bool return_upgrade_models_;
  static jfieldID return_upgrade_models_fieldID;
  /// Pass true to get models that can be obtained by crafting a gift from upgraded gifts.
  bool return_craft_models_;
  static jfieldID return_craft_models_fieldID;

  /**
   * Default constructor for a function, which returns all possible variants of upgraded gifts for a regular gift.
   *
   * Returns object_ptr<GiftUpgradeVariants>.
   */
  getUpgradedGiftVariants();

  /**
   * Creates a function, which returns all possible variants of upgraded gifts for a regular gift.
   *
   * Returns object_ptr<GiftUpgradeVariants>.
   *
   * \param[in] regular_gift_id_ Identifier of the regular gift.
   * \param[in] return_upgrade_models_ Pass true to get models that can be obtained by upgrading a regular gift.
   * \param[in] return_craft_models_ Pass true to get models that can be obtained by crafting a gift from upgraded gifts.
   */
  getUpgradedGiftVariants(int64 regular_gift_id_, bool return_upgrade_models_, bool return_craft_models_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1388671540;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftUpgradeVariants>;

  static object_ptr<getUpgradedGiftVariants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getUpgradedGiftWithdrawalUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getUpgradedGiftWithdrawalUrl();

  /**
   * Creates a function, which returns a URL for upgraded gift withdrawal in the TON blockchain as an NFT; requires owner privileges for gifts owned by a chat.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] received_gift_id_ Identifier of the gift.
   * \param[in] password_ The 2-step verification password of the current user.
   */
  getUpgradedGiftWithdrawalUrl(string const &received_gift_id_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -784331188;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getUpgradedGiftWithdrawalUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class animation;

/**
 * Returns promotional animation for upgraded gifts.
 *
 * Returns object_ptr<Animation>.
 */
class getUpgradedGiftsPromotionalAnimation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns promotional animation for upgraded gifts.
   *
   * Returns object_ptr<Animation>.
   */
  getUpgradedGiftsPromotionalAnimation();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1944094513;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<animation>;

  static object_ptr<getUpgradedGiftsPromotionalAnimation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Returns information about a user by their identifier. This is an offline method if the current user is not a bot.
 *
 * Returns object_ptr<User>.
 */
class getUser final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns information about a user by their identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<User>.
   */
  getUser();

  /**
   * Creates a function, which returns information about a user by their identifier. This is an offline method if the current user is not a bot.
   *
   * Returns object_ptr<User>.
   *
   * \param[in] user_id_ User identifier.
   */
  explicit getUser(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1117363211;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<getUser> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundChatBoosts;

/**
 * Returns the list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only.
 *
 * Returns object_ptr<FoundChatBoosts>.
 */
class getUserChatBoosts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only.
   *
   * Returns object_ptr<FoundChatBoosts>.
   */
  getUserChatBoosts();

  /**
   * Creates a function, which returns the list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only.
   *
   * Returns object_ptr<FoundChatBoosts>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] user_id_ Identifier of the user.
   */
  getUserChatBoosts(int53 chat_id_, int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1190205543;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundChatBoosts>;

  static object_ptr<getUserChatBoosts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class userFullInfo;

/**
 * Returns full information about a user by their identifier.
 *
 * Returns object_ptr<UserFullInfo>.
 */
class getUserFullInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns full information about a user by their identifier.
   *
   * Returns object_ptr<UserFullInfo>.
   */
  getUserFullInfo();

  /**
   * Creates a function, which returns full information about a user by their identifier.
   *
   * Returns object_ptr<UserFullInfo>.
   *
   * \param[in] user_id_ User identifier.
   */
  explicit getUserFullInfo(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -776823720;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<userFullInfo>;

  static object_ptr<getUserFullInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class userLink;

/**
 * Returns an HTTPS link, which can be used to get information about the current user.
 *
 * Returns object_ptr<UserLink>.
 */
class getUserLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which returns an HTTPS link, which can be used to get information about the current user.
   *
   * Returns object_ptr<UserLink>.
   */
  getUserLink();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1226839270;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<userLink>;

  static object_ptr<getUserLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class UserPrivacySetting;

class userPrivacySettingRules;

/**
 * Returns the current privacy settings.
 *
 * Returns object_ptr<UserPrivacySettingRules>.
 */
class getUserPrivacySettingRules final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The privacy setting.
  object_ptr<UserPrivacySetting> setting_;
  static jfieldID setting_fieldID;

  /**
   * Default constructor for a function, which returns the current privacy settings.
   *
   * Returns object_ptr<UserPrivacySettingRules>.
   */
  getUserPrivacySettingRules();

  /**
   * Creates a function, which returns the current privacy settings.
   *
   * Returns object_ptr<UserPrivacySettingRules>.
   *
   * \param[in] setting_ The privacy setting.
   */
  explicit getUserPrivacySettingRules(object_ptr<UserPrivacySetting> &&setting_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2077223311;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<userPrivacySettingRules>;

  static object_ptr<getUserPrivacySettingRules> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class audios;

/**
 * Returns the list of profile audio files of a user.
 *
 * Returns object_ptr<Audios>.
 */
class getUserProfileAudios final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of audio files to skip; must be non-negative.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of audio files to be returned; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the list of profile audio files of a user.
   *
   * Returns object_ptr<Audios>.
   */
  getUserProfileAudios();

  /**
   * Creates a function, which returns the list of profile audio files of a user.
   *
   * Returns object_ptr<Audios>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] offset_ The number of audio files to skip; must be non-negative.
   * \param[in] limit_ The maximum number of audio files to be returned; up to 100.
   */
  getUserProfileAudios(int53 user_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -208876086;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<audios>;

  static object_ptr<getUserProfileAudios> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatPhotos;

/**
 * Returns the profile photos of a user. Personal and public photo aren't returned.
 *
 * Returns object_ptr<ChatPhotos>.
 */
class getUserProfilePhotos final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of photos to skip; must be non-negative.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of photos to be returned; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns the profile photos of a user. Personal and public photo aren't returned.
   *
   * Returns object_ptr<ChatPhotos>.
   */
  getUserProfilePhotos();

  /**
   * Creates a function, which returns the profile photos of a user. Personal and public photo aren't returned.
   *
   * Returns object_ptr<ChatPhotos>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] offset_ The number of photos to skip; must be non-negative.
   * \param[in] limit_ The maximum number of photos to be returned; up to 100.
   */
  getUserProfilePhotos(int53 user_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -908132798;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatPhotos>;

  static object_ptr<getUserProfilePhotos> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class userSupportInfo;

/**
 * Returns support information for the given user; for Telegram support only.
 *
 * Returns object_ptr<UserSupportInfo>.
 */
class getUserSupportInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which returns support information for the given user; for Telegram support only.
   *
   * Returns object_ptr<UserSupportInfo>.
   */
  getUserSupportInfo();

  /**
   * Creates a function, which returns support information for the given user; for Telegram support only.
   *
   * Returns object_ptr<UserSupportInfo>.
   *
   * \param[in] user_id_ User identifier.
   */
  explicit getUserSupportInfo(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1957008133;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<userSupportInfo>;

  static object_ptr<getUserSupportInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageSenders;

/**
 * Returns the list of participant identifiers, on whose behalf a video chat in the chat can be joined.
 *
 * Returns object_ptr<MessageSenders>.
 */
class getVideoChatAvailableParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns the list of participant identifiers, on whose behalf a video chat in the chat can be joined.
   *
   * Returns object_ptr<MessageSenders>.
   */
  getVideoChatAvailableParticipants();

  /**
   * Creates a function, which returns the list of participant identifiers, on whose behalf a video chat in the chat can be joined.
   *
   * Returns object_ptr<MessageSenders>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getVideoChatAvailableParticipants(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1000496379;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messageSenders>;

  static object_ptr<getVideoChatAvailableParticipants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

/**
 * Returns invite link to a video chat in a public chat.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getVideoChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Pass true if the invite link needs to contain an invite hash, passing which to joinVideoChat would allow the invited user to unmute themselves. Requires groupCall.can_be_managed right.
  bool can_self_unmute_;
  static jfieldID can_self_unmute_fieldID;

  /**
   * Default constructor for a function, which returns invite link to a video chat in a public chat.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getVideoChatInviteLink();

  /**
   * Creates a function, which returns invite link to a video chat in a public chat.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] can_self_unmute_ Pass true if the invite link needs to contain an invite hash, passing which to joinVideoChat would allow the invited user to unmute themselves. Requires groupCall.can_be_managed right.
   */
  getVideoChatInviteLink(int32 group_call_id_, bool can_self_unmute_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1394707321;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getVideoChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class rtmpUrl;

/**
 * Returns RTMP URL for streaming to the video chat of a chat; requires can_manage_video_chats administrator right.
 *
 * Returns object_ptr<RtmpUrl>.
 */
class getVideoChatRtmpUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which returns RTMP URL for streaming to the video chat of a chat; requires can_manage_video_chats administrator right.
   *
   * Returns object_ptr<RtmpUrl>.
   */
  getVideoChatRtmpUrl();

  /**
   * Creates a function, which returns RTMP URL for streaming to the video chat of a chat; requires can_manage_video_chats administrator right.
   *
   * Returns object_ptr<RtmpUrl>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit getVideoChatRtmpUrl(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1210784543;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<rtmpUrl>;

  static object_ptr<getVideoChatRtmpUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class videoMessageAdvertisements;

/**
 * Returns advertisements to be shown while a video from a message is watched. Available only if messageProperties.can_get_video_advertisements.
 *
 * Returns object_ptr<VideoMessageAdvertisements>.
 */
class getVideoMessageAdvertisements final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which returns advertisements to be shown while a video from a message is watched. Available only if messageProperties.can_get_video_advertisements.
   *
   * Returns object_ptr<VideoMessageAdvertisements>.
   */
  getVideoMessageAdvertisements();

  /**
   * Creates a function, which returns advertisements to be shown while a video from a message is watched. Available only if messageProperties.can_get_video_advertisements.
   *
   * Returns object_ptr<VideoMessageAdvertisements>.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message.
   */
  getVideoMessageAdvertisements(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -285681331;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<videoMessageAdvertisements>;

  static object_ptr<getVideoMessageAdvertisements> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

class webAppOpenParameters;

/**
 * Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getWebAppLinkUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which the link was clicked; pass 0 if none.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Short name of the Web App.
  string web_app_short_name_;
  static jfieldID web_app_short_name_fieldID;
  /// Start parameter from internalLinkTypeWebApp.
  string start_parameter_;
  static jfieldID start_parameter_fieldID;
  /// Pass true if the current user allowed the bot to send them messages.
  bool allow_write_access_;
  static jfieldID allow_write_access_fieldID;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getWebAppLinkUrl();

  /**
   * Creates a function, which returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] chat_id_ Identifier of the chat in which the link was clicked; pass 0 if none.
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] web_app_short_name_ Short name of the Web App.
   * \param[in] start_parameter_ Start parameter from internalLinkTypeWebApp.
   * \param[in] allow_write_access_ Pass true if the current user allowed the bot to send them messages.
   * \param[in] parameters_ Parameters to use to open the Web App.
   */
  getWebAppLinkUrl(int53 chat_id_, int53 bot_user_id_, string const &web_app_short_name_, string const &start_parameter_, bool allow_write_access_, object_ptr<webAppOpenParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1627284161;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getWebAppLinkUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class outline;

/**
 * Returns a default placeholder for Web Apps of a bot. This is an offline method. Returns a 404 error if the placeholder isn't known.
 *
 * Returns object_ptr<Outline>.
 */
class getWebAppPlaceholder final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;

  /**
   * Default constructor for a function, which returns a default placeholder for Web Apps of a bot. This is an offline method. Returns a 404 error if the placeholder isn't known.
   *
   * Returns object_ptr<Outline>.
   */
  getWebAppPlaceholder();

  /**
   * Creates a function, which returns a default placeholder for Web Apps of a bot. This is an offline method. Returns a 404 error if the placeholder isn't known.
   *
   * Returns object_ptr<Outline>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   */
  explicit getWebAppPlaceholder(int53 bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 583470479;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<outline>;

  static object_ptr<getWebAppPlaceholder> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class httpUrl;

class webAppOpenParameters;

/**
 * Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button.
 *
 * Returns object_ptr<HttpUrl>.
 */
class getWebAppUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu.
  string url_;
  static jfieldID url_fieldID;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button.
   *
   * Returns object_ptr<HttpUrl>.
   */
  getWebAppUrl();

  /**
   * Creates a function, which returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button.
   *
   * Returns object_ptr<HttpUrl>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method.
   * \param[in] url_ The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu.
   * \param[in] parameters_ Parameters to use to open the Web App.
   */
  getWebAppUrl(int53 bot_user_id_, string const &url_, object_ptr<webAppOpenParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1526784188;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<httpUrl>;

  static object_ptr<getWebAppUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class webPageInstantView;

/**
 * Returns an instant view version of a web page if available. This is an offline method if only_local is true. Returns a 404 error if the web page has no instant view page.
 *
 * Returns object_ptr<WebPageInstantView>.
 */
class getWebPageInstantView final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The web page URL.
  string url_;
  static jfieldID url_fieldID;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;
  static jfieldID only_local_fieldID;

  /**
   * Default constructor for a function, which returns an instant view version of a web page if available. This is an offline method if only_local is true. Returns a 404 error if the web page has no instant view page.
   *
   * Returns object_ptr<WebPageInstantView>.
   */
  getWebPageInstantView();

  /**
   * Creates a function, which returns an instant view version of a web page if available. This is an offline method if only_local is true. Returns a 404 error if the web page has no instant view page.
   *
   * Returns object_ptr<WebPageInstantView>.
   *
   * \param[in] url_ The web page URL.
   * \param[in] only_local_ Pass true to get only locally available information without sending network requests.
   */
  getWebPageInstantView(string const &url_, bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1741395197;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<webPageInstantView>;

  static object_ptr<getWebPageInstantView> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class ok;

/**
 * Allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class giftPremiumWithStars final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user which will receive Telegram Premium.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The number of Telegram Stars to pay for subscription.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Number of months the Telegram Premium subscription will be active for the user.
  int32 month_count_;
  static jfieldID month_count_fieldID;
  /// Text to show to the user receiving Telegram Premium; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  giftPremiumWithStars();

  /**
   * Creates a function, which allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user which will receive Telegram Premium.
   * \param[in] star_count_ The number of Telegram Stars to pay for subscription.
   * \param[in] month_count_ Number of months the Telegram Premium subscription will be active for the user.
   * \param[in] text_ Text to show to the user receiving Telegram Premium; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
   */
  giftPremiumWithStars(int53 user_id_, int53 star_count_, int32 month_count_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2058395432;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<giftPremiumWithStars> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Hides the list of contacts that have close birthdays for 24 hours.
 *
 * Returns object_ptr<Ok>.
 */
class hideContactCloseBirthdays final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which hides the list of contacts that have close birthdays for 24 hours.
   *
   * Returns object_ptr<Ok>.
   */
  hideContactCloseBirthdays();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1163065221;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<hideContactCloseBirthdays> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class SuggestedAction;

class ok;

/**
 * Hides a suggested action.
 *
 * Returns object_ptr<Ok>.
 */
class hideSuggestedAction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Suggested action to hide.
  object_ptr<SuggestedAction> action_;
  static jfieldID action_fieldID;

  /**
   * Default constructor for a function, which hides a suggested action.
   *
   * Returns object_ptr<Ok>.
   */
  hideSuggestedAction();

  /**
   * Creates a function, which hides a suggested action.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] action_ Suggested action to hide.
   */
  explicit hideSuggestedAction(object_ptr<SuggestedAction> &&action_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1561384065;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<hideSuggestedAction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class importedContact;

class importedContacts;

/**
 * Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored.
 *
 * Returns object_ptr<ImportedContacts>.
 */
class importContacts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The list of contacts to import or edit.
  array<object_ptr<importedContact>> contacts_;
  static jfieldID contacts_fieldID;

  /**
   * Default constructor for a function, which adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored.
   *
   * Returns object_ptr<ImportedContacts>.
   */
  importContacts();

  /**
   * Creates a function, which adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored.
   *
   * Returns object_ptr<ImportedContacts>.
   *
   * \param[in] contacts_ The list of contacts to import or edit.
   */
  explicit importContacts(array<object_ptr<importedContact>> &&contacts_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -662555959;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<importedContacts>;

  static object_ptr<importContacts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Imports messages exported from another application.
 *
 * Returns object_ptr<Ok>.
 */
class importMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded.
  object_ptr<InputFile> message_file_;
  static jfieldID message_file_fieldID;
  /// Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded.
  array<object_ptr<InputFile>> attached_files_;
  static jfieldID attached_files_fieldID;

  /**
   * Default constructor for a function, which imports messages exported from another application.
   *
   * Returns object_ptr<Ok>.
   */
  importMessages();

  /**
   * Creates a function, which imports messages exported from another application.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right.
   * \param[in] message_file_ File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded.
   * \param[in] attached_files_ Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded.
   */
  importMessages(int53 chat_id_, object_ptr<InputFile> &&message_file_, array<object_ptr<InputFile>> &&attached_files_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1864116784;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<importMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Increases a bid for an auction gift without changing gift text and receiver.
 *
 * Returns object_ptr<Ok>.
 */
class increaseGiftAuctionBid final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift to put the bid on.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;
  /// The number of Telegram Stars to put in the bid.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which increases a bid for an auction gift without changing gift text and receiver.
   *
   * Returns object_ptr<Ok>.
   */
  increaseGiftAuctionBid();

  /**
   * Creates a function, which increases a bid for an auction gift without changing gift text and receiver.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] gift_id_ Identifier of the gift to put the bid on.
   * \param[in] star_count_ The number of Telegram Stars to put in the bid.
   */
  increaseGiftAuctionBid(int64 gift_id_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -493509001;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<increaseGiftAuctionBid> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InviteGroupCallParticipantResult;

/**
 * Invites a user to an active group call; for group calls not bound to a chat only. Sends a service message of the type messageGroupCall. The group call can have at most getOption(&quot;group_call_participant_count_max&quot;) participants.
 *
 * Returns object_ptr<InviteGroupCallParticipantResult>.
 */
class inviteGroupCallParticipant final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Pass true if the group call is a video call.
  bool is_video_;
  static jfieldID is_video_fieldID;

  /**
   * Default constructor for a function, which invites a user to an active group call; for group calls not bound to a chat only. Sends a service message of the type messageGroupCall. The group call can have at most getOption(&quot;group_call_participant_count_max&quot;) participants.
   *
   * Returns object_ptr<InviteGroupCallParticipantResult>.
   */
  inviteGroupCallParticipant();

  /**
   * Creates a function, which invites a user to an active group call; for group calls not bound to a chat only. Sends a service message of the type messageGroupCall. The group call can have at most getOption(&quot;group_call_participant_count_max&quot;) participants.
   *
   * Returns object_ptr<InviteGroupCallParticipantResult>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] user_id_ User identifier.
   * \param[in] is_video_ Pass true if the group call is a video call.
   */
  inviteGroupCallParticipant(int32 group_call_id_, int53 user_id_, bool is_video_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -631535414;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<InviteGroupCallParticipantResult>;

  static object_ptr<inviteGroupCallParticipant> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Invites users to an active video chat. Sends a service message of the type messageInviteVideoChatParticipants to the chat bound to the group call.
 *
 * Returns object_ptr<Ok>.
 */
class inviteVideoChatParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// User identifiers. At most 10 users can be invited simultaneously.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Default constructor for a function, which invites users to an active video chat. Sends a service message of the type messageInviteVideoChatParticipants to the chat bound to the group call.
   *
   * Returns object_ptr<Ok>.
   */
  inviteVideoChatParticipants();

  /**
   * Creates a function, which invites users to an active video chat. Sends a service message of the type messageInviteVideoChatParticipants to the chat bound to the group call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] user_ids_ User identifiers. At most 10 users can be invited simultaneously.
   */
  inviteVideoChatParticipants(int32 group_call_id_, array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -473149298;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<inviteVideoChatParticipants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether the current user is required to set login email address.
 *
 * Returns object_ptr<Ok>.
 */
class isLoginEmailAddressRequired final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which checks whether the current user is required to set login email address.
   *
   * Returns object_ptr<Ok>.
   */
  isLoginEmailAddressRequired();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -874594326;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<isLoginEmailAddressRequired> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Checks whether a file is in the profile audio files of the current user. Returns a 404 error if it isn't.
 *
 * Returns object_ptr<Ok>.
 */
class isProfileAudio final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the audio file to check.
  int32 file_id_;
  static jfieldID file_id_fieldID;

  /**
   * Default constructor for a function, which checks whether a file is in the profile audio files of the current user. Returns a 404 error if it isn't.
   *
   * Returns object_ptr<Ok>.
   */
  isProfileAudio();

  /**
   * Creates a function, which checks whether a file is in the profile audio files of the current user. Returns a 404 error if it isn't.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the audio file to check.
   */
  explicit isProfileAudio(int32 file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -245729314;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<isProfileAudio> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method. May return an error with a message &quot;INVITE_REQUEST_SENT&quot; if only a join request was created.
 *
 * Returns object_ptr<Ok>.
 */
class joinChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which adds the current user as a new member to a chat. Private and secret chats can't be joined using this method. May return an error with a message &quot;INVITE_REQUEST_SENT&quot; if only a join request was created.
   *
   * Returns object_ptr<Ok>.
   */
  joinChat();

  /**
   * Creates a function, which adds the current user as a new member to a chat. Private and secret chats can't be joined using this method. May return an error with a message &quot;INVITE_REQUEST_SENT&quot; if only a join request was created.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit joinChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 326769313;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<joinChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Uses an invite link to add the current user to the chat if possible. May return an error with a message &quot;INVITE_REQUEST_SENT&quot; if only a join request was created.
 *
 * Returns object_ptr<Chat>.
 */
class joinChatByInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Invite link to use.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which uses an invite link to add the current user to the chat if possible. May return an error with a message &quot;INVITE_REQUEST_SENT&quot; if only a join request was created.
   *
   * Returns object_ptr<Chat>.
   */
  joinChatByInviteLink();

  /**
   * Creates a function, which uses an invite link to add the current user to the chat if possible. May return an error with a message &quot;INVITE_REQUEST_SENT&quot; if only a join request was created.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] invite_link_ Invite link to use.
   */
  explicit joinChatByInviteLink(string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1049973882;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<joinChatByInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputGroupCall;

class groupCallInfo;

class groupCallJoinParameters;

/**
 * Joins a regular group call that is not bound to a chat.
 *
 * Returns object_ptr<GroupCallInfo>.
 */
class joinGroupCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The group call to join.
  object_ptr<InputGroupCall> input_group_call_;
  static jfieldID input_group_call_fieldID;
  /// Parameters to join the call.
  object_ptr<groupCallJoinParameters> join_parameters_;
  static jfieldID join_parameters_fieldID;

  /**
   * Default constructor for a function, which joins a regular group call that is not bound to a chat.
   *
   * Returns object_ptr<GroupCallInfo>.
   */
  joinGroupCall();

  /**
   * Creates a function, which joins a regular group call that is not bound to a chat.
   *
   * Returns object_ptr<GroupCallInfo>.
   *
   * \param[in] input_group_call_ The group call to join.
   * \param[in] join_parameters_ Parameters to join the call.
   */
  joinGroupCall(object_ptr<InputGroupCall> &&input_group_call_, object_ptr<groupCallJoinParameters> &&join_parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2026079917;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<groupCallInfo>;

  static object_ptr<joinGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class groupCallJoinParameters;

class text;

/**
 * Joins a group call of an active live story. Returns join response payload for tgcalls.
 *
 * Returns object_ptr<Text>.
 */
class joinLiveStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Parameters to join the call.
  object_ptr<groupCallJoinParameters> join_parameters_;
  static jfieldID join_parameters_fieldID;

  /**
   * Default constructor for a function, which joins a group call of an active live story. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   */
  joinLiveStory();

  /**
   * Creates a function, which joins a group call of an active live story. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] join_parameters_ Parameters to join the call.
   */
  joinLiveStory(int32 group_call_id_, object_ptr<groupCallJoinParameters> &&join_parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 227825676;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<joinLiveStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class groupCallJoinParameters;

class text;

/**
 * Joins an active video chat. Returns join response payload for tgcalls.
 *
 * Returns object_ptr<Text>.
 */
class joinVideoChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Identifier of a group call participant, which will be used to join the call; pass null to join as self.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// Parameters to join the call.
  object_ptr<groupCallJoinParameters> join_parameters_;
  static jfieldID join_parameters_fieldID;
  /// Invite hash as received from internalLinkTypeVideoChat.
  string invite_hash_;
  static jfieldID invite_hash_fieldID;

  /**
   * Default constructor for a function, which joins an active video chat. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   */
  joinVideoChat();

  /**
   * Creates a function, which joins an active video chat. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] participant_id_ Identifier of a group call participant, which will be used to join the call; pass null to join as self.
   * \param[in] join_parameters_ Parameters to join the call.
   * \param[in] invite_hash_ Invite hash as received from internalLinkTypeVideoChat.
   */
  joinVideoChat(int32 group_call_id_, object_ptr<MessageSender> &&participant_id_, object_ptr<groupCallJoinParameters> &&join_parameters_, string const &invite_hash_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1322989999;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<joinVideoChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giveawayParameters;

class ok;

/**
 * Launches a prepaid giveaway.
 *
 * Returns object_ptr<Ok>.
 */
class launchPrepaidGiveaway final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the prepaid giveaway.
  int64 giveaway_id_;
  static jfieldID giveaway_id_fieldID;
  /// Giveaway parameters.
  object_ptr<giveawayParameters> parameters_;
  static jfieldID parameters_fieldID;
  /// The number of users to receive giveaway prize.
  int32 winner_count_;
  static jfieldID winner_count_fieldID;
  /// The number of Telegram Stars to be distributed through the giveaway; pass 0 for Telegram Premium giveaways.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which launches a prepaid giveaway.
   *
   * Returns object_ptr<Ok>.
   */
  launchPrepaidGiveaway();

  /**
   * Creates a function, which launches a prepaid giveaway.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] giveaway_id_ Unique identifier of the prepaid giveaway.
   * \param[in] parameters_ Giveaway parameters.
   * \param[in] winner_count_ The number of users to receive giveaway prize.
   * \param[in] star_count_ The number of Telegram Stars to be distributed through the giveaway; pass 0 for Telegram Premium giveaways.
   */
  launchPrepaidGiveaway(int64 giveaway_id_, object_ptr<giveawayParameters> &&parameters_, int32 winner_count_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 639465530;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<launchPrepaidGiveaway> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes the current user from chat members. Private and secret chats can't be left using this method.
 *
 * Returns object_ptr<Ok>.
 */
class leaveChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which removes the current user from chat members. Private and secret chats can't be left using this method.
   *
   * Returns object_ptr<Ok>.
   */
  leaveChat();

  /**
   * Creates a function, which removes the current user from chat members. Private and secret chats can't be left using this method.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit leaveChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1825080735;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<leaveChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Leaves a group call.
 *
 * Returns object_ptr<Ok>.
 */
class leaveGroupCall final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which leaves a group call.
   *
   * Returns object_ptr<Ok>.
   */
  leaveGroupCall();

  /**
   * Creates a function, which leaves a group call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit leaveGroupCall(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 980152233;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<leaveGroupCall> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that an audio was listened by the user.
 *
 * Returns object_ptr<Ok>.
 */
class listenToAudio final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file with an audio.
  int32 audio_file_id_;
  static jfieldID audio_file_id_fieldID;
  /// Duration of the listening to the audio, in seconds.
  int32 duration_;
  static jfieldID duration_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that an audio was listened by the user.
   *
   * Returns object_ptr<Ok>.
   */
  listenToAudio();

  /**
   * Creates a function, which informs TDLib that an audio was listened by the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] audio_file_id_ Identifier of the file with an audio.
   * \param[in] duration_ Duration of the listening to the audio, in seconds.
   */
  listenToAudio(int32 audio_file_id_, int32 duration_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 589191881;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<listenToAudio> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StoryList;

class ok;

/**
 * Loads more active stories from a story list. The loaded stories will be sent through updates. Active stories are sorted by the pair (active_stories.order, active_stories.story_poster_chat_id) in descending order. Returns a 404 error if all active stories have been loaded.
 *
 * Returns object_ptr<Ok>.
 */
class loadActiveStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The story list in which to load active stories.
  object_ptr<StoryList> story_list_;
  static jfieldID story_list_fieldID;

  /**
   * Default constructor for a function, which loads more active stories from a story list. The loaded stories will be sent through updates. Active stories are sorted by the pair (active_stories.order, active_stories.story_poster_chat_id) in descending order. Returns a 404 error if all active stories have been loaded.
   *
   * Returns object_ptr<Ok>.
   */
  loadActiveStories();

  /**
   * Creates a function, which loads more active stories from a story list. The loaded stories will be sent through updates. Active stories are sorted by the pair (active_stories.order, active_stories.story_poster_chat_id) in descending order. Returns a 404 error if all active stories have been loaded.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_list_ The story list in which to load active stories.
   */
  explicit loadActiveStories(object_ptr<StoryList> &&story_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2106390328;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadActiveStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class ok;

/**
 * Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded.
 *
 * Returns object_ptr<Ok>.
 */
class loadChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat list in which to load chats; pass null to load chats from the main chat list.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// The maximum number of chats to be loaded. For optimal performance, the number of loaded chats is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded.
   *
   * Returns object_ptr<Ok>.
   */
  loadChats();

  /**
   * Creates a function, which loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_list_ The chat list in which to load chats; pass null to load chats from the main chat list.
   * \param[in] limit_ The maximum number of chats to be loaded. For optimal performance, the number of loaded chats is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached.
   */
  loadChats(object_ptr<ChatList> &&chat_list_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1885635205;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Loads more topics in a channel direct messages chat administered by the current user. The loaded topics will be sent through updateDirectMessagesChatTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
 *
 * Returns object_ptr<Ok>.
 */
class loadDirectMessagesChatTopics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which loads more topics in a channel direct messages chat administered by the current user. The loaded topics will be sent through updateDirectMessagesChatTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
   *
   * Returns object_ptr<Ok>.
   */
  loadDirectMessagesChatTopics();

  /**
   * Creates a function, which loads more topics in a channel direct messages chat administered by the current user. The loaded topics will be sent through updateDirectMessagesChatTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] limit_ The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached.
   */
  loadDirectMessagesChatTopics(int53 chat_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1488065975;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadDirectMessagesChatTopics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Loads more participants of a group call; not supported in live stories. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been loaded.
 *
 * Returns object_ptr<Ok>.
 */
class loadGroupCallParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// The maximum number of participants to load; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which loads more participants of a group call; not supported in live stories. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been loaded.
   *
   * Returns object_ptr<Ok>.
   */
  loadGroupCallParticipants();

  /**
   * Creates a function, which loads more participants of a group call; not supported in live stories. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been loaded.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined.
   * \param[in] limit_ The maximum number of participants to load; up to 100.
   */
  loadGroupCallParticipants(int32 group_call_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 938720974;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadGroupCallParticipants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Loads quick reply messages that can be sent by a given quick reply shortcut. The loaded messages will be sent through updateQuickReplyShortcutMessages.
 *
 * Returns object_ptr<Ok>.
 */
class loadQuickReplyShortcutMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;

  /**
   * Default constructor for a function, which loads quick reply messages that can be sent by a given quick reply shortcut. The loaded messages will be sent through updateQuickReplyShortcutMessages.
   *
   * Returns object_ptr<Ok>.
   */
  loadQuickReplyShortcutMessages();

  /**
   * Creates a function, which loads quick reply messages that can be sent by a given quick reply shortcut. The loaded messages will be sent through updateQuickReplyShortcutMessages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shortcut_id_ Unique identifier of the quick reply shortcut.
   */
  explicit loadQuickReplyShortcutMessages(int32 shortcut_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -46092588;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadQuickReplyShortcutMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Loads quick reply shortcuts created by the current user. The loaded data will be sent through updateQuickReplyShortcut and updateQuickReplyShortcuts.
 *
 * Returns object_ptr<Ok>.
 */
class loadQuickReplyShortcuts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which loads quick reply shortcuts created by the current user. The loaded data will be sent through updateQuickReplyShortcut and updateQuickReplyShortcuts.
   *
   * Returns object_ptr<Ok>.
   */
  loadQuickReplyShortcuts();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1016614243;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadQuickReplyShortcuts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
 *
 * Returns object_ptr<Ok>.
 */
class loadSavedMessagesTopics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
   *
   * Returns object_ptr<Ok>.
   */
  loadSavedMessagesTopics();

  /**
   * Creates a function, which loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] limit_ The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached.
   */
  explicit loadSavedMessagesTopics(int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 289855160;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<loadSavedMessagesTopics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent.
 *
 * Returns object_ptr<Ok>.
 */
class logOut final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent.
   *
   * Returns object_ptr<Ok>.
   */
  logOut();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1581923301;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<logOut> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds tasks of a checklist in a message as done or not done.
 *
 * Returns object_ptr<Ok>.
 */
class markChecklistTasksAsDone final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the checklist. Use messageProperties.can_mark_tasks_as_done to check whether the tasks can be marked as done or not done.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifiers of tasks that were marked as done.
  array<int32> marked_as_done_task_ids_;
  static jfieldID marked_as_done_task_ids_fieldID;
  /// Identifiers of tasks that were marked as not done.
  array<int32> marked_as_not_done_task_ids_;
  static jfieldID marked_as_not_done_task_ids_fieldID;

  /**
   * Default constructor for a function, which adds tasks of a checklist in a message as done or not done.
   *
   * Returns object_ptr<Ok>.
   */
  markChecklistTasksAsDone();

  /**
   * Creates a function, which adds tasks of a checklist in a message as done or not done.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat with the message.
   * \param[in] message_id_ Identifier of the message containing the checklist. Use messageProperties.can_mark_tasks_as_done to check whether the tasks can be marked as done or not done.
   * \param[in] marked_as_done_task_ids_ Identifiers of tasks that were marked as done.
   * \param[in] marked_as_not_done_task_ids_ Identifiers of tasks that were marked as not done.
   */
  markChecklistTasksAsDone(int53 chat_id_, int53 message_id_, array<int32> &&marked_as_done_task_ids_, array<int32> &&marked_as_not_done_task_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 386950739;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<markChecklistTasksAsDone> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a bot was opened from the list of similar bots.
 *
 * Returns object_ptr<Ok>.
 */
class openBotSimilarBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the original bot, which similar bots were requested.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the opened bot.
  int53 opened_bot_user_id_;
  static jfieldID opened_bot_user_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a bot was opened from the list of similar bots.
   *
   * Returns object_ptr<Ok>.
   */
  openBotSimilarBot();

  /**
   * Creates a function, which informs TDLib that a bot was opened from the list of similar bots.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the original bot, which similar bots were requested.
   * \param[in] opened_bot_user_id_ Identifier of the opened bot.
   */
  openBotSimilarBot(int53 bot_user_id_, int53 opened_bot_user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -369688872;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openBotSimilarBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats).
 *
 * Returns object_ptr<Ok>.
 */
class openChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats).
   *
   * Returns object_ptr<Ok>.
   */
  openChat();

  /**
   * Creates a function, which informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats).
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit openChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -323371509;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a chat was opened from the list of similar chats. The method is independent of openChat and closeChat methods.
 *
 * Returns object_ptr<Ok>.
 */
class openChatSimilarChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the original chat, which similar chats were requested.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the opened chat.
  int53 opened_chat_id_;
  static jfieldID opened_chat_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a chat was opened from the list of similar chats. The method is independent of openChat and closeChat methods.
   *
   * Returns object_ptr<Ok>.
   */
  openChatSimilarChat();

  /**
   * Creates a function, which informs TDLib that a chat was opened from the list of similar chats. The method is independent of openChat and closeChat methods.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the original chat, which similar chats were requested.
   * \param[in] opened_chat_id_ Identifier of the opened chat.
   */
  openChatSimilarChat(int53 chat_id_, int53 opened_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1884883949;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openChatSimilarChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a gift auction was opened by the user.
 *
 * Returns object_ptr<Ok>.
 */
class openGiftAuction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift, which auction was opened.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a gift auction was opened by the user.
   *
   * Returns object_ptr<Ok>.
   */
  openGiftAuction();

  /**
   * Creates a function, which informs TDLib that a gift auction was opened by the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] gift_id_ Identifier of the gift, which auction was opened.
   */
  explicit openGiftAuction(int64 gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -694137370;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openGiftAuction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed.
 *
 * Returns object_ptr<Ok>.
 */
class openMessageContent final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with the opened content.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed.
   *
   * Returns object_ptr<Ok>.
   */
  openMessageContent();

  /**
   * Creates a function, which informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the message.
   * \param[in] message_id_ Identifier of the message with the opened content.
   */
  openMessageContent(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -739088005;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openMessageContent> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the user opened a sponsored chat.
 *
 * Returns object_ptr<Ok>.
 */
class openSponsoredChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the sponsored chat.
  int53 sponsored_chat_unique_id_;
  static jfieldID sponsored_chat_unique_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the user opened a sponsored chat.
   *
   * Returns object_ptr<Ok>.
   */
  openSponsoredChat();

  /**
   * Creates a function, which informs TDLib that the user opened a sponsored chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sponsored_chat_unique_id_ Unique identifier of the sponsored chat.
   */
  explicit openSponsoredChat(int53 sponsored_chat_unique_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 865985573;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openSponsoredChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that a story is opened and is being viewed by the user.
 *
 * Returns object_ptr<Ok>.
 */
class openStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the chat that posted the opened story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a story is opened and is being viewed by the user.
   *
   * Returns object_ptr<Ok>.
   */
  openStory();

  /**
   * Creates a function, which informs TDLib that a story is opened and is being viewed by the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ The identifier of the chat that posted the opened story.
   * \param[in] story_id_ The identifier of the story.
   */
  openStory(int53 story_poster_chat_id_, int32 story_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -696723005;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<openStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageReplyTo;

class MessageTopic;

class webAppInfo;

class webAppOpenParameters;

/**
 * Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once.
 *
 * Returns object_ptr<WebAppInfo>.
 */
class openWebApp final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
  string url_;
  static jfieldID url_fieldID;
  /// Topic in which the message will be sent; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Information about the message or story to be replied in the message sent by the Web App; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Parameters to use to open the Web App.
  object_ptr<webAppOpenParameters> parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once.
   *
   * Returns object_ptr<WebAppInfo>.
   */
  openWebApp();

  /**
   * Creates a function, which informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once.
   *
   * Returns object_ptr<WebAppInfo>.
   *
   * \param[in] chat_id_ Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats.
   * \param[in] bot_user_id_ Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method.
   * \param[in] url_ The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise.
   * \param[in] topic_id_ Topic in which the message will be sent; pass null if none.
   * \param[in] reply_to_ Information about the message or story to be replied in the message sent by the Web App; pass null if none.
   * \param[in] parameters_ Parameters to use to open the Web App.
   */
  openWebApp(int53 chat_id_, int53 bot_user_id_, string const &url_, object_ptr<MessageTopic> &&topic_id_, object_ptr<InputMessageReplyTo> &&reply_to_, object_ptr<webAppOpenParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -950685122;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<webAppInfo>;

  static object_ptr<openWebApp> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class FileType;

class storageStatistics;

/**
 * Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
 *
 * Returns object_ptr<StorageStatistics>.
 */
class optimizeStorage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.
  int53 size_;
  static jfieldID size_fieldID;
  /// Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.
  int32 ttl_;
  static jfieldID ttl_fieldID;
  /// Limit on the total number of files after deletion. Pass -1 to use the default limit.
  int32 count_;
  static jfieldID count_fieldID;
  /// The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value.
  int32 immunity_delay_;
  static jfieldID immunity_delay_fieldID;
  /// If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.
  array<object_ptr<FileType>> file_types_;
  static jfieldID file_types_fieldID;
  /// If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;
  /// If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).
  array<int53> exclude_chat_ids_;
  static jfieldID exclude_chat_ids_fieldID;
  /// Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.
  bool return_deleted_file_statistics_;
  static jfieldID return_deleted_file_statistics_fieldID;
  /// Same as in getStorageStatistics. Affects only returned statistics.
  int32 chat_limit_;
  static jfieldID chat_limit_fieldID;

  /**
   * Default constructor for a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
   *
   * Returns object_ptr<StorageStatistics>.
   */
  optimizeStorage();

  /**
   * Creates a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.
   *
   * Returns object_ptr<StorageStatistics>.
   *
   * \param[in] size_ Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.
   * \param[in] ttl_ Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.
   * \param[in] count_ Limit on the total number of files after deletion. Pass -1 to use the default limit.
   * \param[in] immunity_delay_ The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value.
   * \param[in] file_types_ If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.
   * \param[in] chat_ids_ If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).
   * \param[in] exclude_chat_ids_ If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).
   * \param[in] return_deleted_file_statistics_ Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.
   * \param[in] chat_limit_ Same as in getStorageStatistics. Affects only returned statistics.
   */
  optimizeStorage(int53 size_, int32 ttl_, int32 count_, int32 immunity_delay_, array<object_ptr<FileType>> &&file_types_, array<int53> &&chat_ids_, array<int53> &&exclude_chat_ids_, bool return_deleted_file_statistics_, int32 chat_limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 853186759;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storageStatistics>;

  static object_ptr<optimizeStorage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously.
 *
 * Returns object_ptr<FormattedText>.
 */
class parseMarkdown final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text to parse. For example, &quot;__italic__ ~~strikethrough~~ ||spoiler|| **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**&quot;.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously.
   *
   * Returns object_ptr<FormattedText>.
   */
  parseMarkdown();

  /**
   * Creates a function, which parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] text_ The text to parse. For example, &quot;__italic__ ~~strikethrough~~ ||spoiler|| **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**&quot;.
   */
  explicit parseMarkdown(object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 756366063;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<parseMarkdown> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class TextParseMode;

class formattedText;

/**
 * Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl, MentionName, and DateTime entities from a marked-up text. Can be called synchronously.
 *
 * Returns object_ptr<FormattedText>.
 */
class parseTextEntities final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The text to parse.
  string text_;
  static jfieldID text_fieldID;
  /// Text parse mode.
  object_ptr<TextParseMode> parse_mode_;
  static jfieldID parse_mode_fieldID;

  /**
   * Default constructor for a function, which parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl, MentionName, and DateTime entities from a marked-up text. Can be called synchronously.
   *
   * Returns object_ptr<FormattedText>.
   */
  parseTextEntities();

  /**
   * Creates a function, which parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl, MentionName, and DateTime entities from a marked-up text. Can be called synchronously.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] text_ The text to parse.
   * \param[in] parse_mode_ Text parse mode.
   */
  parseTextEntities(string const &text_, object_ptr<TextParseMode> &&parse_mode_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1709194593;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<parseTextEntities> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Pins a message in a chat. A message can be pinned only if messageProperties.can_be_pinned.
 *
 * Returns object_ptr<Ok>.
 */
class pinChatMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the new pinned message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chats.
  bool disable_notification_;
  static jfieldID disable_notification_fieldID;
  /// Pass true to pin the message only for self; private chats only.
  bool only_for_self_;
  static jfieldID only_for_self_fieldID;

  /**
   * Default constructor for a function, which pins a message in a chat. A message can be pinned only if messageProperties.can_be_pinned.
   *
   * Returns object_ptr<Ok>.
   */
  pinChatMessage();

  /**
   * Creates a function, which pins a message in a chat. A message can be pinned only if messageProperties.can_be_pinned.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] message_id_ Identifier of the new pinned message.
   * \param[in] disable_notification_ Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chats.
   * \param[in] only_for_self_ Pass true to pin the message only for self; private chats only.
   */
  pinChatMessage(int53 chat_id_, int53 message_id_, bool disable_notification_, bool only_for_self_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2034719663;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<pinChatMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class proxy;

class seconds;

/**
 * Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization.
 *
 * Returns object_ptr<Seconds>.
 */
class pingProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The proxy to test; pass null to ping a Telegram server without a proxy.
  object_ptr<proxy> proxy_;
  static jfieldID proxy_fieldID;

  /**
   * Default constructor for a function, which computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization.
   *
   * Returns object_ptr<Seconds>.
   */
  pingProxy();

  /**
   * Creates a function, which computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization.
   *
   * Returns object_ptr<Seconds>.
   *
   * \param[in] proxy_ The proxy to test; pass null to ping a Telegram server without a proxy.
   */
  explicit pingProxy(object_ptr<proxy> &&proxy_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2144501959;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<seconds>;

  static object_ptr<pingProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class ok;

/**
 * Places a bid on an auction gift.
 *
 * Returns object_ptr<Ok>.
 */
class placeGiftAuctionBid final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift to place the bid on.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;
  /// The number of Telegram Stars to place in the bid.
  int53 star_count_;
  static jfieldID star_count_fieldID;
  /// Identifier of the user who will receive the gift.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Text to show along with the gift; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed. Must be empty if the receiver enabled paid messages.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them.
  bool is_private_;
  static jfieldID is_private_fieldID;

  /**
   * Default constructor for a function, which places a bid on an auction gift.
   *
   * Returns object_ptr<Ok>.
   */
  placeGiftAuctionBid();

  /**
   * Creates a function, which places a bid on an auction gift.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] gift_id_ Identifier of the gift to place the bid on.
   * \param[in] star_count_ The number of Telegram Stars to place in the bid.
   * \param[in] user_id_ Identifier of the user who will receive the gift.
   * \param[in] text_ Text to show along with the gift; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed. Must be empty if the receiver enabled paid messages.
   * \param[in] is_private_ Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them.
   */
  placeGiftAuctionBid(int64 gift_id_, int53 star_count_, int53 user_id_, object_ptr<formattedText> &&text_, bool is_private_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1437176980;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<placeGiftAuctionBid> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputStoryContent;

class StoryPrivacySettings;

class formattedText;

class inputStoryAreas;

class story;

class storyFullId;

/**
 * Posts a new story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats. Returns a temporary story.
 *
 * Returns object_ptr<Story>.
 */
class postStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Content of the story.
  object_ptr<InputStoryContent> content_;
  static jfieldID content_fieldID;
  /// Clickable rectangle areas to be shown on the story media; pass null if none.
  object_ptr<inputStoryAreas> areas_;
  static jfieldID areas_fieldID;
  /// Story caption; pass null to use an empty caption; 0-getOption(&quot;story_caption_length_max&quot;) characters; can have entities only if getOption(&quot;can_use_text_entities_in_story_caption&quot;).
  object_ptr<formattedText> caption_;
  static jfieldID caption_fieldID;
  /// The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  static jfieldID privacy_settings_fieldID;
  /// Identifiers of story albums to which the story will be added upon posting. An album can have up to getOption(&quot;story_album_size_max&quot;) stories.
  array<int32> album_ids_;
  static jfieldID album_ids_fieldID;
  /// Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
  int32 active_period_;
  static jfieldID active_period_fieldID;
  /// Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.
  object_ptr<storyFullId> from_story_full_id_;
  static jfieldID from_story_full_id_fieldID;
  /// Pass true to keep the story accessible after expiration.
  bool is_posted_to_chat_page_;
  static jfieldID is_posted_to_chat_page_fieldID;
  /// Pass true if the content of the story must be protected from forwarding and screenshotting.
  bool protect_content_;
  static jfieldID protect_content_fieldID;

  /**
   * Default constructor for a function, which posts a new story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats. Returns a temporary story.
   *
   * Returns object_ptr<Story>.
   */
  postStory();

  /**
   * Creates a function, which posts a new story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats. Returns a temporary story.
   *
   * Returns object_ptr<Story>.
   *
   * \param[in] chat_id_ Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user.
   * \param[in] content_ Content of the story.
   * \param[in] areas_ Clickable rectangle areas to be shown on the story media; pass null if none.
   * \param[in] caption_ Story caption; pass null to use an empty caption; 0-getOption(&quot;story_caption_length_max&quot;) characters; can have entities only if getOption(&quot;can_use_text_entities_in_story_caption&quot;).
   * \param[in] privacy_settings_ The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats.
   * \param[in] album_ids_ Identifiers of story albums to which the story will be added upon posting. An album can have up to getOption(&quot;story_album_size_max&quot;) stories.
   * \param[in] active_period_ Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
   * \param[in] from_story_full_id_ Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story.
   * \param[in] is_posted_to_chat_page_ Pass true to keep the story accessible after expiration.
   * \param[in] protect_content_ Pass true if the content of the story must be protected from forwarding and screenshotting.
   */
  postStory(int53 chat_id_, object_ptr<InputStoryContent> &&content_, object_ptr<inputStoryAreas> &&areas_, object_ptr<formattedText> &&caption_, object_ptr<StoryPrivacySettings> &&privacy_settings_, array<int32> &&album_ids_, int32 active_period_, object_ptr<storyFullId> &&from_story_full_id_, bool is_posted_to_chat_page_, bool protect_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1725643742;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<story>;

  static object_ptr<postStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class FileType;

class InputFile;

class file;

/**
 * Preliminarily uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. The upload will not be completed until the file is sent in a message.
 *
 * Returns object_ptr<File>.
 */
class preliminaryUploadFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// File to upload.
  object_ptr<InputFile> file_;
  static jfieldID file_fieldID;
  /// File type; pass null if unknown.
  object_ptr<FileType> file_type_;
  static jfieldID file_type_fieldID;
  /// Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which preliminaryUploadFile was called will be uploaded first.
  int32 priority_;
  static jfieldID priority_fieldID;

  /**
   * Default constructor for a function, which preliminarily uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. The upload will not be completed until the file is sent in a message.
   *
   * Returns object_ptr<File>.
   */
  preliminaryUploadFile();

  /**
   * Creates a function, which preliminarily uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. The upload will not be completed until the file is sent in a message.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] file_ File to upload.
   * \param[in] file_type_ File type; pass null if unknown.
   * \param[in] priority_ Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which preliminaryUploadFile was called will be uploaded first.
   */
  preliminaryUploadFile(object_ptr<InputFile> &&file_, object_ptr<FileType> &&file_type_, int32 priority_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1894239129;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<preliminaryUploadFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Process new chats added to a shareable chat folder by its owner.
 *
 * Returns object_ptr<Ok>.
 */
class processChatFolderNewChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat folder identifier.
  int32 chat_folder_id_;
  static jfieldID chat_folder_id_fieldID;
  /// Identifiers of the new chats, which are added to the chat folder. The chats are automatically joined if they aren't joined yet.
  array<int53> added_chat_ids_;
  static jfieldID added_chat_ids_fieldID;

  /**
   * Default constructor for a function, which process new chats added to a shareable chat folder by its owner.
   *
   * Returns object_ptr<Ok>.
   */
  processChatFolderNewChats();

  /**
   * Creates a function, which process new chats added to a shareable chat folder by its owner.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_folder_id_ Chat folder identifier.
   * \param[in] added_chat_ids_ Identifiers of the new chats, which are added to the chat folder. The chats are automatically joined if they aren't joined yet.
   */
  processChatFolderNewChats(int32 chat_folder_id_, array<int53> &&added_chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1498280672;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<processChatFolderNewChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Processes request to disable has_protected_content in a chat.
 *
 * Returns object_ptr<Ok>.
 */
class processChatHasProtectedContentDisableRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message with the request. The message must be incoming and has content of the type messageChatHasProtectedContentDisableRequested.
  int53 request_message_id_;
  static jfieldID request_message_id_fieldID;
  /// Pass true to approve the request; pass false to reject the request.
  bool approve_;
  static jfieldID approve_fieldID;

  /**
   * Default constructor for a function, which processes request to disable has_protected_content in a chat.
   *
   * Returns object_ptr<Ok>.
   */
  processChatHasProtectedContentDisableRequest();

  /**
   * Creates a function, which processes request to disable has_protected_content in a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] request_message_id_ Identifier of the message with the request. The message must be incoming and has content of the type messageChatHasProtectedContentDisableRequested.
   * \param[in] approve_ Pass true to approve the request; pass false to reject the request.
   */
  processChatHasProtectedContentDisableRequest(int53 chat_id_, int53 request_message_id_, bool approve_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2078059411;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<processChatHasProtectedContentDisableRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Handles a pending join request in a chat.
 *
 * Returns object_ptr<Ok>.
 */
class processChatJoinRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the user who sent the request.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Pass true to approve the request; pass false to decline it.
  bool approve_;
  static jfieldID approve_fieldID;

  /**
   * Default constructor for a function, which handles a pending join request in a chat.
   *
   * Returns object_ptr<Ok>.
   */
  processChatJoinRequest();

  /**
   * Creates a function, which handles a pending join request in a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] user_id_ Identifier of the user who sent the request.
   * \param[in] approve_ Pass true to approve the request; pass false to decline it.
   */
  processChatJoinRequest(int53 chat_id_, int53 user_id_, bool approve_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1004876963;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<processChatJoinRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Handles all pending join requests for a given link in a chat.
 *
 * Returns object_ptr<Ok>.
 */
class processChatJoinRequests final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link for which to process join requests. If empty, all join requests will be processed. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
  string invite_link_;
  static jfieldID invite_link_fieldID;
  /// Pass true to approve all requests; pass false to decline them.
  bool approve_;
  static jfieldID approve_fieldID;

  /**
   * Default constructor for a function, which handles all pending join requests for a given link in a chat.
   *
   * Returns object_ptr<Ok>.
   */
  processChatJoinRequests();

  /**
   * Creates a function, which handles all pending join requests for a given link in a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link for which to process join requests. If empty, all join requests will be processed. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.
   * \param[in] approve_ Pass true to approve all requests; pass false to decline them.
   */
  processChatJoinRequests(int53 chat_id_, string const &invite_link_, bool approve_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1048722894;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<processChatJoinRequests> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Handles a pending gift purchase offer.
 *
 * Returns object_ptr<Ok>.
 */
class processGiftPurchaseOffer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the message with the gift purchase offer.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true to accept the request; pass false to reject it.
  bool accept_;
  static jfieldID accept_fieldID;

  /**
   * Default constructor for a function, which handles a pending gift purchase offer.
   *
   * Returns object_ptr<Ok>.
   */
  processGiftPurchaseOffer();

  /**
   * Creates a function, which handles a pending gift purchase offer.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] message_id_ Identifier of the message with the gift purchase offer.
   * \param[in] accept_ Pass true to accept the request; pass false to reject it.
   */
  processGiftPurchaseOffer(int53 message_id_, bool accept_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1177407462;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<processGiftPurchaseOffer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class processPushNotification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// JSON-encoded push notification payload with all fields sent by the server, and &quot;google.sent_time&quot; and &quot;google.notification.sound&quot; fields added.
  string payload_;
  static jfieldID payload_fieldID;

  /**
   * Default constructor for a function, which handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  processPushNotification();

  /**
   * Creates a function, which handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] payload_ JSON-encoded push notification payload with all fields sent by the server, and &quot;google.sent_time&quot; and &quot;google.notification.sound&quot; fields added.
   */
  explicit processPushNotification(string const &payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 786679952;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<processPushNotification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Rates recognized speech in a video note or a voice note message.
 *
 * Returns object_ptr<Ok>.
 */
class rateSpeechRecognition final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true if the speech recognition is good.
  bool is_good_;
  static jfieldID is_good_fieldID;

  /**
   * Default constructor for a function, which rates recognized speech in a video note or a voice note message.
   *
   * Returns object_ptr<Ok>.
   */
  rateSpeechRecognition();

  /**
   * Creates a function, which rates recognized speech in a video note or a voice note message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] is_good_ Pass true if the speech recognition is good.
   */
  rateSpeechRecognition(int53 chat_id_, int53 message_id_, bool is_good_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -287521867;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<rateSpeechRecognition> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Marks all mentions in a chat as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllChatMentions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which marks all mentions in a chat as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllChatMentions();

  /**
   * Creates a function, which marks all mentions in a chat as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit readAllChatMentions(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1357558453;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllChatMentions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Marks all poll votes in a chat as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllChatPollVotes final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which marks all poll votes in a chat as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllChatPollVotes();

  /**
   * Creates a function, which marks all poll votes in a chat as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit readAllChatPollVotes(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1882393298;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllChatPollVotes> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Marks all reactions in a chat as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllChatReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which marks all reactions in a chat as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllChatReactions();

  /**
   * Creates a function, which marks all reactions in a chat as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit readAllChatReactions(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1421973357;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllChatReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all unread reactions in the topic in a channel direct messages chat administered by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class readAllDirectMessagesChatTopicReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic identifier.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Default constructor for a function, which removes all unread reactions in the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  readAllDirectMessagesChatTopicReactions();

  /**
   * Creates a function, which removes all unread reactions in the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] topic_id_ Topic identifier.
   */
  readAllDirectMessagesChatTopicReactions(int53 chat_id_, int53 topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1154665542;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllDirectMessagesChatTopicReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Marks all mentions in a topic in a forum supergroup chat as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllForumTopicMentions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier in which mentions are marked as read.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which marks all mentions in a topic in a forum supergroup chat as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllForumTopicMentions();

  /**
   * Creates a function, which marks all mentions in a topic in a forum supergroup chat as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier in which mentions are marked as read.
   */
  readAllForumTopicMentions(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -996864148;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllForumTopicMentions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Marks all poll votes in a topic in a forum supergroup chat as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllForumTopicPollVotes final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier in which poll votes are marked as read.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which marks all poll votes in a topic in a forum supergroup chat as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllForumTopicPollVotes();

  /**
   * Creates a function, which marks all poll votes in a topic in a forum supergroup chat as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier in which poll votes are marked as read.
   */
  readAllForumTopicPollVotes(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 320081488;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllForumTopicPollVotes> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Marks all reactions in a topic in a forum supergroup chat or a chat with a bot with topics as read.
 *
 * Returns object_ptr<Ok>.
 */
class readAllForumTopicReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier in which reactions are marked as read.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which marks all reactions in a topic in a forum supergroup chat or a chat with a bot with topics as read.
   *
   * Returns object_ptr<Ok>.
   */
  readAllForumTopicReactions();

  /**
   * Creates a function, which marks all reactions in a topic in a forum supergroup chat or a chat with a bot with topics as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier in which reactions are marked as read.
   */
  readAllForumTopicReactions(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1986498949;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readAllForumTopicReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Reads a message on behalf of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class readBusinessMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection through which the message was received.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which reads a message on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  readBusinessMessage();

  /**
   * Creates a function, which reads a message on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection through which the message was received.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   */
  readBusinessMessage(string const &business_connection_id_, int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1723531538;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readBusinessMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class ok;

/**
 * Traverses all chats in a chat list and marks all messages in the chats as read.
 *
 * Returns object_ptr<Ok>.
 */
class readChatList final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat list in which to mark all chats as read.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;

  /**
   * Default constructor for a function, which traverses all chats in a chat list and marks all messages in the chats as read.
   *
   * Returns object_ptr<Ok>.
   */
  readChatList();

  /**
   * Creates a function, which traverses all chats in a chat list and marks all messages in the chats as read.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_list_ Chat list in which to mark all chats as read.
   */
  explicit readChatList(object_ptr<ChatList> &&chat_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1117480790;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<readChatList> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class data;

/**
 * Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file.
 *
 * Returns object_ptr<Data>.
 */
class readFilePart final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file. The file must be located in the TDLib file cache.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// The offset from which to read the file.
  int53 offset_;
  static jfieldID offset_fieldID;
  /// Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position.
  int53 count_;
  static jfieldID count_fieldID;

  /**
   * Default constructor for a function, which reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file.
   *
   * Returns object_ptr<Data>.
   */
  readFilePart();

  /**
   * Creates a function, which reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file.
   *
   * Returns object_ptr<Data>.
   *
   * \param[in] file_id_ Identifier of the file. The file must be located in the TDLib file cache.
   * \param[in] offset_ The offset from which to read the file.
   * \param[in] count_ Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position.
   */
  readFilePart(int32 file_id_, int53 offset_, int53 count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -174576822;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<data>;

  static object_ptr<readFilePart> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class quickReplyMessages;

/**
 * Readds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is readded, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be readded, null will be returned instead of the message.
 *
 * Returns object_ptr<QuickReplyMessages>.
 */
class readdQuickReplyShortcutMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the target shortcut.
  string shortcut_name_;
  static jfieldID shortcut_name_fieldID;
  /// Identifiers of the quick reply messages to readd. Message identifiers must be in a strictly increasing order.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Default constructor for a function, which readds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is readded, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be readded, null will be returned instead of the message.
   *
   * Returns object_ptr<QuickReplyMessages>.
   */
  readdQuickReplyShortcutMessages();

  /**
   * Creates a function, which readds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is readded, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be readded, null will be returned instead of the message.
   *
   * Returns object_ptr<QuickReplyMessages>.
   *
   * \param[in] shortcut_name_ Name of the target shortcut.
   * \param[in] message_ids_ Identifiers of the quick reply messages to readd. Message identifiers must be in a strictly increasing order.
   */
  readdQuickReplyShortcutMessages(string const &shortcut_name_, array<int53> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 387399566;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<quickReplyMessages>;

  static object_ptr<readdQuickReplyShortcutMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Recognizes speech in a video note or a voice note message.
 *
 * Returns object_ptr<Ok>.
 */
class recognizeSpeech final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message. Use messageProperties.can_recognize_speech to check whether the message is suitable.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which recognizes speech in a video note or a voice note message.
   *
   * Returns object_ptr<Ok>.
   */
  recognizeSpeech();

  /**
   * Creates a function, which recognizes speech in a video note or a voice note message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message. Use messageProperties.can_recognize_speech to check whether the message is suitable.
   */
  recognizeSpeech(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1741947577;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<recognizeSpeech> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Recovers the 2-step verification password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class recoverAuthenticationPassword final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recovery code to check.
  string recovery_code_;
  static jfieldID recovery_code_fieldID;
  /// New 2-step verification password of the user; may be empty to remove the password.
  string new_password_;
  static jfieldID new_password_fieldID;
  /// New password hint; may be empty.
  string new_hint_;
  static jfieldID new_hint_fieldID;

  /**
   * Default constructor for a function, which recovers the 2-step verification password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  recoverAuthenticationPassword();

  /**
   * Creates a function, which recovers the 2-step verification password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] recovery_code_ Recovery code to check.
   * \param[in] new_password_ New 2-step verification password of the user; may be empty to remove the password.
   * \param[in] new_hint_ New password hint; may be empty.
   */
  recoverAuthenticationPassword(string const &recovery_code_, string const &new_password_, string const &new_hint_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -131001053;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<recoverAuthenticationPassword> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up.
 *
 * Returns object_ptr<PasswordState>.
 */
class recoverPassword final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Recovery code to check.
  string recovery_code_;
  static jfieldID recovery_code_fieldID;
  /// New 2-step verification password of the user; may be empty to remove the password.
  string new_password_;
  static jfieldID new_password_fieldID;
  /// New password hint; may be empty.
  string new_hint_;
  static jfieldID new_hint_fieldID;

  /**
   * Default constructor for a function, which recovers the 2-step verification password using a recovery code sent to an email address that was previously set up.
   *
   * Returns object_ptr<PasswordState>.
   */
  recoverPassword();

  /**
   * Creates a function, which recovers the 2-step verification password using a recovery code sent to an email address that was previously set up.
   *
   * Returns object_ptr<PasswordState>.
   *
   * \param[in] recovery_code_ Recovery code to check.
   * \param[in] new_password_ New 2-step verification password of the user; may be empty to remove the password.
   * \param[in] new_hint_ New password hint; may be empty.
   */
  recoverPassword(string const &recovery_code_, string const &new_password_, string const &new_hint_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1524262541;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<recoverPassword> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Refunds a previously done payment in Telegram Stars; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class refundStarPayment final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user who did the payment.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Telegram payment identifier.
  string telegram_payment_charge_id_;
  static jfieldID telegram_payment_charge_id_fieldID;

  /**
   * Default constructor for a function, which refunds a previously done payment in Telegram Stars; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  refundStarPayment();

  /**
   * Creates a function, which refunds a previously done payment in Telegram Stars; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user who did the payment.
   * \param[in] telegram_payment_charge_id_ Telegram payment identifier.
   */
  refundStarPayment(int53 user_id_, string const &telegram_payment_charge_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1804165035;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<refundStarPayment> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class DeviceToken;

class pushReceiverId;

/**
 * Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.
 *
 * Returns object_ptr<PushReceiverId>.
 */
class registerDevice final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Device token.
  object_ptr<DeviceToken> device_token_;
  static jfieldID device_token_fieldID;
  /// List of user identifiers of other users currently using the application.
  array<int53> other_user_ids_;
  static jfieldID other_user_ids_fieldID;

  /**
   * Default constructor for a function, which registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.
   *
   * Returns object_ptr<PushReceiverId>.
   */
  registerDevice();

  /**
   * Creates a function, which registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.
   *
   * Returns object_ptr<PushReceiverId>.
   *
   * \param[in] device_token_ Device token.
   * \param[in] other_user_ids_ List of user identifiers of other users currently using the application.
   */
  registerDevice(object_ptr<DeviceToken> &&device_token_, array<int53> &&other_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 366088823;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<pushReceiverId>;

  static object_ptr<registerDevice> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration.
 *
 * Returns object_ptr<Ok>.
 */
class registerUser final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The first name of the user; 1-64 characters.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// The last name of the user; 0-64 characters.
  string last_name_;
  static jfieldID last_name_fieldID;
  /// Pass true to disable notification about the current user joining Telegram for other users that added them to contact list.
  bool disable_notification_;
  static jfieldID disable_notification_fieldID;

  /**
   * Default constructor for a function, which finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration.
   *
   * Returns object_ptr<Ok>.
   */
  registerUser();

  /**
   * Creates a function, which finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] first_name_ The first name of the user; 1-64 characters.
   * \param[in] last_name_ The last name of the user; 0-64 characters.
   * \param[in] disable_notification_ Pass true to disable notification about the current user joining Telegram for other users that added them to contact list.
   */
  registerUser(string const &first_name_, string const &last_name_, bool disable_notification_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1012247828;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<registerUser> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all files from the file download list.
 *
 * Returns object_ptr<Ok>.
 */
class removeAllFilesFromDownloads final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to remove only active downloads, including paused.
  bool only_active_;
  static jfieldID only_active_fieldID;
  /// Pass true to remove only completed downloads.
  bool only_completed_;
  static jfieldID only_completed_fieldID;
  /// Pass true to delete the file from the TDLib file cache.
  bool delete_from_cache_;
  static jfieldID delete_from_cache_fieldID;

  /**
   * Default constructor for a function, which removes all files from the file download list.
   *
   * Returns object_ptr<Ok>.
   */
  removeAllFilesFromDownloads();

  /**
   * Creates a function, which removes all files from the file download list.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] only_active_ Pass true to remove only active downloads, including paused.
   * \param[in] only_completed_ Pass true to remove only completed downloads.
   * \param[in] delete_from_cache_ Pass true to delete the file from the TDLib file cache.
   */
  removeAllFilesFromDownloads(bool only_active_, bool only_completed_, bool delete_from_cache_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1186433402;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeAllFilesFromDownloads> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes the connected business bot from a specific chat by adding the chat to businessRecipients.excluded_chat_ids.
 *
 * Returns object_ptr<Ok>.
 */
class removeBusinessConnectedBotFromChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which removes the connected business bot from a specific chat by adding the chat to businessRecipients.excluded_chat_ids.
   *
   * Returns object_ptr<Ok>.
   */
  removeBusinessConnectedBotFromChat();

  /**
   * Creates a function, which removes the connected business bot from a specific chat by adding the chat to businessRecipients.excluded_chat_ids.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit removeBusinessConnectedBotFromChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2020766707;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeBusinessConnectedBotFromChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a chat action bar without any other action.
 *
 * Returns object_ptr<Ok>.
 */
class removeChatActionBar final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which removes a chat action bar without any other action.
   *
   * Returns object_ptr<Ok>.
   */
  removeChatActionBar();

  /**
   * Creates a function, which removes a chat action bar without any other action.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit removeChatActionBar(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1650968070;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeChatActionBar> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes users from the contact list.
 *
 * Returns object_ptr<Ok>.
 */
class removeContacts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of users to be deleted.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Default constructor for a function, which removes users from the contact list.
   *
   * Returns object_ptr<Ok>.
   */
  removeContacts();

  /**
   * Creates a function, which removes users from the contact list.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_ids_ Identifiers of users to be deleted.
   */
  explicit removeContacts(array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1943858054;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeContacts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Removes a sticker from the list of favorite stickers.
 *
 * Returns object_ptr<Ok>.
 */
class removeFavoriteSticker final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker file to delete from the list.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which removes a sticker from the list of favorite stickers.
   *
   * Returns object_ptr<Ok>.
   */
  removeFavoriteSticker();

  /**
   * Creates a function, which removes a sticker from the list of favorite stickers.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker file to delete from the list.
   */
  explicit removeFavoriteSticker(object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1152945264;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeFavoriteSticker> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a file from the file download list.
 *
 * Returns object_ptr<Ok>.
 */
class removeFileFromDownloads final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the downloaded file.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Pass true to delete the file from the TDLib file cache.
  bool delete_from_cache_;
  static jfieldID delete_from_cache_fieldID;

  /**
   * Default constructor for a function, which removes a file from the file download list.
   *
   * Returns object_ptr<Ok>.
   */
  removeFileFromDownloads();

  /**
   * Creates a function, which removes a file from the file download list.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the downloaded file.
   * \param[in] delete_from_cache_ Pass true to delete the file from the TDLib file cache.
   */
  removeFileFromDownloads(int32 file_id_, bool delete_from_cache_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1460060142;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeFileFromDownloads> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftCollection;

/**
 * Removes gifts from a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
 *
 * Returns object_ptr<GiftCollection>.
 */
class removeGiftCollectionGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the collection.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Identifier of the gift collection.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;
  /// Identifier of the gifts to remove from the collection.
  array<string> received_gift_ids_;
  static jfieldID received_gift_ids_fieldID;

  /**
   * Default constructor for a function, which removes gifts from a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   */
  removeGiftCollectionGifts();

  /**
   * Creates a function, which removes gifts from a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the collection.
   * \param[in] collection_id_ Identifier of the gift collection.
   * \param[in] received_gift_ids_ Identifier of the gifts to remove from the collection.
   */
  removeGiftCollectionGifts(object_ptr<MessageSender> &&owner_id_, int32 collection_id_, array<string> &&received_gift_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -692316949;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftCollection>;

  static object_ptr<removeGiftCollectionGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes background from the list of installed backgrounds.
 *
 * Returns object_ptr<Ok>.
 */
class removeInstalledBackground final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The background identifier.
  int64 background_id_;
  static jfieldID background_id_fieldID;

  /**
   * Default constructor for a function, which removes background from the list of installed backgrounds.
   *
   * Returns object_ptr<Ok>.
   */
  removeInstalledBackground();

  /**
   * Creates a function, which removes background from the list of installed backgrounds.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] background_id_ The background identifier.
   */
  explicit removeInstalledBackground(int64 background_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1346446652;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeInstalledBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a passkey from the list of passkeys allowed to be used for the login by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class removeLoginPasskey final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the passkey to remove.
  string passkey_id_;
  static jfieldID passkey_id_fieldID;

  /**
   * Default constructor for a function, which removes a passkey from the list of passkeys allowed to be used for the login by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  removeLoginPasskey();

  /**
   * Creates a function, which removes a passkey from the list of passkeys allowed to be used for the login by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] passkey_id_ Unique identifier of the passkey to remove.
   */
  explicit removeLoginPasskey(string const &passkey_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1728940387;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeLoginPasskey> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class ok;

/**
 * Removes a reaction from a message. A chosen reaction can always be removed.
 *
 * Returns object_ptr<Ok>.
 */
class removeMessageReaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Type of the reaction to remove. The paid reaction can't be removed.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;

  /**
   * Default constructor for a function, which removes a reaction from a message. A chosen reaction can always be removed.
   *
   * Returns object_ptr<Ok>.
   */
  removeMessageReaction();

  /**
   * Creates a function, which removes a reaction from a message. A chosen reaction can always be removed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reaction_type_ Type of the reaction to remove. The paid reaction can't be removed.
   */
  removeMessageReaction(int53 chat_id_, int53 message_id_, object_ptr<ReactionType> &&reaction_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1756934789;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeMessageReaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Removes the verification status of a user or a chat by an owned bot.
 *
 * Returns object_ptr<Ok>.
 */
class removeMessageSenderBotVerification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owned bot, which verified the user or the chat.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the user or the supergroup or channel chat, which verification is removed.
  object_ptr<MessageSender> verified_id_;
  static jfieldID verified_id_fieldID;

  /**
   * Default constructor for a function, which removes the verification status of a user or a chat by an owned bot.
   *
   * Returns object_ptr<Ok>.
   */
  removeMessageSenderBotVerification();

  /**
   * Creates a function, which removes the verification status of a user or a chat by an owned bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the owned bot, which verified the user or the chat.
   * \param[in] verified_id_ Identifier of the user or the supergroup or channel chat, which verification is removed.
   */
  removeMessageSenderBotVerification(int53 bot_user_id_, object_ptr<MessageSender> &&verified_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1710174374;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeMessageSenderBotVerification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class removeNotification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of notification group to which the notification belongs.
  int32 notification_group_id_;
  static jfieldID notification_group_id_fieldID;
  /// Identifier of removed notification.
  int32 notification_id_;
  static jfieldID notification_id_fieldID;

  /**
   * Default constructor for a function, which removes an active notification from notification list. Needs to be called only if the notification is removed by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  removeNotification();

  /**
   * Creates a function, which removes an active notification from notification list. Needs to be called only if the notification is removed by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] notification_group_id_ Identifier of notification group to which the notification belongs.
   * \param[in] notification_id_ Identifier of removed notification.
   */
  removeNotification(int32 notification_group_id_, int32 notification_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 862630734;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeNotification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class removeNotificationGroup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Notification group identifier.
  int32 notification_group_id_;
  static jfieldID notification_group_id_fieldID;
  /// The maximum identifier of removed notifications.
  int32 max_notification_id_;
  static jfieldID max_notification_id_fieldID;

  /**
   * Default constructor for a function, which removes a group of active notifications. Needs to be called only if the notification group is removed by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  removeNotificationGroup();

  /**
   * Creates a function, which removes a group of active notifications. Needs to be called only if the notification group is removed by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] notification_group_id_ Notification group identifier.
   * \param[in] max_notification_id_ The maximum identifier of removed notifications.
   */
  removeNotificationGroup(int32 notification_group_id_, int32 max_notification_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1713005454;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeNotificationGroup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all pending paid reactions in a live story group call.
 *
 * Returns object_ptr<Ok>.
 */
class removePendingLiveStoryReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which removes all pending paid reactions in a live story group call.
   *
   * Returns object_ptr<Ok>.
   */
  removePendingLiveStoryReactions();

  /**
   * Creates a function, which removes all pending paid reactions in a live story group call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit removePendingLiveStoryReactions(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 868601112;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removePendingLiveStoryReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all pending paid reactions on a message.
 *
 * Returns object_ptr<Ok>.
 */
class removePendingPaidMessageReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which removes all pending paid reactions on a message.
   *
   * Returns object_ptr<Ok>.
   */
  removePendingPaidMessageReactions();

  /**
   * Creates a function, which removes all pending paid reactions on a message.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   */
  removePendingPaidMessageReactions(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1100258555;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removePendingPaidMessageReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes an audio file from the profile audio files of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class removeProfileAudio final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the audio file to be removed.
  int32 file_id_;
  static jfieldID file_id_fieldID;

  /**
   * Default constructor for a function, which removes an audio file from the profile audio files of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  removeProfileAudio();

  /**
   * Creates a function, which removes an audio file from the profile audio files of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the audio file to be removed.
   */
  explicit removeProfileAudio(int32 file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1292263034;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeProfileAudio> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a proxy server. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class removeProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Proxy identifier.
  int32 proxy_id_;
  static jfieldID proxy_id_fieldID;

  /**
   * Default constructor for a function, which removes a proxy server. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  removeProxy();

  /**
   * Creates a function, which removes a proxy server. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] proxy_id_ Proxy identifier.
   */
  explicit removeProxy(int32 proxy_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1369219847;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a hashtag from the list of recently used hashtags.
 *
 * Returns object_ptr<Ok>.
 */
class removeRecentHashtag final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hashtag to delete.
  string hashtag_;
  static jfieldID hashtag_fieldID;

  /**
   * Default constructor for a function, which removes a hashtag from the list of recently used hashtags.
   *
   * Returns object_ptr<Ok>.
   */
  removeRecentHashtag();

  /**
   * Creates a function, which removes a hashtag from the list of recently used hashtags.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] hashtag_ Hashtag to delete.
   */
  explicit removeRecentHashtag(string const &hashtag_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1013735260;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeRecentHashtag> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Removes a sticker from the list of recently used stickers.
 *
 * Returns object_ptr<Ok>.
 */
class removeRecentSticker final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers.
  bool is_attached_;
  static jfieldID is_attached_fieldID;
  /// Sticker file to delete.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which removes a sticker from the list of recently used stickers.
   *
   * Returns object_ptr<Ok>.
   */
  removeRecentSticker();

  /**
   * Creates a function, which removes a sticker from the list of recently used stickers.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] is_attached_ Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers.
   * \param[in] sticker_ Sticker file to delete.
   */
  removeRecentSticker(bool is_attached_, object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1246577677;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeRecentSticker> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a chat from the list of recently found chats.
 *
 * Returns object_ptr<Ok>.
 */
class removeRecentlyFoundChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to be removed.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which removes a chat from the list of recently found chats.
   *
   * Returns object_ptr<Ok>.
   */
  removeRecentlyFoundChat();

  /**
   * Creates a function, which removes a chat from the list of recently found chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to be removed.
   */
  explicit removeRecentlyFoundChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 717340444;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeRecentlyFoundChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Removes an animation from the list of saved animations.
 *
 * Returns object_ptr<Ok>.
 */
class removeSavedAnimation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Animation file to be removed.
  object_ptr<InputFile> animation_;
  static jfieldID animation_fieldID;

  /**
   * Default constructor for a function, which removes an animation from the list of saved animations.
   *
   * Returns object_ptr<Ok>.
   */
  removeSavedAnimation();

  /**
   * Creates a function, which removes an animation from the list of saved animations.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] animation_ Animation file to be removed.
   */
  explicit removeSavedAnimation(object_ptr<InputFile> &&animation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -495605479;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeSavedAnimation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a notification sound from the list of saved notification sounds.
 *
 * Returns object_ptr<Ok>.
 */
class removeSavedNotificationSound final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the notification sound.
  int64 notification_sound_id_;
  static jfieldID notification_sound_id_fieldID;

  /**
   * Default constructor for a function, which removes a notification sound from the list of saved notification sounds.
   *
   * Returns object_ptr<Ok>.
   */
  removeSavedNotificationSound();

  /**
   * Creates a function, which removes a notification sound from the list of saved notification sounds.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] notification_sound_id_ Identifier of the notification sound.
   */
  explicit removeSavedNotificationSound(int64 notification_sound_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -480032946;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeSavedNotificationSound> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a hashtag or a cashtag from the list of recently searched for hashtags or cashtags.
 *
 * Returns object_ptr<Ok>.
 */
class removeSearchedForTag final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hashtag or cashtag to delete.
  string tag_;
  static jfieldID tag_fieldID;

  /**
   * Default constructor for a function, which removes a hashtag or a cashtag from the list of recently searched for hashtags or cashtags.
   *
   * Returns object_ptr<Ok>.
   */
  removeSearchedForTag();

  /**
   * Creates a function, which removes a hashtag or a cashtag from the list of recently searched for hashtags or cashtags.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] tag_ Hashtag or cashtag to delete.
   */
  explicit removeSearchedForTag(string const &tag_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 891382730;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeSearchedForTag> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Removes a sticker from the set to which it belongs. The sticker set must be owned by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class removeStickerFromSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker to remove from the set.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which removes a sticker from the set to which it belongs. The sticker set must be owned by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  removeStickerFromSet();

  /**
   * Creates a function, which removes a sticker from the set to which it belongs. The sticker set must be owned by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker to remove from the set.
   */
  explicit removeStickerFromSet(object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1642196644;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeStickerFromSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbum;

/**
 * Removes stories from an album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
 *
 * Returns object_ptr<StoryAlbum>.
 */
class removeStoryAlbumStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that owns the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story album.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;
  /// Identifier of the stories to remove from the album.
  array<int32> story_ids_;
  static jfieldID story_ids_fieldID;

  /**
   * Default constructor for a function, which removes stories from an album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   */
  removeStoryAlbumStories();

  /**
   * Creates a function, which removes stories from an album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   *
   * \param[in] chat_id_ Identifier of the chat that owns the stories.
   * \param[in] story_album_id_ Identifier of the story album.
   * \param[in] story_ids_ Identifier of the stories to remove from the album.
   */
  removeStoryAlbumStories(int53 chat_id_, int32 story_album_id_, array<int32> &&story_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1901872465;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyAlbum>;

  static object_ptr<removeStoryAlbumStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a custom text composition style from the list of used by the user styles. If the style was created by the current user, then it can only be deleted.
 *
 * Returns object_ptr<Ok>.
 */
class removeTextCompositionStyle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which removes a custom text composition style from the list of used by the user styles. If the style was created by the current user, then it can only be deleted.
   *
   * Returns object_ptr<Ok>.
   */
  removeTextCompositionStyle();

  /**
   * Creates a function, which removes a custom text composition style from the list of used by the user styles. If the style was created by the current user, then it can only be deleted.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ Name of the style.
   */
  explicit removeTextCompositionStyle(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -543700866;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeTextCompositionStyle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class TopChatCategory;

class ok;

/**
 * Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled.
 *
 * Returns object_ptr<Ok>.
 */
class removeTopChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Category of frequently used chats.
  object_ptr<TopChatCategory> category_;
  static jfieldID category_fieldID;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled.
   *
   * Returns object_ptr<Ok>.
   */
  removeTopChat();

  /**
   * Creates a function, which removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] category_ Category of frequently used chats.
   * \param[in] chat_id_ Chat identifier.
   */
  removeTopChat(object_ptr<TopChatCategory> &&category_, int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1907876267;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<removeTopChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes order of active usernames of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class reorderActiveUsernames final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new order of active usernames. All currently active usernames must be specified.
  array<string> usernames_;
  static jfieldID usernames_fieldID;

  /**
   * Default constructor for a function, which changes order of active usernames of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  reorderActiveUsernames();

  /**
   * Creates a function, which changes order of active usernames of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] usernames_ The new order of active usernames. All currently active usernames must be specified.
   */
  explicit reorderActiveUsernames(array<string> &&usernames_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -455399375;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderActiveUsernames> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Ok>.
 */
class reorderBotActiveUsernames final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The new order of active usernames. All currently active usernames must be specified.
  array<string> usernames_;
  static jfieldID usernames_fieldID;

  /**
   * Default constructor for a function, which changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   */
  reorderBotActiveUsernames();

  /**
   * Creates a function, which changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] usernames_ The new order of active usernames. All currently active usernames must be specified.
   */
  reorderBotActiveUsernames(int53 bot_user_id_, array<string> &&usernames_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1602301664;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderBotActiveUsernames> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes order of media previews in the list of media previews of a bot.
 *
 * Returns object_ptr<Ok>.
 */
class reorderBotMediaPreviews final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot. The bot must be owned and must have the main Web App.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Language code of the media previews to reorder.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// File identifiers of the media in the new order.
  array<int32> file_ids_;
  static jfieldID file_ids_fieldID;

  /**
   * Default constructor for a function, which changes order of media previews in the list of media previews of a bot.
   *
   * Returns object_ptr<Ok>.
   */
  reorderBotMediaPreviews();

  /**
   * Creates a function, which changes order of media previews in the list of media previews of a bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot. The bot must be owned and must have the main Web App.
   * \param[in] language_code_ Language code of the media previews to reorder.
   * \param[in] file_ids_ File identifiers of the media in the new order.
   */
  reorderBotMediaPreviews(int53 bot_user_id_, string const &language_code_, array<int32> &&file_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 630851043;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderBotMediaPreviews> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the order of chat folders.
 *
 * Returns object_ptr<Ok>.
 */
class reorderChatFolders final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of chat folders in the new correct order.
  array<int32> chat_folder_ids_;
  static jfieldID chat_folder_ids_fieldID;
  /// Position of the main chat list among chat folders, 0-based. Can be non-zero only for Premium users.
  int32 main_chat_list_position_;
  static jfieldID main_chat_list_position_fieldID;

  /**
   * Default constructor for a function, which changes the order of chat folders.
   *
   * Returns object_ptr<Ok>.
   */
  reorderChatFolders();

  /**
   * Creates a function, which changes the order of chat folders.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_folder_ids_ Identifiers of chat folders in the new correct order.
   * \param[in] main_chat_list_position_ Position of the main chat list among chat folders, 0-based. Can be non-zero only for Premium users.
   */
  reorderChatFolders(array<int32> &&chat_folder_ids_, int32 main_chat_list_position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1665299546;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderChatFolders> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftCollection;

/**
 * Changes order of gifts in a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
 *
 * Returns object_ptr<GiftCollection>.
 */
class reorderGiftCollectionGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the collection.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Identifier of the gift collection.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;
  /// Identifier of the gifts to move to the beginning of the collection. All other gifts are placed in the current order after the specified gifts.
  array<string> received_gift_ids_;
  static jfieldID received_gift_ids_fieldID;

  /**
   * Default constructor for a function, which changes order of gifts in a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   */
  reorderGiftCollectionGifts();

  /**
   * Creates a function, which changes order of gifts in a collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the collection.
   * \param[in] collection_id_ Identifier of the gift collection.
   * \param[in] received_gift_ids_ Identifier of the gifts to move to the beginning of the collection. All other gifts are placed in the current order after the specified gifts.
   */
  reorderGiftCollectionGifts(object_ptr<MessageSender> &&owner_id_, int32 collection_id_, array<string> &&received_gift_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1545340419;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftCollection>;

  static object_ptr<reorderGiftCollectionGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Changes order of gift collections. If the collections are owned by a channel chat, then requires can_post_messages administrator right in the channel chat.
 *
 * Returns object_ptr<Ok>.
 */
class reorderGiftCollections final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the collection.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// New order of gift collections.
  array<int32> collection_ids_;
  static jfieldID collection_ids_fieldID;

  /**
   * Default constructor for a function, which changes order of gift collections. If the collections are owned by a channel chat, then requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   */
  reorderGiftCollections();

  /**
   * Creates a function, which changes order of gift collections. If the collections are owned by a channel chat, then requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the collection.
   * \param[in] collection_ids_ New order of gift collections.
   */
  reorderGiftCollections(object_ptr<MessageSender> &&owner_id_, array<int32> &&collection_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1607216912;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderGiftCollections> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class ok;

/**
 * Changes the order of installed sticker sets.
 *
 * Returns object_ptr<Ok>.
 */
class reorderInstalledStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker sets to reorder.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Identifiers of installed sticker sets in the new correct order.
  array<int64> sticker_set_ids_;
  static jfieldID sticker_set_ids_fieldID;

  /**
   * Default constructor for a function, which changes the order of installed sticker sets.
   *
   * Returns object_ptr<Ok>.
   */
  reorderInstalledStickerSets();

  /**
   * Creates a function, which changes the order of installed sticker sets.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_type_ Type of the sticker sets to reorder.
   * \param[in] sticker_set_ids_ Identifiers of installed sticker sets in the new correct order.
   */
  reorderInstalledStickerSets(object_ptr<StickerType> &&sticker_type_, array<int64> &&sticker_set_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1074928158;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderInstalledStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the order of quick reply shortcuts.
 *
 * Returns object_ptr<Ok>.
 */
class reorderQuickReplyShortcuts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new order of quick reply shortcuts.
  array<int32> shortcut_ids_;
  static jfieldID shortcut_ids_fieldID;

  /**
   * Default constructor for a function, which changes the order of quick reply shortcuts.
   *
   * Returns object_ptr<Ok>.
   */
  reorderQuickReplyShortcuts();

  /**
   * Creates a function, which changes the order of quick reply shortcuts.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shortcut_ids_ The new order of quick reply shortcuts.
   */
  explicit reorderQuickReplyShortcuts(array<int32> &&shortcut_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2052799232;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderQuickReplyShortcuts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbum;

/**
 * Changes order of stories in an album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
 *
 * Returns object_ptr<StoryAlbum>.
 */
class reorderStoryAlbumStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that owns the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story album.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;
  /// Identifier of the stories to move to the beginning of the album. All other stories are placed in the current order after the specified stories.
  array<int32> story_ids_;
  static jfieldID story_ids_fieldID;

  /**
   * Default constructor for a function, which changes order of stories in an album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   */
  reorderStoryAlbumStories();

  /**
   * Creates a function, which changes order of stories in an album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   *
   * \param[in] chat_id_ Identifier of the chat that owns the stories.
   * \param[in] story_album_id_ Identifier of the story album.
   * \param[in] story_ids_ Identifier of the stories to move to the beginning of the album. All other stories are placed in the current order after the specified stories.
   */
  reorderStoryAlbumStories(int53 chat_id_, int32 story_album_id_, array<int32> &&story_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 438104756;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyAlbum>;

  static object_ptr<reorderStoryAlbumStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes order of story albums. If the albums are owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat.
 *
 * Returns object_ptr<Ok>.
 */
class reorderStoryAlbums final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that owns the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New order of story albums.
  array<int32> story_album_ids_;
  static jfieldID story_album_ids_fieldID;

  /**
   * Default constructor for a function, which changes order of story albums. If the albums are owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   */
  reorderStoryAlbums();

  /**
   * Creates a function, which changes order of story albums. If the albums are owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat that owns the stories.
   * \param[in] story_album_ids_ New order of story albums.
   */
  reorderStoryAlbums(int53 chat_id_, array<int32> &&story_album_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 514423948;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderStoryAlbums> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
 *
 * Returns object_ptr<Ok>.
 */
class reorderSupergroupActiveUsernames final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The new order of active usernames. All currently active usernames must be specified.
  array<string> usernames_;
  static jfieldID usernames_fieldID;

  /**
   * Default constructor for a function, which changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
   *
   * Returns object_ptr<Ok>.
   */
  reorderSupergroupActiveUsernames();

  /**
   * Creates a function, which changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   * \param[in] usernames_ The new order of active usernames. All currently active usernames must be specified.
   */
  reorderSupergroupActiveUsernames(int53 supergroup_id_, array<string> &&usernames_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1962466095;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reorderSupergroupActiveUsernames> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class rtmpUrl;

/**
 * Replaces the current RTMP URL for streaming to a live story; requires owner privileges for channel chats.
 *
 * Returns object_ptr<RtmpUrl>.
 */
class replaceLiveStoryRtmpUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which replaces the current RTMP URL for streaming to a live story; requires owner privileges for channel chats.
   *
   * Returns object_ptr<RtmpUrl>.
   */
  replaceLiveStoryRtmpUrl();

  /**
   * Creates a function, which replaces the current RTMP URL for streaming to a live story; requires owner privileges for channel chats.
   *
   * Returns object_ptr<RtmpUrl>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit replaceLiveStoryRtmpUrl(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 585361229;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<rtmpUrl>;

  static object_ptr<replaceLiveStoryRtmpUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLink;

/**
 * Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right.
 *
 * Returns object_ptr<ChatInviteLink>.
 */
class replacePrimaryChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right.
   *
   * Returns object_ptr<ChatInviteLink>.
   */
  replacePrimaryChatInviteLink();

  /**
   * Creates a function, which replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right.
   *
   * Returns object_ptr<ChatInviteLink>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit replacePrimaryChatInviteLink(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1067350941;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLink>;

  static object_ptr<replacePrimaryChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class inputSticker;

class ok;

/**
 * Replaces existing sticker in a set. The function is equivalent to removeStickerFromSet, then addStickerToSet, then setStickerPositionInSet.
 *
 * Returns object_ptr<Ok>.
 */
class replaceStickerInSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  static jfieldID name_fieldID;
  /// Sticker to remove from the set.
  object_ptr<InputFile> old_sticker_;
  static jfieldID old_sticker_fieldID;
  /// Sticker to add to the set.
  object_ptr<inputSticker> new_sticker_;
  static jfieldID new_sticker_fieldID;

  /**
   * Default constructor for a function, which replaces existing sticker in a set. The function is equivalent to removeStickerFromSet, then addStickerToSet, then setStickerPositionInSet.
   *
   * Returns object_ptr<Ok>.
   */
  replaceStickerInSet();

  /**
   * Creates a function, which replaces existing sticker in a set. The function is equivalent to removeStickerFromSet, then addStickerToSet, then setStickerPositionInSet.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Sticker set owner; ignored for regular users.
   * \param[in] name_ Sticker set name. The sticker set must be owned by the current user.
   * \param[in] old_sticker_ Sticker to remove from the set.
   * \param[in] new_sticker_ Sticker to add to the set.
   */
  replaceStickerInSet(int53 user_id_, string const &name_, object_ptr<InputFile> &&old_sticker_, object_ptr<inputSticker> &&new_sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -406311399;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<replaceStickerInSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class rtmpUrl;

/**
 * Replaces the current RTMP URL for streaming to the video chat of a chat; requires owner privileges in the chat.
 *
 * Returns object_ptr<RtmpUrl>.
 */
class replaceVideoChatRtmpUrl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which replaces the current RTMP URL for streaming to the video chat of a chat; requires owner privileges in the chat.
   *
   * Returns object_ptr<RtmpUrl>.
   */
  replaceVideoChatRtmpUrl();

  /**
   * Creates a function, which replaces the current RTMP URL for streaming to the video chat of a chat; requires owner privileges in the chat.
   *
   * Returns object_ptr<RtmpUrl>.
   *
   * \param[in] chat_id_ Chat identifier.
   */
  explicit replaceVideoChatRtmpUrl(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 558862304;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<rtmpUrl>;

  static object_ptr<replaceVideoChatRtmpUrl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode.
 *
 * Returns object_ptr<Ok>.
 */
class reportAuthenticationCodeMissing final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current mobile network code.
  string mobile_network_code_;
  static jfieldID mobile_network_code_fieldID;

  /**
   * Default constructor for a function, which reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode.
   *
   * Returns object_ptr<Ok>.
   */
  reportAuthenticationCodeMissing();

  /**
   * Creates a function, which reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] mobile_network_code_ Current mobile network code.
   */
  explicit reportAuthenticationCodeMissing(string const &mobile_network_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1846555064;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reportAuthenticationCodeMissing> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReportChatResult;

/**
 * Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported.
 *
 * Returns object_ptr<ReportChatResult>.
 */
class reportChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  static jfieldID option_id_fieldID;
  /// Identifiers of reported messages. Use messageProperties.can_report_chat to check whether the message can be reported.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;
  /// Additional report details if asked by the server; 0-1024 characters; leave empty for the initial request.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported.
   *
   * Returns object_ptr<ReportChatResult>.
   */
  reportChat();

  /**
   * Creates a function, which reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported.
   *
   * Returns object_ptr<ReportChatResult>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] option_id_ Option identifier chosen by the user; leave empty for the initial request.
   * \param[in] message_ids_ Identifiers of reported messages. Use messageProperties.can_report_chat to check whether the message can be reported.
   * \param[in] text_ Additional report details if asked by the server; 0-1024 characters; leave empty for the initial request.
   */
  reportChat(int53 chat_id_, bytes const &option_id_, array<int53> &&message_ids_, string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1058475058;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportChatResult>;

  static object_ptr<reportChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReportReason;

class ok;

/**
 * Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported.
 *
 * Returns object_ptr<Ok>.
 */
class reportChatPhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the photo to report. Only full photos from chatPhoto can be reported.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// The reason for reporting the chat photo.
  object_ptr<ReportReason> reason_;
  static jfieldID reason_fieldID;
  /// Additional report details; 0-1024 characters.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported.
   *
   * Returns object_ptr<Ok>.
   */
  reportChatPhoto();

  /**
   * Creates a function, which reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] file_id_ Identifier of the photo to report. Only full photos from chatPhoto can be reported.
   * \param[in] reason_ The reason for reporting the chat photo.
   * \param[in] text_ Additional report details; 0-1024 characters.
   */
  reportChatPhoto(int53 chat_id_, int32 file_id_, object_ptr<ReportReason> &&reason_, string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -646966648;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reportChatPhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReportSponsoredResult;

/**
 * Reports a sponsored message to Telegram moderators.
 *
 * Returns object_ptr<ReportSponsoredResult>.
 */
class reportChatSponsoredMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the sponsored message.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the sponsored message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  static jfieldID option_id_fieldID;

  /**
   * Default constructor for a function, which reports a sponsored message to Telegram moderators.
   *
   * Returns object_ptr<ReportSponsoredResult>.
   */
  reportChatSponsoredMessage();

  /**
   * Creates a function, which reports a sponsored message to Telegram moderators.
   *
   * Returns object_ptr<ReportSponsoredResult>.
   *
   * \param[in] chat_id_ Chat identifier of the sponsored message.
   * \param[in] message_id_ Identifier of the sponsored message.
   * \param[in] option_id_ Option identifier chosen by the user; leave empty for the initial request.
   */
  reportChatSponsoredMessage(int53 chat_id_, int53 message_id_, bytes const &option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -979984820;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportSponsoredResult>;

  static object_ptr<reportChatSponsoredMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if messageProperties.can_report_reactions.
 *
 * Returns object_ptr<Ok>.
 */
class reportMessageReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Message identifier.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Identifier of the sender, which added the reaction.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;

  /**
   * Default constructor for a function, which reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if messageProperties.can_report_reactions.
   *
   * Returns object_ptr<Ok>.
   */
  reportMessageReactions();

  /**
   * Creates a function, which reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if messageProperties.can_report_reactions.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ Message identifier.
   * \param[in] sender_id_ Identifier of the sender, which added the reaction.
   */
  reportMessageReactions(int53 chat_id_, int53 message_id_, object_ptr<MessageSender> &&sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 919111719;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reportMessageReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only.
 *
 * Returns object_ptr<Ok>.
 */
class reportPhoneNumberCodeMissing final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Current mobile network code.
  string mobile_network_code_;
  static jfieldID mobile_network_code_fieldID;

  /**
   * Default constructor for a function, which reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only.
   *
   * Returns object_ptr<Ok>.
   */
  reportPhoneNumberCodeMissing();

  /**
   * Creates a function, which reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] mobile_network_code_ Current mobile network code.
   */
  explicit reportPhoneNumberCodeMissing(string const &mobile_network_code_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -895175341;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reportPhoneNumberCodeMissing> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReportSponsoredResult;

/**
 * Reports a sponsored chat to Telegram moderators.
 *
 * Returns object_ptr<ReportSponsoredResult>.
 */
class reportSponsoredChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the sponsored chat.
  int53 sponsored_chat_unique_id_;
  static jfieldID sponsored_chat_unique_id_fieldID;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  static jfieldID option_id_fieldID;

  /**
   * Default constructor for a function, which reports a sponsored chat to Telegram moderators.
   *
   * Returns object_ptr<ReportSponsoredResult>.
   */
  reportSponsoredChat();

  /**
   * Creates a function, which reports a sponsored chat to Telegram moderators.
   *
   * Returns object_ptr<ReportSponsoredResult>.
   *
   * \param[in] sponsored_chat_unique_id_ Unique identifier of the sponsored chat.
   * \param[in] option_id_ Option identifier chosen by the user; leave empty for the initial request.
   */
  reportSponsoredChat(int53 sponsored_chat_unique_id_, bytes const &option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -902673019;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportSponsoredResult>;

  static object_ptr<reportSponsoredChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReportStoryResult;

/**
 * Reports a story to the Telegram moderators.
 *
 * Returns object_ptr<ReportStoryResult>.
 */
class reportStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story to report.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story to report.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  static jfieldID option_id_fieldID;
  /// Additional report details; 0-1024 characters; leave empty for the initial request.
  string text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which reports a story to the Telegram moderators.
   *
   * Returns object_ptr<ReportStoryResult>.
   */
  reportStory();

  /**
   * Creates a function, which reports a story to the Telegram moderators.
   *
   * Returns object_ptr<ReportStoryResult>.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story to report.
   * \param[in] story_id_ The identifier of the story to report.
   * \param[in] option_id_ Option identifier chosen by the user; leave empty for the initial request.
   * \param[in] text_ Additional report details; 0-1024 characters; leave empty for the initial request.
   */
  reportStory(int53 story_poster_chat_id_, int32 story_id_, bytes const &option_id_, string const &text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1823256372;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportStoryResult>;

  static object_ptr<reportStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true.
 *
 * Returns object_ptr<Ok>.
 */
class reportSupergroupAntiSpamFalsePositive final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// Identifier of the erroneously deleted message from chatEventMessageDeleted.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true.
   *
   * Returns object_ptr<Ok>.
   */
  reportSupergroupAntiSpamFalsePositive();

  /**
   * Creates a function, which reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Supergroup identifier.
   * \param[in] message_id_ Identifier of the erroneously deleted message from chatEventMessageDeleted.
   */
  reportSupergroupAntiSpamFalsePositive(int53 supergroup_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -516050872;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reportSupergroupAntiSpamFalsePositive> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Reports messages in a supergroup as spam; requires administrator rights in the supergroup.
 *
 * Returns object_ptr<Ok>.
 */
class reportSupergroupSpam final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Supergroup identifier.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// Identifiers of messages to report. Use messageProperties.can_report_supergroup_spam to check whether the message can be reported.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;

  /**
   * Default constructor for a function, which reports messages in a supergroup as spam; requires administrator rights in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  reportSupergroupSpam();

  /**
   * Creates a function, which reports messages in a supergroup as spam; requires administrator rights in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Supergroup identifier.
   * \param[in] message_ids_ Identifiers of messages to report. Use messageProperties.can_report_supergroup_spam to check whether the message can be reported.
   */
  reportSupergroupSpam(int53 supergroup_id_, array<int53> &&message_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -94825000;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reportSupergroupSpam> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReportSponsoredResult;

/**
 * Reports a video message advertisement to Telegram moderators.
 *
 * Returns object_ptr<ReportSponsoredResult>.
 */
class reportVideoMessageAdvertisement final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the advertisement.
  int53 advertisement_unique_id_;
  static jfieldID advertisement_unique_id_fieldID;
  /// Option identifier chosen by the user; leave empty for the initial request.
  bytes option_id_;
  static jfieldID option_id_fieldID;

  /**
   * Default constructor for a function, which reports a video message advertisement to Telegram moderators.
   *
   * Returns object_ptr<ReportSponsoredResult>.
   */
  reportVideoMessageAdvertisement();

  /**
   * Creates a function, which reports a video message advertisement to Telegram moderators.
   *
   * Returns object_ptr<ReportSponsoredResult>.
   *
   * \param[in] advertisement_unique_id_ Unique identifier of the advertisement.
   * \param[in] option_id_ Option identifier chosen by the user; leave empty for the initial request.
   */
  reportVideoMessageAdvertisement(int53 advertisement_unique_id_, bytes const &option_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 617137942;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ReportSponsoredResult>;

  static object_ptr<reportVideoMessageAdvertisement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Requests to send a 2-step verification password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class requestAuthenticationPasswordRecovery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which requests to send a 2-step verification password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  requestAuthenticationPasswordRecovery();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1393896118;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<requestAuthenticationPasswordRecovery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emailAddressAuthenticationCodeInfo;

/**
 * Requests to send a 2-step verification password recovery code to an email address that was previously set up.
 *
 * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
 */
class requestPasswordRecovery final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which requests to send a 2-step verification password recovery code to an email address that was previously set up.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   */
  requestPasswordRecovery();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -13777582;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emailAddressAuthenticationCodeInfo>;

  static object_ptr<requestPasswordRecovery> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class requestQrCodeAuthentication final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// List of user identifiers of other users currently using the application.
  array<int53> other_user_ids_;
  static jfieldID other_user_ids_fieldID;

  /**
   * Default constructor for a function, which requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  requestQrCodeAuthentication();

  /**
   * Creates a function, which requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] other_user_ids_ List of user identifiers of other users currently using the application.
   */
  explicit requestQrCodeAuthentication(array<int53> &&other_user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1363496527;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<requestQrCodeAuthentication> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ResendCodeReason;

class ok;

/**
 * Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode.
 *
 * Returns object_ptr<Ok>.
 */
class resendAuthenticationCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Reason of code resending; pass null if unknown.
  object_ptr<ResendCodeReason> reason_;
  static jfieldID reason_fieldID;

  /**
   * Default constructor for a function, which resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode.
   *
   * Returns object_ptr<Ok>.
   */
  resendAuthenticationCode();

  /**
   * Creates a function, which resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] reason_ Reason of code resending; pass null if unknown.
   */
  explicit resendAuthenticationCode(object_ptr<ResendCodeReason> &&reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1506755656;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<resendAuthenticationCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emailAddressAuthenticationCodeInfo;

/**
 * Resends the code to verify an email address to be added to a user's Telegram Passport.
 *
 * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
 */
class resendEmailAddressVerificationCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resends the code to verify an email address to be added to a user's Telegram Passport.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   */
  resendEmailAddressVerificationCode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1872416732;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emailAddressAuthenticationCodeInfo>;

  static object_ptr<resendEmailAddressVerificationCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emailAddressAuthenticationCodeInfo;

/**
 * Resends the login email address verification code.
 *
 * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
 */
class resendLoginEmailAddressCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resends the login email address verification code.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   */
  resendLoginEmailAddressCode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 292966933;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emailAddressAuthenticationCodeInfo>;

  static object_ptr<resendLoginEmailAddressCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inputTextQuote;

class messages;

/**
 * Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message.
 *
 * Returns object_ptr<Messages>.
 */
class resendMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to send messages.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;
  /// New manually chosen quote from the message to be replied; pass null if none. Ignored if more than one message is re-sent, or if messageSendingStateFailed.need_another_reply_quote == false.
  object_ptr<inputTextQuote> quote_;
  static jfieldID quote_fieldID;
  /// The number of Telegram Stars the user agreed to pay to send the messages. Ignored if messageSendingStateFailed.required_paid_message_star_count == 0.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message.
   *
   * Returns object_ptr<Messages>.
   */
  resendMessages();

  /**
   * Creates a function, which resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Identifier of the chat to send messages.
   * \param[in] message_ids_ Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order.
   * \param[in] quote_ New manually chosen quote from the message to be replied; pass null if none. Ignored if more than one message is re-sent, or if messageSendingStateFailed.need_another_reply_quote == false.
   * \param[in] paid_message_star_count_ The number of Telegram Stars the user agreed to pay to send the messages. Ignored if messageSendingStateFailed.required_paid_message_star_count == 0.
   */
  resendMessages(int53 chat_id_, array<int53> &&message_ids_, object_ptr<inputTextQuote> &&quote_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 526374678;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<resendMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ResendCodeReason;

class authenticationCodeInfo;

/**
 * Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed.
 *
 * Returns object_ptr<AuthenticationCodeInfo>.
 */
class resendPhoneNumberCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Reason of code resending; pass null if unknown.
  object_ptr<ResendCodeReason> reason_;
  static jfieldID reason_fieldID;

  /**
   * Default constructor for a function, which resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed.
   *
   * Returns object_ptr<AuthenticationCodeInfo>.
   */
  resendPhoneNumberCode();

  /**
   * Creates a function, which resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed.
   *
   * Returns object_ptr<AuthenticationCodeInfo>.
   *
   * \param[in] reason_ Reason of code resending; pass null if unknown.
   */
  explicit resendPhoneNumberCode(object_ptr<ResendCodeReason> &&reason_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1808704551;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<authenticationCodeInfo>;

  static object_ptr<resendPhoneNumberCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Resends the 2-step verification recovery email address verification code.
 *
 * Returns object_ptr<PasswordState>.
 */
class resendRecoveryEmailAddressCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resends the 2-step verification recovery email address verification code.
   *
   * Returns object_ptr<PasswordState>.
   */
  resendRecoveryEmailAddressCode();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 433483548;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<resendRecoveryEmailAddressCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Resets all chat and scope notification settings to their default values. By default, all chats are unmuted and message previews are shown.
 *
 * Returns object_ptr<Ok>.
 */
class resetAllNotificationSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resets all chat and scope notification settings to their default values. By default, all chats are unmuted and message previews are shown.
   *
   * Returns object_ptr<Ok>.
   */
  resetAllNotificationSettings();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -174020359;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<resetAllNotificationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Resets the login email address. May return an error with a message &quot;TASK_ALREADY_EXISTS&quot; if reset is still pending. Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true.
 *
 * Returns object_ptr<Ok>.
 */
class resetAuthenticationEmailAddress final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resets the login email address. May return an error with a message &quot;TASK_ALREADY_EXISTS&quot; if reset is still pending. Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true.
   *
   * Returns object_ptr<Ok>.
   */
  resetAuthenticationEmailAddress();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -415075796;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<resetAuthenticationEmailAddress> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Resets list of installed backgrounds to its default value.
 *
 * Returns object_ptr<Ok>.
 */
class resetInstalledBackgrounds final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resets list of installed backgrounds to its default value.
   *
   * Returns object_ptr<Ok>.
   */
  resetInstalledBackgrounds();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1884553559;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<resetInstalledBackgrounds> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Resets all network data usage statistics to zero. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class resetNetworkStatistics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which resets all network data usage statistics to zero. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  resetNetworkStatistics();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1646452102;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<resetNetworkStatistics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ResetPasswordResult;

/**
 * Removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time.
 *
 * Returns object_ptr<ResetPasswordResult>.
 */
class resetPassword final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time.
   *
   * Returns object_ptr<ResetPasswordResult>.
   */
  resetPassword();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -593589091;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ResetPasswordResult>;

  static object_ptr<resetPassword> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Reuses an active Telegram Star subscription to a channel chat and joins the chat again.
 *
 * Returns object_ptr<Ok>.
 */
class reuseStarSubscription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the subscription.
  string subscription_id_;
  static jfieldID subscription_id_fieldID;

  /**
   * Default constructor for a function, which reuses an active Telegram Star subscription to a channel chat and joins the chat again.
   *
   * Returns object_ptr<Ok>.
   */
  reuseStarSubscription();

  /**
   * Creates a function, which reuses an active Telegram Star subscription to a channel chat and joins the chat again.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] subscription_id_ Identifier of the subscription.
   */
  explicit reuseStarSubscription(string const &subscription_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 778531905;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<reuseStarSubscription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatInviteLinks;

/**
 * Revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link.
 *
 * Returns object_ptr<ChatInviteLinks>.
 */
class revokeChatInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Invite link to be revoked.
  string invite_link_;
  static jfieldID invite_link_fieldID;

  /**
   * Default constructor for a function, which revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link.
   *
   * Returns object_ptr<ChatInviteLinks>.
   */
  revokeChatInviteLink();

  /**
   * Creates a function, which revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link.
   *
   * Returns object_ptr<ChatInviteLinks>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] invite_link_ Invite link to be revoked.
   */
  revokeChatInviteLink(int53 chat_id_, string const &invite_link_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -776514135;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatInviteLinks>;

  static object_ptr<revokeChatInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Revokes invite link for a group call. Requires groupCall.can_be_managed right for video chats or groupCall.is_owned otherwise.
 *
 * Returns object_ptr<Ok>.
 */
class revokeGroupCallInviteLink final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which revokes invite link for a group call. Requires groupCall.can_be_managed right for video chats or groupCall.is_owned otherwise.
   *
   * Returns object_ptr<Ok>.
   */
  revokeGroupCallInviteLink();

  /**
   * Creates a function, which revokes invite link for a group call. Requires groupCall.can_be_managed right for video chats or groupCall.is_owned otherwise.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   */
  explicit revokeGroupCallInviteLink(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 501589140;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<revokeGroupCallInviteLink> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class JsonValue;

class ok;

/**
 * Saves application log event on the server. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class saveApplicationLogEvent final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Event type.
  string type_;
  static jfieldID type_fieldID;
  /// Optional chat identifier, associated with the event.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The log event data.
  object_ptr<JsonValue> data_;
  static jfieldID data_fieldID;

  /**
   * Default constructor for a function, which saves application log event on the server. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  saveApplicationLogEvent();

  /**
   * Creates a function, which saves application log event on the server. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] type_ Event type.
   * \param[in] chat_id_ Optional chat identifier, associated with the event.
   * \param[in] data_ The log event data.
   */
  saveApplicationLogEvent(string const &type_, int53 chat_id_, object_ptr<JsonValue> &&data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -811154930;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<saveApplicationLogEvent> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputInlineQueryResult;

class preparedInlineMessageId;

class targetChatTypes;

/**
 * Saves an inline message to be sent by the given user; for bots only.
 *
 * Returns object_ptr<PreparedInlineMessageId>.
 */
class savePreparedInlineMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The description of the message.
  object_ptr<InputInlineQueryResult> result_;
  static jfieldID result_fieldID;
  /// Types of the chats to which the message can be sent.
  object_ptr<targetChatTypes> chat_types_;
  static jfieldID chat_types_fieldID;

  /**
   * Default constructor for a function, which saves an inline message to be sent by the given user; for bots only.
   *
   * Returns object_ptr<PreparedInlineMessageId>.
   */
  savePreparedInlineMessage();

  /**
   * Creates a function, which saves an inline message to be sent by the given user; for bots only.
   *
   * Returns object_ptr<PreparedInlineMessageId>.
   *
   * \param[in] user_id_ Identifier of the user.
   * \param[in] result_ The description of the message.
   * \param[in] chat_types_ Types of the chats to which the message can be sent.
   */
  savePreparedInlineMessage(int53 user_id_, object_ptr<InputInlineQueryResult> &&result_, object_ptr<targetChatTypes> &&chat_types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -954963751;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<preparedInlineMessageId>;

  static object_ptr<savePreparedInlineMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class keyboardButton;

class text;

/**
 * Saves a keyboard button to be shown to the given user; for bots only.
 *
 * Returns object_ptr<Text>.
 */
class savePreparedKeyboardButton final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The button; must be of the type keyboardButtonTypeRequestUsers, keyboardButtonTypeRequestChat, or keyboardButtonTypeRequestManagedBot.
  object_ptr<keyboardButton> button_;
  static jfieldID button_fieldID;

  /**
   * Default constructor for a function, which saves a keyboard button to be shown to the given user; for bots only.
   *
   * Returns object_ptr<Text>.
   */
  savePreparedKeyboardButton();

  /**
   * Creates a function, which saves a keyboard button to be shown to the given user; for bots only.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] user_id_ Identifier of the user.
   * \param[in] button_ The button; must be of the type keyboardButtonTypeRequestUsers, keyboardButtonTypeRequestChat, or keyboardButtonTypeRequestManagedBot.
   */
  savePreparedKeyboardButton(int53 user_id_, object_ptr<keyboardButton> &&button_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -894817192;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<savePreparedKeyboardButton> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AffiliateProgramSortOrder;

class AffiliateType;

class foundAffiliatePrograms;

/**
 * Searches affiliate programs that can be connected to the given affiliate.
 *
 * Returns object_ptr<FoundAffiliatePrograms>.
 */
class searchAffiliatePrograms final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The affiliate for which affiliate programs are searched for.
  object_ptr<AffiliateType> affiliate_;
  static jfieldID affiliate_fieldID;
  /// Sort order for the results.
  object_ptr<AffiliateProgramSortOrder> sort_order_;
  static jfieldID sort_order_fieldID;
  /// Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of affiliate programs to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches affiliate programs that can be connected to the given affiliate.
   *
   * Returns object_ptr<FoundAffiliatePrograms>.
   */
  searchAffiliatePrograms();

  /**
   * Creates a function, which searches affiliate programs that can be connected to the given affiliate.
   *
   * Returns object_ptr<FoundAffiliatePrograms>.
   *
   * \param[in] affiliate_ The affiliate for which affiliate programs are searched for.
   * \param[in] sort_order_ Sort order for the results.
   * \param[in] offset_ Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of affiliate programs to return.
   */
  searchAffiliatePrograms(object_ptr<AffiliateType> &&affiliate_, object_ptr<AffiliateProgramSortOrder> &&sort_order_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 681156625;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundAffiliatePrograms>;

  static object_ptr<searchAffiliatePrograms> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class background;

/**
 * Searches for a background by its name.
 *
 * Returns object_ptr<Background>.
 */
class searchBackground final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The name of the background.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which searches for a background by its name.
   *
   * Returns object_ptr<Background>.
   */
  searchBackground();

  /**
   * Creates a function, which searches for a background by its name.
   *
   * Returns object_ptr<Background>.
   *
   * \param[in] name_ The name of the background.
   */
  explicit searchBackground(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2130996959;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<background>;

  static object_ptr<searchBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundMessages;

/**
 * Searches for call and group call messages. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
 *
 * Returns object_ptr<FoundMessages>.
 */
class searchCallMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Pass true to search only for messages with missed/declined calls.
  bool only_missed_;
  static jfieldID only_missed_fieldID;

  /**
   * Default constructor for a function, which searches for call and group call messages. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<FoundMessages>.
   */
  searchCallMessages();

  /**
   * Creates a function, which searches for call and group call messages. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<FoundMessages>.
   *
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   * \param[in] only_missed_ Pass true to search only for messages with missed/declined calls.
   */
  searchCallMessages(string const &offset_, int32 limit_, bool only_missed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1942229221;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundMessages>;

  static object_ptr<searchCallMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Searches a chat with an affiliate program. Returns the chat if found and the program is active.
 *
 * Returns object_ptr<Chat>.
 */
class searchChatAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username of the chat.
  string username_;
  static jfieldID username_fieldID;
  /// The referrer from an internalLinkTypeChatAffiliateProgram link.
  string referrer_;
  static jfieldID referrer_fieldID;

  /**
   * Default constructor for a function, which searches a chat with an affiliate program. Returns the chat if found and the program is active.
   *
   * Returns object_ptr<Chat>.
   */
  searchChatAffiliateProgram();

  /**
   * Creates a function, which searches a chat with an affiliate program. Returns the chat if found and the program is active.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] username_ Username of the chat.
   * \param[in] referrer_ The referrer from an internalLinkTypeChatAffiliateProgram link.
   */
  searchChatAffiliateProgram(string const &username_, string const &referrer_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1339291206;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<searchChatAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatMembersFilter;

class chatMembers;

/**
 * Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights if the chat is a channel.
 *
 * Returns object_ptr<ChatMembers>.
 */
class searchChatMembers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of users to be returned; up to 200.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// The type of users to search for; pass null to search among all chat members.
  object_ptr<ChatMembersFilter> filter_;
  static jfieldID filter_fieldID;

  /**
   * Default constructor for a function, which searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights if the chat is a channel.
   *
   * Returns object_ptr<ChatMembers>.
   */
  searchChatMembers();

  /**
   * Creates a function, which searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights if the chat is a channel.
   *
   * Returns object_ptr<ChatMembers>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] query_ Query to search for.
   * \param[in] limit_ The maximum number of users to be returned; up to 200.
   * \param[in] filter_ The type of users to search for; pass null to search among all chat members.
   */
  searchChatMembers(int53 chat_id_, string const &query_, int32 limit_, object_ptr<ChatMembersFilter> &&filter_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -445823291;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chatMembers>;

  static object_ptr<searchChatMembers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class MessageTopic;

class SearchMessagesFilter;

class foundChatMessages;

/**
 * Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit. A combination of query, sender_id, filter and topic_id search criteria is expected to be supported, only if it is required for Telegram official application implementation.
 *
 * Returns object_ptr<FoundChatMessages>.
 */
class searchChatMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which to search messages.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass topic identifier to search messages only in specific topic; pass null to search for messages in all topics.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number to get the specified message and some newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Additional filter for messages to search; pass null to search for all messages.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;

  /**
   * Default constructor for a function, which searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit. A combination of query, sender_id, filter and topic_id search criteria is expected to be supported, only if it is required for Telegram official application implementation.
   *
   * Returns object_ptr<FoundChatMessages>.
   */
  searchChatMessages();

  /**
   * Creates a function, which searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit. A combination of query, sender_id, filter and topic_id search criteria is expected to be supported, only if it is required for Telegram official application implementation.
   *
   * Returns object_ptr<FoundChatMessages>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to search messages.
   * \param[in] topic_id_ Pass topic identifier to search messages only in specific topic; pass null to search for messages in all topics.
   * \param[in] query_ Query to search for.
   * \param[in] sender_id_ Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats.
   * \param[in] from_message_id_ Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number to get the specified message and some newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   * \param[in] filter_ Additional filter for messages to search; pass null to search for all messages.
   */
  searchChatMessages(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, string const &query_, object_ptr<MessageSender> &&sender_id_, int53 from_message_id_, int32 offset_, int32 limit_, object_ptr<SearchMessagesFilter> &&filter_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1072442212;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundChatMessages>;

  static object_ptr<searchChatMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user.
 *
 * Returns object_ptr<Messages>.
 */
class searchChatRecentLocationMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The maximum number of messages to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user.
   *
   * Returns object_ptr<Messages>.
   */
  searchChatRecentLocationMessages();

  /**
   * Creates a function, which returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] limit_ The maximum number of messages to be returned.
   */
  searchChatRecentLocationMessages(int53 chat_id_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 950238950;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<searchChatRecentLocationMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Searches for the specified query in the title and username of already known chats. This is an offline method. Returns chats in the order seen in the main chat list.
 *
 * Returns object_ptr<Chats>.
 */
class searchChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for. If the query is empty, returns up to 50 recently found chats.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of chats to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for the specified query in the title and username of already known chats. This is an offline method. Returns chats in the order seen in the main chat list.
   *
   * Returns object_ptr<Chats>.
   */
  searchChats();

  /**
   * Creates a function, which searches for the specified query in the title and username of already known chats. This is an offline method. Returns chats in the order seen in the main chat list.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] query_ Query to search for. If the query is empty, returns up to 50 recently found chats.
   * \param[in] limit_ The maximum number of chats to be returned.
   */
  searchChats(string const &query_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1879787060;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<searchChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list.
 *
 * Returns object_ptr<Chats>.
 */
class searchChatsOnServer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of chats to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list.
   *
   * Returns object_ptr<Chats>.
   */
  searchChatsOnServer();

  /**
   * Creates a function, which searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] query_ Query to search for.
   * \param[in] limit_ The maximum number of chats to be returned.
   */
  searchChatsOnServer(string const &query_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1158402188;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<searchChatsOnServer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class users;

/**
 * Searches for the specified query in the first names, last names and usernames of the known user contacts.
 *
 * Returns object_ptr<Users>.
 */
class searchContacts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for; may be empty to return all contacts.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of users to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for the specified query in the first names, last names and usernames of the known user contacts.
   *
   * Returns object_ptr<Users>.
   */
  searchContacts();

  /**
   * Creates a function, which searches for the specified query in the first names, last names and usernames of the known user contacts.
   *
   * Returns object_ptr<Users>.
   *
   * \param[in] query_ Query to search for; may be empty to return all contacts.
   * \param[in] limit_ The maximum number of users to be returned.
   */
  searchContacts(string const &query_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1794690715;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<users>;

  static object_ptr<searchContacts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiKeywords;

/**
 * Searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified.
 *
 * Returns object_ptr<EmojiKeywords>.
 */
class searchEmojis final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text to search for.
  string text_;
  static jfieldID text_fieldID;
  /// List of possible IETF language tags of the user's input language; may be empty if unknown.
  array<string> input_language_codes_;
  static jfieldID input_language_codes_fieldID;

  /**
   * Default constructor for a function, which searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified.
   *
   * Returns object_ptr<EmojiKeywords>.
   */
  searchEmojis();

  /**
   * Creates a function, which searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified.
   *
   * Returns object_ptr<EmojiKeywords>.
   *
   * \param[in] text_ Text to search for.
   * \param[in] input_language_codes_ List of possible IETF language tags of the user's input language; may be empty if unknown.
   */
  searchEmojis(string const &text_, array<string> &&input_language_codes_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1456187668;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emojiKeywords>;

  static object_ptr<searchEmojis> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundFileDownloads;

/**
 * Searches for files in the file download list or recently downloaded files from the list.
 *
 * Returns object_ptr<FoundFileDownloads>.
 */
class searchFileDownloads final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for; may be empty to return all downloaded files.
  string query_;
  static jfieldID query_fieldID;
  /// Pass true to search only for active downloads, including paused.
  bool only_active_;
  static jfieldID only_active_fieldID;
  /// Pass true to search only for completed downloads.
  bool only_completed_;
  static jfieldID only_completed_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of files to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for files in the file download list or recently downloaded files from the list.
   *
   * Returns object_ptr<FoundFileDownloads>.
   */
  searchFileDownloads();

  /**
   * Creates a function, which searches for files in the file download list or recently downloaded files from the list.
   *
   * Returns object_ptr<FoundFileDownloads>.
   *
   * \param[in] query_ Query to search for; may be empty to return all downloaded files.
   * \param[in] only_active_ Pass true to search only for active downloads, including paused.
   * \param[in] only_completed_ Pass true to search only for completed downloads.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of files to be returned.
   */
  searchFileDownloads(string const &query_, bool only_active_, bool only_completed_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 706611286;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundFileDownloads>;

  static object_ptr<searchFileDownloads> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GiftForResaleOrder;

class UpgradedGiftAttributeId;

class giftsForResale;

/**
 * Returns upgraded gifts that can be bought from other owners using sendResoldGift.
 *
 * Returns object_ptr<GiftsForResale>.
 */
class searchGiftsForResale final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the regular gift that was upgraded to a unique gift.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;
  /// Order in which the results will be sorted.
  object_ptr<GiftForResaleOrder> order_;
  static jfieldID order_fieldID;
  /// Pass true to get only gifts suitable for crafting.
  bool for_crafting_;
  static jfieldID for_crafting_fieldID;
  /// Pass true to get only gifts that can be bought using Telegram Stars.
  bool for_stars_;
  static jfieldID for_stars_fieldID;
  /// Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed. If none attributes of specific type are specified, then all values for this attribute type are allowed.
  array<object_ptr<UpgradedGiftAttributeId>> attributes_;
  static jfieldID attributes_fieldID;
  /// Offset of the first entry to return as received from the previous request with the same order and attributes; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of gifts to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which returns upgraded gifts that can be bought from other owners using sendResoldGift.
   *
   * Returns object_ptr<GiftsForResale>.
   */
  searchGiftsForResale();

  /**
   * Creates a function, which returns upgraded gifts that can be bought from other owners using sendResoldGift.
   *
   * Returns object_ptr<GiftsForResale>.
   *
   * \param[in] gift_id_ Identifier of the regular gift that was upgraded to a unique gift.
   * \param[in] order_ Order in which the results will be sorted.
   * \param[in] for_crafting_ Pass true to get only gifts suitable for crafting.
   * \param[in] for_stars_ Pass true to get only gifts that can be bought using Telegram Stars.
   * \param[in] attributes_ Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed. If none attributes of specific type are specified, then all values for this attribute type are allowed.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request with the same order and attributes; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of gifts to return.
   */
  searchGiftsForResale(int64 gift_id_, object_ptr<GiftForResaleOrder> &&order_, bool for_crafting_, bool for_stars_, array<object_ptr<UpgradedGiftAttributeId>> &&attributes_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1947702322;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftsForResale>;

  static object_ptr<searchGiftsForResale> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class hashtags;

/**
 * Searches for recently used hashtags by their prefix.
 *
 * Returns object_ptr<Hashtags>.
 */
class searchHashtags final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hashtag prefix to search for.
  string prefix_;
  static jfieldID prefix_fieldID;
  /// The maximum number of hashtags to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for recently used hashtags by their prefix.
   *
   * Returns object_ptr<Hashtags>.
   */
  searchHashtags();

  /**
   * Creates a function, which searches for recently used hashtags by their prefix.
   *
   * Returns object_ptr<Hashtags>.
   *
   * \param[in] prefix_ Hashtag prefix to search for.
   * \param[in] limit_ The maximum number of hashtags to be returned.
   */
  searchHashtags(string const &prefix_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1043637617;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<hashtags>;

  static object_ptr<searchHashtags> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class stickerSets;

/**
 * Searches for installed sticker sets by looking for specified query in their title and name.
 *
 * Returns object_ptr<StickerSets>.
 */
class searchInstalledStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker sets to search for.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of sticker sets to return.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for installed sticker sets by looking for specified query in their title and name.
   *
   * Returns object_ptr<StickerSets>.
   */
  searchInstalledStickerSets();

  /**
   * Creates a function, which searches for installed sticker sets by looking for specified query in their title and name.
   *
   * Returns object_ptr<StickerSets>.
   *
   * \param[in] sticker_type_ Type of the sticker sets to search for.
   * \param[in] query_ Query to search for.
   * \param[in] limit_ The maximum number of sticker sets to return.
   */
  searchInstalledStickerSets(object_ptr<StickerType> &&sticker_type_, string const &query_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2120122276;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSets>;

  static object_ptr<searchInstalledStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class SearchMessagesChatTypeFilter;

class SearchMessagesFilter;

class foundMessages;

/**
 * Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundMessages>.
 */
class searchMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterUnreadPollVote, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;
  /// Additional filter for type of the chat of the searched messages; pass null to search for messages in all chats.
  object_ptr<SearchMessagesChatTypeFilter> chat_type_filter_;
  static jfieldID chat_type_filter_fieldID;
  /// If not 0, the minimum date of the messages to return.
  int32 min_date_;
  static jfieldID min_date_fieldID;
  /// If not 0, the maximum date of the messages to return.
  int32 max_date_;
  static jfieldID max_date_fieldID;

  /**
   * Default constructor for a function, which searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundMessages>.
   */
  searchMessages();

  /**
   * Creates a function, which searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundMessages>.
   *
   * \param[in] chat_list_ Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported.
   * \param[in] query_ Query to search for.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   * \param[in] filter_ Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterUnreadPollVote, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function.
   * \param[in] chat_type_filter_ Additional filter for type of the chat of the searched messages; pass null to search for messages in all chats.
   * \param[in] min_date_ If not 0, the minimum date of the messages to return.
   * \param[in] max_date_ If not 0, the maximum date of the messages to return.
   */
  searchMessages(object_ptr<ChatList> &&chat_list_, string const &query_, string const &offset_, int32 limit_, object_ptr<SearchMessagesFilter> &&filter_, object_ptr<SearchMessagesChatTypeFilter> &&chat_type_filter_, int32 min_date_, int32 max_date_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1225448885;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundMessages>;

  static object_ptr<searchMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundMessages;

/**
 * Searches for outgoing messages with content of the type messageDocument in all chats except secret chats. Returns the results in reverse chronological order.
 *
 * Returns object_ptr<FoundMessages>.
 */
class searchOutgoingDocumentMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for in document file name and message caption.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of messages to be returned; up to 100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for outgoing messages with content of the type messageDocument in all chats except secret chats. Returns the results in reverse chronological order.
   *
   * Returns object_ptr<FoundMessages>.
   */
  searchOutgoingDocumentMessages();

  /**
   * Creates a function, which searches for outgoing messages with content of the type messageDocument in all chats except secret chats. Returns the results in reverse chronological order.
   *
   * Returns object_ptr<FoundMessages>.
   *
   * \param[in] query_ Query to search for in document file name and message caption.
   * \param[in] limit_ The maximum number of messages to be returned; up to 100.
   */
  searchOutgoingDocumentMessages(string const &query_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1071397762;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundMessages>;

  static object_ptr<searchOutgoingDocumentMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned.
 *
 * Returns object_ptr<Chat>.
 */
class searchPublicChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Username to be resolved.
  string username_;
  static jfieldID username_fieldID;

  /**
   * Default constructor for a function, which searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned.
   *
   * Returns object_ptr<Chat>.
   */
  searchPublicChat();

  /**
   * Creates a function, which searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] username_ Username to be resolved.
   */
  explicit searchPublicChat(string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 857135533;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<searchPublicChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. Excludes private chats with contacts and chats from the chat list from the results.
 *
 * Returns object_ptr<Chats>.
 */
class searchPublicChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Default constructor for a function, which searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. Excludes private chats with contacts and chats from the chat list from the results.
   *
   * Returns object_ptr<Chats>.
   */
  searchPublicChats();

  /**
   * Creates a function, which searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. Excludes private chats with contacts and chats from the chat list from the results.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] query_ Query to search for.
   */
  explicit searchPublicChats(string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 970385337;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<searchPublicChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundMessages;

/**
 * Searches for public channel posts containing the given hashtag or cashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundMessages>.
 */
class searchPublicMessagesByTag final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Hashtag or cashtag to search for.
  string tag_;
  static jfieldID tag_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for public channel posts containing the given hashtag or cashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundMessages>.
   */
  searchPublicMessagesByTag();

  /**
   * Creates a function, which searches for public channel posts containing the given hashtag or cashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundMessages>.
   *
   * \param[in] tag_ Hashtag or cashtag to search for.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   */
  searchPublicMessagesByTag(string const &tag_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 630680746;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundMessages>;

  static object_ptr<searchPublicMessagesByTag> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundPublicPosts;

/**
 * Searches for public channel posts using the given query. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundPublicPosts>.
 */
class searchPublicPosts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// The Telegram Star amount the user agreed to pay for the search; pass 0 for free searches.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which searches for public channel posts using the given query. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundPublicPosts>.
   */
  searchPublicPosts();

  /**
   * Creates a function, which searches for public channel posts using the given query. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundPublicPosts>.
   *
   * \param[in] query_ Query to search for.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   * \param[in] star_count_ The Telegram Star amount the user agreed to pay for the search; pass 0 for free searches.
   */
  searchPublicPosts(string const &query_, string const &offset_, int32 limit_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 618133347;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundPublicPosts>;

  static object_ptr<searchPublicPosts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundStories;

class locationAddress;

/**
 * Searches for public stories by the given address location. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundStories>.
 */
class searchPublicStoriesByLocation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Address of the location.
  object_ptr<locationAddress> address_;
  static jfieldID address_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for public stories by the given address location. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundStories>.
   */
  searchPublicStoriesByLocation();

  /**
   * Creates a function, which searches for public stories by the given address location. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundStories>.
   *
   * \param[in] address_ Address of the location.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   */
  searchPublicStoriesByLocation(object_ptr<locationAddress> &&address_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1596709256;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundStories>;

  static object_ptr<searchPublicStoriesByLocation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundStories;

/**
 * Searches for public stories containing the given hashtag or cashtag. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundStories>.
 */
class searchPublicStoriesByTag final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the stories to search for; pass 0 to search stories in all chats.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Hashtag or cashtag to search for.
  string tag_;
  static jfieldID tag_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for public stories containing the given hashtag or cashtag. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundStories>.
   */
  searchPublicStoriesByTag();

  /**
   * Creates a function, which searches for public stories containing the given hashtag or cashtag. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundStories>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the stories to search for; pass 0 to search stories in all chats.
   * \param[in] tag_ Hashtag or cashtag to search for.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   */
  searchPublicStoriesByTag(int53 story_poster_chat_id_, string const &tag_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1778102602;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundStories>;

  static object_ptr<searchPublicStoriesByTag> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundStories;

/**
 * Searches for public stories from the given venue. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundStories>.
 */
class searchPublicStoriesByVenue final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Provider of the venue.
  string venue_provider_;
  static jfieldID venue_provider_fieldID;
  /// Identifier of the venue in the provider database.
  string venue_id_;
  static jfieldID venue_id_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for public stories from the given venue. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundStories>.
   */
  searchPublicStoriesByVenue();

  /**
   * Creates a function, which searches for public stories from the given venue. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundStories>.
   *
   * \param[in] venue_provider_ Provider of the venue.
   * \param[in] venue_id_ Identifier of the venue in the provider database.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit.
   */
  searchPublicStoriesByVenue(string const &venue_provider_, string const &venue_id_, string const &offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -686136790;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundStories>;

  static object_ptr<searchPublicStoriesByVenue> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class foundPosition;

/**
 * Searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously.
 *
 * Returns object_ptr<FoundPosition>.
 */
class searchQuote final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text in which to search for the quote.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Quote to search for.
  object_ptr<formattedText> quote_;
  static jfieldID quote_fieldID;
  /// Approximate quote position in UTF-16 code units.
  int32 quote_position_;
  static jfieldID quote_position_fieldID;

  /**
   * Default constructor for a function, which searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously.
   *
   * Returns object_ptr<FoundPosition>.
   */
  searchQuote();

  /**
   * Creates a function, which searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously.
   *
   * Returns object_ptr<FoundPosition>.
   *
   * \param[in] text_ Text in which to search for the quote.
   * \param[in] quote_ Quote to search for.
   * \param[in] quote_position_ Approximate quote position in UTF-16 code units.
   */
  searchQuote(object_ptr<formattedText> &&text_, object_ptr<formattedText> &&quote_, int32 quote_position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1751384351;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundPosition>;

  static object_ptr<searchQuote> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chats;

/**
 * Searches for the specified query in the title and username of up to 50 recently found chats. This is an offline method.
 *
 * Returns object_ptr<Chats>.
 */
class searchRecentlyFoundChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of chats to be returned.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for the specified query in the title and username of up to 50 recently found chats. This is an offline method.
   *
   * Returns object_ptr<Chats>.
   */
  searchRecentlyFoundChats();

  /**
   * Creates a function, which searches for the specified query in the title and username of up to 50 recently found chats. This is an offline method.
   *
   * Returns object_ptr<Chats>.
   *
   * \param[in] query_ Query to search for.
   * \param[in] limit_ The maximum number of chats to be returned.
   */
  searchRecentlyFoundChats(string const &query_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1647445393;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chats>;

  static object_ptr<searchRecentlyFoundChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class foundChatMessages;

/**
 * Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
 *
 * Returns object_ptr<FoundChatMessages>.
 */
class searchSavedMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;
  /// Tag to search for; pass null to return all suitable messages.
  object_ptr<ReactionType> tag_;
  static jfieldID tag_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  int53 from_message_id_;
  static jfieldID from_message_id_fieldID;
  /// Specify 0 to get results from exactly the message from_message_id or a negative number to get the specified message and some newer messages.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundChatMessages>.
   */
  searchSavedMessages();

  /**
   * Creates a function, which searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   *
   * Returns object_ptr<FoundChatMessages>.
   *
   * \param[in] saved_messages_topic_id_ If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.
   * \param[in] tag_ Tag to search for; pass null to return all suitable messages.
   * \param[in] query_ Query to search for.
   * \param[in] from_message_id_ Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
   * \param[in] offset_ Specify 0 to get results from exactly the message from_message_id or a negative number to get the specified message and some newer messages.
   * \param[in] limit_ The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   */
  searchSavedMessages(int53 saved_messages_topic_id_, object_ptr<ReactionType> &&tag_, string const &query_, int53 from_message_id_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1969512554;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundChatMessages>;

  static object_ptr<searchSavedMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class SearchMessagesFilter;

class foundMessages;

/**
 * Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib.
 *
 * Returns object_ptr<FoundMessages>.
 */
class searchSecretMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat in which to search. Specify 0 to search in all secret chats.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Query to search for. If empty, searchChatMessages must be used instead.
  string query_;
  static jfieldID query_fieldID;
  /// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
  string offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Additional filter for messages to search; pass null to search for all messages.
  object_ptr<SearchMessagesFilter> filter_;
  static jfieldID filter_fieldID;

  /**
   * Default constructor for a function, which searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<FoundMessages>.
   */
  searchSecretMessages();

  /**
   * Creates a function, which searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib.
   *
   * Returns object_ptr<FoundMessages>.
   *
   * \param[in] chat_id_ Identifier of the chat in which to search. Specify 0 to search in all secret chats.
   * \param[in] query_ Query to search for. If empty, searchChatMessages must be used instead.
   * \param[in] offset_ Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
   * \param[in] limit_ The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
   * \param[in] filter_ Additional filter for messages to search; pass null to search for all messages.
   */
  searchSecretMessages(int53 chat_id_, string const &query_, string const &offset_, int32 limit_, object_ptr<SearchMessagesFilter> &&filter_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -852865892;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundMessages>;

  static object_ptr<searchSecretMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class stickerSet;

/**
 * Searches for a sticker set by its name.
 *
 * Returns object_ptr<StickerSet>.
 */
class searchStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the sticker set.
  string name_;
  static jfieldID name_fieldID;
  /// Pass true to ignore local cache of sticker sets and always send a network request.
  bool ignore_cache_;
  static jfieldID ignore_cache_fieldID;

  /**
   * Default constructor for a function, which searches for a sticker set by its name.
   *
   * Returns object_ptr<StickerSet>.
   */
  searchStickerSet();

  /**
   * Creates a function, which searches for a sticker set by its name.
   *
   * Returns object_ptr<StickerSet>.
   *
   * \param[in] name_ Name of the sticker set.
   * \param[in] ignore_cache_ Pass true to ignore local cache of sticker sets and always send a network request.
   */
  searchStickerSet(string const &name_, bool ignore_cache_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1676592898;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSet>;

  static object_ptr<searchStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class stickerSets;

/**
 * Searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results.
 *
 * Returns object_ptr<StickerSets>.
 */
class searchStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the sticker sets to return.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;

  /**
   * Default constructor for a function, which searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results.
   *
   * Returns object_ptr<StickerSets>.
   */
  searchStickerSets();

  /**
   * Creates a function, which searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results.
   *
   * Returns object_ptr<StickerSets>.
   *
   * \param[in] sticker_type_ Type of the sticker sets to return.
   * \param[in] query_ Query to search for.
   */
  searchStickerSets(object_ptr<StickerType> &&sticker_type_, string const &query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 262801004;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickerSets>;

  static object_ptr<searchStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StickerType;

class stickers;

/**
 * Searches for stickers from public sticker sets that correspond to any of the given emoji.
 *
 * Returns object_ptr<Stickers>.
 */
class searchStickers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Type of the stickers to return.
  object_ptr<StickerType> sticker_type_;
  static jfieldID sticker_type_fieldID;
  /// Space-separated list of emojis to search for.
  string emojis_;
  static jfieldID emojis_fieldID;
  /// Query to search for; may be empty to search for emoji only.
  string query_;
  static jfieldID query_fieldID;
  /// List of possible IETF language tags of the user's input language; may be empty if unknown.
  array<string> input_language_codes_;
  static jfieldID input_language_codes_fieldID;
  /// The offset from which to return the stickers; must be non-negative.
  int32 offset_;
  static jfieldID offset_fieldID;
  /// The maximum number of stickers to be returned; 0-100.
  int32 limit_;
  static jfieldID limit_fieldID;

  /**
   * Default constructor for a function, which searches for stickers from public sticker sets that correspond to any of the given emoji.
   *
   * Returns object_ptr<Stickers>.
   */
  searchStickers();

  /**
   * Creates a function, which searches for stickers from public sticker sets that correspond to any of the given emoji.
   *
   * Returns object_ptr<Stickers>.
   *
   * \param[in] sticker_type_ Type of the stickers to return.
   * \param[in] emojis_ Space-separated list of emojis to search for.
   * \param[in] query_ Query to search for; may be empty to search for emoji only.
   * \param[in] input_language_codes_ List of possible IETF language tags of the user's input language; may be empty if unknown.
   * \param[in] offset_ The offset from which to return the stickers; must be non-negative.
   * \param[in] limit_ The maximum number of stickers to be returned; 0-100.
   */
  searchStickers(object_ptr<StickerType> &&sticker_type_, string const &emojis_, string const &query_, array<string> &&input_language_codes_, int32 offset_, int32 limit_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1856294754;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<stickers>;

  static object_ptr<searchStickers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundPositions;

/**
 * Searches specified query by word prefixes in the provided strings. Returns 0-based positions of strings that matched. Can be called synchronously.
 *
 * Returns object_ptr<FoundPositions>.
 */
class searchStringsByPrefix final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The strings to search in for the query.
  array<string> strings_;
  static jfieldID strings_fieldID;
  /// Query to search for.
  string query_;
  static jfieldID query_fieldID;
  /// The maximum number of objects to return.
  int32 limit_;
  static jfieldID limit_fieldID;
  /// Pass true to receive no results for an empty query.
  bool return_none_for_empty_query_;
  static jfieldID return_none_for_empty_query_fieldID;

  /**
   * Default constructor for a function, which searches specified query by word prefixes in the provided strings. Returns 0-based positions of strings that matched. Can be called synchronously.
   *
   * Returns object_ptr<FoundPositions>.
   */
  searchStringsByPrefix();

  /**
   * Creates a function, which searches specified query by word prefixes in the provided strings. Returns 0-based positions of strings that matched. Can be called synchronously.
   *
   * Returns object_ptr<FoundPositions>.
   *
   * \param[in] strings_ The strings to search in for the query.
   * \param[in] query_ Query to search for.
   * \param[in] limit_ The maximum number of objects to return.
   * \param[in] return_none_for_empty_query_ Pass true to receive no results for an empty query.
   */
  searchStringsByPrefix(array<string> &&strings_, string const &query_, int32 limit_, bool return_none_for_empty_query_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2023251463;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundPositions>;

  static object_ptr<searchStringsByPrefix> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class textCompositionStyle;

/**
 * Searches a custom text composition style by its name.
 *
 * Returns object_ptr<TextCompositionStyle>.
 */
class searchTextCompositionStyle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the style.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which searches a custom text composition style by its name.
   *
   * Returns object_ptr<TextCompositionStyle>.
   */
  searchTextCompositionStyle();

  /**
   * Creates a function, which searches a custom text composition style by its name.
   *
   * Returns object_ptr<TextCompositionStyle>.
   *
   * \param[in] name_ Name of the style.
   */
  explicit searchTextCompositionStyle(string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -704463202;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<textCompositionStyle>;

  static object_ptr<searchTextCompositionStyle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Searches a user by their phone number. Returns a 404 error if the user can't be found.
 *
 * Returns object_ptr<User>.
 */
class searchUserByPhoneNumber final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Phone number to search for.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// Pass true to get only locally available information without sending network requests.
  bool only_local_;
  static jfieldID only_local_fieldID;

  /**
   * Default constructor for a function, which searches a user by their phone number. Returns a 404 error if the user can't be found.
   *
   * Returns object_ptr<User>.
   */
  searchUserByPhoneNumber();

  /**
   * Creates a function, which searches a user by their phone number. Returns a 404 error if the user can't be found.
   *
   * Returns object_ptr<User>.
   *
   * \param[in] phone_number_ Phone number to search for.
   * \param[in] only_local_ Pass true to get only locally available information without sending network requests.
   */
  searchUserByPhoneNumber(string const &phone_number_, bool only_local_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -343757368;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<searchUserByPhoneNumber> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class user;

/**
 * Searches a user by a token from the user's link.
 *
 * Returns object_ptr<User>.
 */
class searchUserByToken final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Token to search for.
  string token_;
  static jfieldID token_fieldID;

  /**
   * Default constructor for a function, which searches a user by a token from the user's link.
   *
   * Returns object_ptr<User>.
   */
  searchUserByToken();

  /**
   * Creates a function, which searches a user by a token from the user's link.
   *
   * Returns object_ptr<User>.
   *
   * \param[in] token_ Token to search for.
   */
  explicit searchUserByToken(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -666766282;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<user>;

  static object_ptr<searchUserByToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class foundWebApp;

/**
 * Returns information about a Web App by its short name. Returns a 404 error if the Web App is not found.
 *
 * Returns object_ptr<FoundWebApp>.
 */
class searchWebApp final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Short name of the Web App.
  string web_app_short_name_;
  static jfieldID web_app_short_name_fieldID;

  /**
   * Default constructor for a function, which returns information about a Web App by its short name. Returns a 404 error if the Web App is not found.
   *
   * Returns object_ptr<FoundWebApp>.
   */
  searchWebApp();

  /**
   * Creates a function, which returns information about a Web App by its short name. Returns a 404 error if the Web App is not found.
   *
   * Returns object_ptr<FoundWebApp>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] web_app_short_name_ Short name of the Web App.
   */
  searchWebApp(int53 bot_user_id_, string const &web_app_short_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1241740747;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<foundWebApp>;

  static object_ptr<searchWebApp> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sells a gift for Telegram Stars; requires owner privileges for gifts owned by a chat.
 *
 * Returns object_ptr<Ok>.
 */
class sellGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request; for bots only.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;

  /**
   * Default constructor for a function, which sells a gift for Telegram Stars; requires owner privileges for gifts owned by a chat.
   *
   * Returns object_ptr<Ok>.
   */
  sellGift();

  /**
   * Creates a function, which sells a gift for Telegram Stars; requires owner privileges for gifts owned by a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request; for bots only.
   * \param[in] received_gift_id_ Identifier of the gift.
   */
  sellGift(string const &business_connection_id_, string const &received_gift_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -298298375;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sellGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
 *
 * Returns object_ptr<Ok>.
 */
class sendAuthenticationFirebaseSms final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application.
  string token_;
  static jfieldID token_fieldID;

  /**
   * Default constructor for a function, which sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
   *
   * Returns object_ptr<Ok>.
   */
  sendAuthenticationFirebaseSms();

  /**
   * Creates a function, which sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] token_ Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application.
   */
  explicit sendAuthenticationFirebaseSms(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 364994111;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendAuthenticationFirebaseSms> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message.
 *
 * Returns object_ptr<Message>.
 */
class sendBotStartMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the target chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots\#deep-linking).
  string parameter_;
  static jfieldID parameter_fieldID;

  /**
   * Default constructor for a function, which invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message.
   *
   * Returns object_ptr<Message>.
   */
  sendBotStartMessage();

  /**
   * Creates a function, which invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] bot_user_id_ Identifier of the bot.
   * \param[in] chat_id_ Identifier of the target chat.
   * \param[in] parameter_ A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots\#deep-linking).
   */
  sendBotStartMessage(int53 bot_user_id_, int53 chat_id_, string const &parameter_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1435877650;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<sendBotStartMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class InputMessageReplyTo;

class ReplyMarkup;

class businessMessage;

/**
 * Sends a message on behalf of a business account; for bots only. Returns the message after it was sent.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class sendBusinessMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Target chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Information about the message to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  static jfieldID disable_notification_fieldID;
  /// Pass true if the content of the message must be protected from forwarding and saving.
  bool protect_content_;
  static jfieldID protect_content_fieldID;
  /// Identifier of the effect to apply to the message.
  int64 effect_id_;
  static jfieldID effect_id_fieldID;
  /// Markup for replying to the message; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which sends a message on behalf of a business account; for bots only. Returns the message after it was sent.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  sendBusinessMessage();

  /**
   * Creates a function, which sends a message on behalf of a business account; for bots only. Returns the message after it was sent.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request.
   * \param[in] chat_id_ Target chat.
   * \param[in] reply_to_ Information about the message to be replied; pass null if none.
   * \param[in] disable_notification_ Pass true to disable notification for the message.
   * \param[in] protect_content_ Pass true if the content of the message must be protected from forwarding and saving.
   * \param[in] effect_id_ Identifier of the effect to apply to the message.
   * \param[in] reply_markup_ Markup for replying to the message; pass null if none.
   * \param[in] input_message_content_ The content of the message to be sent.
   */
  sendBusinessMessage(string const &business_connection_id_, int53 chat_id_, object_ptr<InputMessageReplyTo> &&reply_to_, bool disable_notification_, bool protect_content_, int64 effect_id_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 159888387;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<sendBusinessMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class InputMessageReplyTo;

class businessMessages;

/**
 * Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
 *
 * Returns object_ptr<BusinessMessages>.
 */
class sendBusinessMessageAlbum final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Target chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Information about the message to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Pass true to disable notification for the message.
  bool disable_notification_;
  static jfieldID disable_notification_fieldID;
  /// Pass true if the content of the message must be protected from forwarding and saving.
  bool protect_content_;
  static jfieldID protect_content_fieldID;
  /// Identifier of the effect to apply to the message.
  int64 effect_id_;
  static jfieldID effect_id_fieldID;
  /// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media.
  array<object_ptr<InputMessageContent>> input_message_contents_;
  static jfieldID input_message_contents_fieldID;

  /**
   * Default constructor for a function, which sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
   *
   * Returns object_ptr<BusinessMessages>.
   */
  sendBusinessMessageAlbum();

  /**
   * Creates a function, which sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
   *
   * Returns object_ptr<BusinessMessages>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request.
   * \param[in] chat_id_ Target chat.
   * \param[in] reply_to_ Information about the message to be replied; pass null if none.
   * \param[in] disable_notification_ Pass true to disable notification for the message.
   * \param[in] protect_content_ Pass true if the content of the message must be protected from forwarding and saving.
   * \param[in] effect_id_ Identifier of the effect to apply to the message.
   * \param[in] input_message_contents_ Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media.
   */
  sendBusinessMessageAlbum(string const &business_connection_id_, int53 chat_id_, object_ptr<InputMessageReplyTo> &&reply_to_, bool disable_notification_, bool protect_content_, int64 effect_id_, array<object_ptr<InputMessageContent>> &&input_message_contents_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 788608366;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessages>;

  static object_ptr<sendBusinessMessageAlbum> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputCall;

class ok;

/**
 * Sends debug information for a call to Telegram servers.
 *
 * Returns object_ptr<Ok>.
 */
class sendCallDebugInformation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  object_ptr<InputCall> call_id_;
  static jfieldID call_id_fieldID;
  /// Debug information in application-specific format.
  string debug_information_;
  static jfieldID debug_information_fieldID;

  /**
   * Default constructor for a function, which sends debug information for a call to Telegram servers.
   *
   * Returns object_ptr<Ok>.
   */
  sendCallDebugInformation();

  /**
   * Creates a function, which sends debug information for a call to Telegram servers.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] call_id_ Call identifier.
   * \param[in] debug_information_ Debug information in application-specific format.
   */
  sendCallDebugInformation(object_ptr<InputCall> &&call_id_, string const &debug_information_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1671879106;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendCallDebugInformation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputCall;

class InputFile;

class ok;

/**
 * Sends log file for a call to Telegram servers.
 *
 * Returns object_ptr<Ok>.
 */
class sendCallLog final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  object_ptr<InputCall> call_id_;
  static jfieldID call_id_fieldID;
  /// Call log file. Only inputFileLocal and inputFileGenerated are supported.
  object_ptr<InputFile> log_file_;
  static jfieldID log_file_fieldID;

  /**
   * Default constructor for a function, which sends log file for a call to Telegram servers.
   *
   * Returns object_ptr<Ok>.
   */
  sendCallLog();

  /**
   * Creates a function, which sends log file for a call to Telegram servers.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] call_id_ Call identifier.
   * \param[in] log_file_ Call log file. Only inputFileLocal and inputFileGenerated are supported.
   */
  sendCallLog(object_ptr<InputCall> &&call_id_, object_ptr<InputFile> &&log_file_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -608809175;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendCallLog> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class CallProblem;

class InputCall;

class ok;

/**
 * Sends a call rating.
 *
 * Returns object_ptr<Ok>.
 */
class sendCallRating final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  object_ptr<InputCall> call_id_;
  static jfieldID call_id_fieldID;
  /// Call rating; 1-5.
  int32 rating_;
  static jfieldID rating_fieldID;
  /// An optional user comment if the rating is less than 5.
  string comment_;
  static jfieldID comment_fieldID;
  /// List of the exact types of problems with the call, specified by the user.
  array<object_ptr<CallProblem>> problems_;
  static jfieldID problems_fieldID;

  /**
   * Default constructor for a function, which sends a call rating.
   *
   * Returns object_ptr<Ok>.
   */
  sendCallRating();

  /**
   * Creates a function, which sends a call rating.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] call_id_ Call identifier.
   * \param[in] rating_ Call rating; 1-5.
   * \param[in] comment_ An optional user comment if the rating is less than 5.
   * \param[in] problems_ List of the exact types of problems with the call, specified by the user.
   */
  sendCallRating(object_ptr<InputCall> &&call_id_, int32 rating_, string const &comment_, array<object_ptr<CallProblem>> &&problems_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -158354447;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendCallRating> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sends call signaling data.
 *
 * Returns object_ptr<Ok>.
 */
class sendCallSignalingData final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Call identifier.
  int32 call_id_;
  static jfieldID call_id_fieldID;
  /// The data.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * Default constructor for a function, which sends call signaling data.
   *
   * Returns object_ptr<Ok>.
   */
  sendCallSignalingData();

  /**
   * Creates a function, which sends call signaling data.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] call_id_ Call identifier.
   * \param[in] data_ The data.
   */
  sendCallSignalingData(int32 call_id_, bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1412280732;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendCallSignalingData> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatAction;

class MessageTopic;

class ok;

/**
 * Sends a notification about user activity in a chat.
 *
 * Returns object_ptr<Ok>.
 */
class sendChatAction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic in which the action is performed; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Unique identifier of business connection on behalf of which to send the request; for bots only.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The action description; pass null to cancel the currently active action.
  object_ptr<ChatAction> action_;
  static jfieldID action_fieldID;

  /**
   * Default constructor for a function, which sends a notification about user activity in a chat.
   *
   * Returns object_ptr<Ok>.
   */
  sendChatAction();

  /**
   * Creates a function, which sends a notification about user activity in a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] topic_id_ Identifier of the topic in which the action is performed; pass null if none.
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request; for bots only.
   * \param[in] action_ The action description; pass null to cancel the currently active action.
   */
  sendChatAction(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, string const &business_connection_id_, object_ptr<ChatAction> &&action_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1586808788;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendChatAction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class customRequestResult;

/**
 * Sends a custom request; for bots only.
 *
 * Returns object_ptr<CustomRequestResult>.
 */
class sendCustomRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The method name.
  string method_;
  static jfieldID method_fieldID;
  /// JSON-serialized method parameters.
  string parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which sends a custom request; for bots only.
   *
   * Returns object_ptr<CustomRequestResult>.
   */
  sendCustomRequest();

  /**
   * Creates a function, which sends a custom request; for bots only.
   *
   * Returns object_ptr<CustomRequestResult>.
   *
   * \param[in] method_ The method name.
   * \param[in] parameters_ JSON-serialized method parameters.
   */
  sendCustomRequest(string const &method_, string const &parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 285045153;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<customRequestResult>;

  static object_ptr<sendCustomRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emailAddressAuthenticationCodeInfo;

/**
 * Sends a code to verify an email address to be added to a user's Telegram Passport.
 *
 * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
 */
class sendEmailAddressVerificationCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Email address.
  string email_address_;
  static jfieldID email_address_fieldID;

  /**
   * Default constructor for a function, which sends a code to verify an email address to be added to a user's Telegram Passport.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   */
  sendEmailAddressVerificationCode();

  /**
   * Creates a function, which sends a code to verify an email address to be added to a user's Telegram Passport.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   *
   * \param[in] email_address_ Email address.
   */
  explicit sendEmailAddressVerificationCode(string const &email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -221621379;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emailAddressAuthenticationCodeInfo>;

  static object_ptr<sendEmailAddressVerificationCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class formattedText;

class ok;

/**
 * Sends a gift to another user or channel chat. May return an error with a message &quot;STARGIFT_USAGE_LIMITED&quot; if the gift was sold out.
 *
 * Returns object_ptr<Ok>.
 */
class sendGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift to send.
  int64 gift_id_;
  static jfieldID gift_id_fieldID;
  /// Identifier of the user or the channel chat that will receive the gift; limited gifts can't be sent to channel chats.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Text to show along with the gift; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed. Must be empty if the receiver enabled paid messages.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them.
  bool is_private_;
  static jfieldID is_private_fieldID;
  /// Pass true to additionally pay for the gift upgrade and allow the receiver to upgrade it for free.
  bool pay_for_upgrade_;
  static jfieldID pay_for_upgrade_fieldID;

  /**
   * Default constructor for a function, which sends a gift to another user or channel chat. May return an error with a message &quot;STARGIFT_USAGE_LIMITED&quot; if the gift was sold out.
   *
   * Returns object_ptr<Ok>.
   */
  sendGift();

  /**
   * Creates a function, which sends a gift to another user or channel chat. May return an error with a message &quot;STARGIFT_USAGE_LIMITED&quot; if the gift was sold out.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] gift_id_ Identifier of the gift to send.
   * \param[in] owner_id_ Identifier of the user or the channel chat that will receive the gift; limited gifts can't be sent to channel chats.
   * \param[in] text_ Text to show along with the gift; 0-getOption(&quot;gift_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed. Must be empty if the receiver enabled paid messages.
   * \param[in] is_private_ Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them.
   * \param[in] pay_for_upgrade_ Pass true to additionally pay for the gift upgrade and allow the receiver to upgrade it for free.
   */
  sendGift(int64 gift_id_, object_ptr<MessageSender> &&owner_id_, object_ptr<formattedText> &&text_, bool is_private_, bool pay_for_upgrade_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1199356118;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GiftResalePrice;

class MessageSender;

class ok;

/**
 * Sends an offer to purchase an upgraded gift.
 *
 * Returns object_ptr<Ok>.
 */
class sendGiftPurchaseOffer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Name of the upgraded gift.
  string gift_name_;
  static jfieldID gift_name_fieldID;
  /// The price that the user agreed to pay for the gift.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;
  /// Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
  int32 duration_;
  static jfieldID duration_fieldID;
  /// The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoing_paid_message_star_count for users and 0 otherwise.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which sends an offer to purchase an upgraded gift.
   *
   * Returns object_ptr<Ok>.
   */
  sendGiftPurchaseOffer();

  /**
   * Creates a function, which sends an offer to purchase an upgraded gift.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
   * \param[in] gift_name_ Name of the upgraded gift.
   * \param[in] price_ The price that the user agreed to pay for the gift.
   * \param[in] duration_ Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
   * \param[in] paid_message_star_count_ The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoing_paid_message_star_count for users and 0 otherwise.
   */
  sendGiftPurchaseOffer(object_ptr<MessageSender> &&owner_id_, string const &gift_name_, object_ptr<GiftResalePrice> &&price_, int32 duration_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 917878931;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendGiftPurchaseOffer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class ok;

/**
 * Sends a message to other participants of a group call. Requires groupCall.can_send_messages right.
 *
 * Returns object_ptr<Ok>.
 */
class sendGroupCallMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Text of the message to send; 1-getOption(&quot;group_call_message_text_length_max&quot;) characters for non-live-stories; see updateGroupCallMessageLevels for live story restrictions, which depends on paid_message_star_count. Can't contain line feeds for live stories. Can contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities for live stories.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// The number of Telegram Stars the user agreed to pay to send the message; for live stories only; 0-getOption(&quot;paid_group_call_message_star_count_max&quot;). Must be 0 for messages sent to live stories posted by the current user.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which sends a message to other participants of a group call. Requires groupCall.can_send_messages right.
   *
   * Returns object_ptr<Ok>.
   */
  sendGroupCallMessage();

  /**
   * Creates a function, which sends a message to other participants of a group call. Requires groupCall.can_send_messages right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] text_ Text of the message to send; 1-getOption(&quot;group_call_message_text_length_max&quot;) characters for non-live-stories; see updateGroupCallMessageLevels for live story restrictions, which depends on paid_message_star_count. Can't contain line feeds for live stories. Can contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities for live stories.
   * \param[in] paid_message_star_count_ The number of Telegram Stars the user agreed to pay to send the message; for live stories only; 0-getOption(&quot;paid_group_call_message_star_count_max&quot;). Must be 0 for messages sent to live stories posted by the current user.
   */
  sendGroupCallMessage(int32 group_call_id_, object_ptr<formattedText> &&text_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2133590097;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendGroupCallMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageReplyTo;

class MessageTopic;

class message;

class messageSendOptions;

/**
 * Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message.
 *
 * Returns object_ptr<Message>.
 */
class sendInlineQueryResultMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Target chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic in which the message will be sent; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Options to be used to send the message; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  static jfieldID options_fieldID;
  /// Identifier of the inline query.
  int64 query_id_;
  static jfieldID query_id_fieldID;
  /// Identifier of the inline query result.
  string result_id_;
  static jfieldID result_id_fieldID;
  /// Pass true to hide the bot, via which the message is sent. Can be used only for bots getOption(&quot;animation_search_bot_username&quot;), getOption(&quot;photo_search_bot_username&quot;), and getOption(&quot;venue_search_bot_username&quot;).
  bool hide_via_bot_;
  static jfieldID hide_via_bot_fieldID;

  /**
   * Default constructor for a function, which sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message.
   *
   * Returns object_ptr<Message>.
   */
  sendInlineQueryResultMessage();

  /**
   * Creates a function, which sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Target chat.
   * \param[in] topic_id_ Topic in which the message will be sent; pass null if none.
   * \param[in] reply_to_ Information about the message or story to be replied; pass null if none.
   * \param[in] options_ Options to be used to send the message; pass null to use default options.
   * \param[in] query_id_ Identifier of the inline query.
   * \param[in] result_id_ Identifier of the inline query result.
   * \param[in] hide_via_bot_ Pass true to hide the bot, via which the message is sent. Can be used only for bots getOption(&quot;animation_search_bot_username&quot;), getOption(&quot;photo_search_bot_username&quot;), and getOption(&quot;venue_search_bot_username&quot;).
   */
  sendInlineQueryResultMessage(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<InputMessageReplyTo> &&reply_to_, object_ptr<messageSendOptions> &&options_, int64 query_id_, string const &result_id_, bool hide_via_bot_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1445935970;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<sendInlineQueryResultMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class InputMessageReplyTo;

class MessageTopic;

class ReplyMarkup;

class message;

class messageSendOptions;

/**
 * Sends a message. Returns the sent message.
 *
 * Returns object_ptr<Message>.
 */
class sendMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Target chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic in which the message will be sent; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Options to be used to send the message; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  static jfieldID options_fieldID;
  /// Markup for replying to the message; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;
  /// The content of the message to be sent.
  object_ptr<InputMessageContent> input_message_content_;
  static jfieldID input_message_content_fieldID;

  /**
   * Default constructor for a function, which sends a message. Returns the sent message.
   *
   * Returns object_ptr<Message>.
   */
  sendMessage();

  /**
   * Creates a function, which sends a message. Returns the sent message.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ Target chat.
   * \param[in] topic_id_ Topic in which the message will be sent; pass null if none.
   * \param[in] reply_to_ Information about the message or story to be replied; pass null if none.
   * \param[in] options_ Options to be used to send the message; pass null to use default options.
   * \param[in] reply_markup_ Markup for replying to the message; pass null if none; for bots only.
   * \param[in] input_message_content_ The content of the message to be sent.
   */
  sendMessage(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<InputMessageReplyTo> &&reply_to_, object_ptr<messageSendOptions> &&options_, object_ptr<ReplyMarkup> &&reply_markup_, object_ptr<InputMessageContent> &&input_message_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 964116012;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<sendMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputMessageContent;

class InputMessageReplyTo;

class MessageTopic;

class messageSendOptions;

class messages;

/**
 * Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
 *
 * Returns object_ptr<Messages>.
 */
class sendMessageAlbum final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Target chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic in which the messages will be sent; pass null if none.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// Information about the message or story to be replied; pass null if none.
  object_ptr<InputMessageReplyTo> reply_to_;
  static jfieldID reply_to_fieldID;
  /// Options to be used to send the messages; pass null to use default options.
  object_ptr<messageSendOptions> options_;
  static jfieldID options_fieldID;
  /// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media.
  array<object_ptr<InputMessageContent>> input_message_contents_;
  static jfieldID input_message_contents_fieldID;

  /**
   * Default constructor for a function, which sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
   *
   * Returns object_ptr<Messages>.
   */
  sendMessageAlbum();

  /**
   * Creates a function, which sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Target chat.
   * \param[in] topic_id_ Topic in which the messages will be sent; pass null if none.
   * \param[in] reply_to_ Information about the message or story to be replied; pass null if none.
   * \param[in] options_ Options to be used to send the messages; pass null to use default options.
   * \param[in] input_message_contents_ Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media.
   */
  sendMessageAlbum(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<InputMessageReplyTo> &&reply_to_, object_ptr<messageSendOptions> &&options_, array<object_ptr<InputMessageContent>> &&input_message_contents_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1488607732;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<sendMessageAlbum> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib about details of a message view by the user from a chat, a message thread or a forum topic history. The method must be called if the message wasn't seen for more than 300 milliseconds, the viewport was destroyed, or the total view duration exceeded 5 minutes.
 *
 * Returns object_ptr<Ok>.
 */
class sendMessageViewMetrics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The identifier of the message being viewed.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The amount of time the message was seen by at least 1 pixel; in milliseconds.
  int32 time_in_view_ms_;
  static jfieldID time_in_view_ms_fieldID;
  /// The amount of time the message was seen by at least 1 pixel within 15 seconds after any action from the user; in milliseconds.
  int32 active_time_in_view_ms_;
  static jfieldID active_time_in_view_ms_fieldID;
  /// The ratio of the post height to the viewport height in 1/1000 fractions.
  int32 height_to_viewport_ratio_per_mille_;
  static jfieldID height_to_viewport_ratio_per_mille_fieldID;
  /// The ratio of the viewed post height to the full post height in 1/1000 fractions; 0-1000.
  int32 seen_range_ratio_per_mille_;
  static jfieldID seen_range_ratio_per_mille_fieldID;

  /**
   * Default constructor for a function, which informs TDLib about details of a message view by the user from a chat, a message thread or a forum topic history. The method must be called if the message wasn't seen for more than 300 milliseconds, the viewport was destroyed, or the total view duration exceeded 5 minutes.
   *
   * Returns object_ptr<Ok>.
   */
  sendMessageViewMetrics();

  /**
   * Creates a function, which informs TDLib about details of a message view by the user from a chat, a message thread or a forum topic history. The method must be called if the message wasn't seen for more than 300 milliseconds, the viewport was destroyed, or the total view duration exceeded 5 minutes.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_id_ The identifier of the message being viewed.
   * \param[in] time_in_view_ms_ The amount of time the message was seen by at least 1 pixel; in milliseconds.
   * \param[in] active_time_in_view_ms_ The amount of time the message was seen by at least 1 pixel within 15 seconds after any action from the user; in milliseconds.
   * \param[in] height_to_viewport_ratio_per_mille_ The ratio of the post height to the viewport height in 1/1000 fractions.
   * \param[in] seen_range_ratio_per_mille_ The ratio of the viewed post height to the full post height in 1/1000 fractions; 0-1000.
   */
  sendMessageViewMetrics(int53 chat_id_, int53 message_id_, int32 time_in_view_ms_, int32 active_time_in_view_ms_, int32 height_to_viewport_ratio_per_mille_, int32 seen_range_ratio_per_mille_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 698012087;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendMessageViewMetrics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PassportElementType;

class ok;

/**
 * Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused.
 *
 * Returns object_ptr<Ok>.
 */
class sendPassportAuthorizationForm final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Authorization form identifier.
  int32 authorization_form_id_;
  static jfieldID authorization_form_id_fieldID;
  /// Types of Telegram Passport elements chosen by user to complete the authorization form.
  array<object_ptr<PassportElementType>> types_;
  static jfieldID types_fieldID;

  /**
   * Default constructor for a function, which sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused.
   *
   * Returns object_ptr<Ok>.
   */
  sendPassportAuthorizationForm();

  /**
   * Creates a function, which sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] authorization_form_id_ Authorization form identifier.
   * \param[in] types_ Types of Telegram Passport elements chosen by user to complete the authorization form.
   */
  sendPassportAuthorizationForm(int32 authorization_form_id_, array<object_ptr<PassportElementType>> &&types_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 652160701;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendPassportAuthorizationForm> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputCredentials;

class InputInvoice;

class paymentResult;

/**
 * Sends a filled-out payment form to the bot for final verification.
 *
 * Returns object_ptr<PaymentResult>.
 */
class sendPaymentForm final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The invoice.
  object_ptr<InputInvoice> input_invoice_;
  static jfieldID input_invoice_fieldID;
  /// Payment form identifier returned by getPaymentForm.
  int64 payment_form_id_;
  static jfieldID payment_form_id_fieldID;
  /// Identifier returned by validateOrderInfo, or an empty string.
  string order_info_id_;
  static jfieldID order_info_id_fieldID;
  /// Identifier of a chosen shipping option, if applicable.
  string shipping_option_id_;
  static jfieldID shipping_option_id_fieldID;
  /// The credentials chosen by user for payment; pass null for a payment in Telegram Stars.
  object_ptr<InputCredentials> credentials_;
  static jfieldID credentials_fieldID;
  /// Chosen by the user amount of tip in the smallest units of the currency.
  int53 tip_amount_;
  static jfieldID tip_amount_fieldID;

  /**
   * Default constructor for a function, which sends a filled-out payment form to the bot for final verification.
   *
   * Returns object_ptr<PaymentResult>.
   */
  sendPaymentForm();

  /**
   * Creates a function, which sends a filled-out payment form to the bot for final verification.
   *
   * Returns object_ptr<PaymentResult>.
   *
   * \param[in] input_invoice_ The invoice.
   * \param[in] payment_form_id_ Payment form identifier returned by getPaymentForm.
   * \param[in] order_info_id_ Identifier returned by validateOrderInfo, or an empty string.
   * \param[in] shipping_option_id_ Identifier of a chosen shipping option, if applicable.
   * \param[in] credentials_ The credentials chosen by user for payment; pass null for a payment in Telegram Stars.
   * \param[in] tip_amount_ Chosen by the user amount of tip in the smallest units of the currency.
   */
  sendPaymentForm(object_ptr<InputInvoice> &&input_invoice_, int64 payment_form_id_, string const &order_info_id_, string const &shipping_option_id_, object_ptr<InputCredentials> &&credentials_, int53 tip_amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -965855094;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<paymentResult>;

  static object_ptr<sendPaymentForm> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PhoneNumberCodeType;

class authenticationCodeInfo;

class phoneNumberAuthenticationSettings;

/**
 * Sends a code to the specified phone number. Aborts previous phone number verification if there was one. On success, returns information about the sent code.
 *
 * Returns object_ptr<AuthenticationCodeInfo>.
 */
class sendPhoneNumberCode final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The phone number, in international format.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// Settings for the authentication of the user's phone number; pass null to use default settings.
  object_ptr<phoneNumberAuthenticationSettings> settings_;
  static jfieldID settings_fieldID;
  /// Type of the request for which the code is sent.
  object_ptr<PhoneNumberCodeType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which sends a code to the specified phone number. Aborts previous phone number verification if there was one. On success, returns information about the sent code.
   *
   * Returns object_ptr<AuthenticationCodeInfo>.
   */
  sendPhoneNumberCode();

  /**
   * Creates a function, which sends a code to the specified phone number. Aborts previous phone number verification if there was one. On success, returns information about the sent code.
   *
   * Returns object_ptr<AuthenticationCodeInfo>.
   *
   * \param[in] phone_number_ The phone number, in international format.
   * \param[in] settings_ Settings for the authentication of the user's phone number; pass null to use default settings.
   * \param[in] type_ Type of the request for which the code is sent.
   */
  sendPhoneNumberCode(string const &phone_number_, object_ptr<phoneNumberAuthenticationSettings> &&settings_, object_ptr<PhoneNumberCodeType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1084112144;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<authenticationCodeInfo>;

  static object_ptr<sendPhoneNumberCode> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sends Firebase Authentication SMS to the specified phone number. Works only when received a code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
 *
 * Returns object_ptr<Ok>.
 */
class sendPhoneNumberFirebaseSms final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application.
  string token_;
  static jfieldID token_fieldID;

  /**
   * Default constructor for a function, which sends Firebase Authentication SMS to the specified phone number. Works only when received a code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
   *
   * Returns object_ptr<Ok>.
   */
  sendPhoneNumberFirebaseSms();

  /**
   * Creates a function, which sends Firebase Authentication SMS to the specified phone number. Works only when received a code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] token_ Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application.
   */
  explicit sendPhoneNumberFirebaseSms(string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 261910660;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendPhoneNumberFirebaseSms> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messages;

/**
 * Sends messages from a quick reply shortcut. Requires Telegram Business subscription. Can't be used to send paid messages.
 *
 * Returns object_ptr<Messages>.
 */
class sendQuickReplyShortcutMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which to send messages. The chat must be a private chat with a regular user.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
  int32 sending_id_;
  static jfieldID sending_id_fieldID;

  /**
   * Default constructor for a function, which sends messages from a quick reply shortcut. Requires Telegram Business subscription. Can't be used to send paid messages.
   *
   * Returns object_ptr<Messages>.
   */
  sendQuickReplyShortcutMessages();

  /**
   * Creates a function, which sends messages from a quick reply shortcut. Requires Telegram Business subscription. Can't be used to send paid messages.
   *
   * Returns object_ptr<Messages>.
   *
   * \param[in] chat_id_ Identifier of the chat to which to send messages. The chat must be a private chat with a regular user.
   * \param[in] shortcut_id_ Unique identifier of the quick reply shortcut.
   * \param[in] sending_id_ Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
   */
  sendQuickReplyShortcutMessages(int53 chat_id_, int32 shortcut_id_, int32 sending_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 232068765;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<messages>;

  static object_ptr<sendQuickReplyShortcutMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GiftResalePrice;

class GiftResaleResult;

class MessageSender;

/**
 * Sends an upgraded gift that is available for resale to another user or channel chat; gifts already owned by the current user must be transferred using transferGift and can't be passed to the method.
 *
 * Returns object_ptr<GiftResaleResult>.
 */
class sendResoldGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Name of the upgraded gift to send.
  string gift_name_;
  static jfieldID gift_name_fieldID;
  /// Identifier of the user or the channel chat that will receive the gift.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// The price that the user agreed to pay for the gift.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;

  /**
   * Default constructor for a function, which sends an upgraded gift that is available for resale to another user or channel chat; gifts already owned by the current user must be transferred using transferGift and can't be passed to the method.
   *
   * Returns object_ptr<GiftResaleResult>.
   */
  sendResoldGift();

  /**
   * Creates a function, which sends an upgraded gift that is available for resale to another user or channel chat; gifts already owned by the current user must be transferred using transferGift and can't be passed to the method.
   *
   * Returns object_ptr<GiftResaleResult>.
   *
   * \param[in] gift_name_ Name of the upgraded gift to send.
   * \param[in] owner_id_ Identifier of the user or the channel chat that will receive the gift.
   * \param[in] price_ The price that the user agreed to pay for the gift.
   */
  sendResoldGift(string const &gift_name_, object_ptr<MessageSender> &&owner_id_, object_ptr<GiftResalePrice> &&price_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1427446834;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<GiftResaleResult>;

  static object_ptr<sendResoldGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class ok;

/**
 * Sends a draft for a being generated text message; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class sendTextMessageDraft final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The forum topic identifier in which the message will be sent; pass 0 if none.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// Unique identifier of the draft.
  int64 draft_id_;
  static jfieldID draft_id_fieldID;
  /// Draft text of the message; pass null to show a &quot;Thinking...&quot; placeholder.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which sends a draft for a being generated text message; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  sendTextMessageDraft();

  /**
   * Creates a function, which sends a draft for a being generated text message; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ The forum topic identifier in which the message will be sent; pass 0 if none.
   * \param[in] draft_id_ Unique identifier of the draft.
   * \param[in] text_ Draft text of the message; pass null to show a &quot;Thinking...&quot; placeholder.
   */
  sendTextMessageDraft(int53 chat_id_, int32 forum_topic_id_, int64 draft_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2121571326;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendTextMessageDraft> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class customRequestResult;

/**
 * Sends a custom request from a Web App.
 *
 * Returns object_ptr<CustomRequestResult>.
 */
class sendWebAppCustomRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The method name.
  string method_;
  static jfieldID method_fieldID;
  /// JSON-serialized method parameters.
  string parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which sends a custom request from a Web App.
   *
   * Returns object_ptr<CustomRequestResult>.
   */
  sendWebAppCustomRequest();

  /**
   * Creates a function, which sends a custom request from a Web App.
   *
   * Returns object_ptr<CustomRequestResult>.
   *
   * \param[in] bot_user_id_ Identifier of the bot.
   * \param[in] method_ The method name.
   * \param[in] parameters_ JSON-serialized method parameters.
   */
  sendWebAppCustomRequest(int53 bot_user_id_, string const &method_, string const &parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 922705352;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<customRequestResult>;

  static object_ptr<sendWebAppCustomRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sends data received from a keyboardButtonTypeWebApp Web App to a bot.
 *
 * Returns object_ptr<Ok>.
 */
class sendWebAppData final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Text of the keyboardButtonTypeWebApp button, which opened the Web App.
  string button_text_;
  static jfieldID button_text_fieldID;
  /// The data.
  string data_;
  static jfieldID data_fieldID;

  /**
   * Default constructor for a function, which sends data received from a keyboardButtonTypeWebApp Web App to a bot.
   *
   * Returns object_ptr<Ok>.
   */
  sendWebAppData();

  /**
   * Creates a function, which sends data received from a keyboardButtonTypeWebApp Web App to a bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] button_text_ Text of the keyboardButtonTypeWebApp button, which opened the Web App.
   * \param[in] data_ The data.
   */
  sendWebAppData(int53 bot_user_id_, string const &button_text_, string const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1423978996;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sendWebAppData> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes accent color and background custom emoji for the current user; for Telegram Premium users only.
 *
 * Returns object_ptr<Ok>.
 */
class setAccentColor final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the accent color to use.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
  int64 background_custom_emoji_id_;
  static jfieldID background_custom_emoji_id_fieldID;

  /**
   * Default constructor for a function, which changes accent color and background custom emoji for the current user; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   */
  setAccentColor();

  /**
   * Creates a function, which changes accent color and background custom emoji for the current user; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] accent_color_id_ Identifier of the accent color to use.
   * \param[in] background_custom_emoji_id_ Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
   */
  setAccentColor(int32 accent_color_id_, int64 background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1669974841;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAccentColor> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class accountTtl;

class ok;

/**
 * Changes the period of inactivity after which the account of the current user will automatically be deleted.
 *
 * Returns object_ptr<Ok>.
 */
class setAccountTtl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New account TTL.
  object_ptr<accountTtl> ttl_;
  static jfieldID ttl_fieldID;

  /**
   * Default constructor for a function, which changes the period of inactivity after which the account of the current user will automatically be deleted.
   *
   * Returns object_ptr<Ok>.
   */
  setAccountTtl();

  /**
   * Creates a function, which changes the period of inactivity after which the account of the current user will automatically be deleted.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] ttl_ New account TTL.
   */
  explicit setAccountTtl(object_ptr<accountTtl> &&ttl_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 701389032;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAccountTtl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Succeeds after a specified amount of time has passed. Can be called before initialization.
 *
 * Returns object_ptr<Ok>.
 */
class setAlarm final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number of seconds before the function returns.
  double seconds_;
  static jfieldID seconds_fieldID;

  /**
   * Default constructor for a function, which succeeds after a specified amount of time has passed. Can be called before initialization.
   *
   * Returns object_ptr<Ok>.
   */
  setAlarm();

  /**
   * Creates a function, which succeeds after a specified amount of time has passed. Can be called before initialization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] seconds_ Number of seconds before the function returns.
   */
  explicit setAlarm(double seconds_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -873497067;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAlarm> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that application or reCAPTCHA verification has been completed. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class setApplicationVerificationToken final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired.
  int53 verification_id_;
  static jfieldID verification_id_fieldID;
  /// Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications; pass an empty string to abort verification and receive the error &quot;VERIFICATION_FAILED&quot; for the request.
  string token_;
  static jfieldID token_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that application or reCAPTCHA verification has been completed. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  setApplicationVerificationToken();

  /**
   * Creates a function, which informs TDLib that application or reCAPTCHA verification has been completed. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] verification_id_ Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired.
   * \param[in] token_ Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications; pass an empty string to abort verification and receive the error &quot;VERIFICATION_FAILED&quot; for the request.
   */
  setApplicationVerificationToken(int53 verification_id_, string const &token_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 927248261;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setApplicationVerificationToken> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class archiveChatListSettings;

class ok;

/**
 * Changes settings for automatic moving of chats to and from the Archive chat lists.
 *
 * Returns object_ptr<Ok>.
 */
class setArchiveChatListSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New settings.
  object_ptr<archiveChatListSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which changes settings for automatic moving of chats to and from the Archive chat lists.
   *
   * Returns object_ptr<Ok>.
   */
  setArchiveChatListSettings();

  /**
   * Creates a function, which changes settings for automatic moving of chats to and from the Archive chat lists.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] settings_ New settings.
   */
  explicit setArchiveChatListSettings(object_ptr<archiveChatListSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -884650998;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setArchiveChatListSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress.
 *
 * Returns object_ptr<Ok>.
 */
class setAuthenticationEmailAddress final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The email address of the user.
  string email_address_;
  static jfieldID email_address_fieldID;

  /**
   * Default constructor for a function, which sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress.
   *
   * Returns object_ptr<Ok>.
   */
  setAuthenticationEmailAddress();

  /**
   * Creates a function, which sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] email_address_ The email address of the user.
   */
  explicit setAuthenticationEmailAddress(string const &email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1773323522;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAuthenticationEmailAddress> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

class phoneNumberAuthenticationSettings;

/**
 * Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
 *
 * Returns object_ptr<Ok>.
 */
class setAuthenticationPhoneNumber final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The phone number of the user, in international format.
  string phone_number_;
  static jfieldID phone_number_fieldID;
  /// Settings for the authentication of the user's phone number; pass null to use default settings.
  object_ptr<phoneNumberAuthenticationSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   */
  setAuthenticationPhoneNumber();

  /**
   * Creates a function, which sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] phone_number_ The phone number of the user, in international format.
   * \param[in] settings_ Settings for the authentication of the user's phone number; pass null to use default settings.
   */
  setAuthenticationPhoneNumber(string const &phone_number_, object_ptr<phoneNumberAuthenticationSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 868276259;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAuthenticationPhoneNumber> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StoreTransaction;

class ok;

/**
 * Informs server about an in-store purchase of Telegram Premium before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.
 *
 * Returns object_ptr<Ok>.
 */
class setAuthenticationPremiumPurchaseTransaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the transaction.
  object_ptr<StoreTransaction> transaction_;
  static jfieldID transaction_fieldID;
  /// Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
  bool is_restore_;
  static jfieldID is_restore_fieldID;
  /// The number of days for which the Telegram Premium subscription will be granted.
  int32 premium_day_count_;
  static jfieldID premium_day_count_fieldID;
  /// ISO 4217 currency code of the payment currency.
  string currency_;
  static jfieldID currency_fieldID;
  /// Paid amount, in the smallest units of the currency.
  int53 amount_;
  static jfieldID amount_fieldID;

  /**
   * Default constructor for a function, which informs server about an in-store purchase of Telegram Premium before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.
   *
   * Returns object_ptr<Ok>.
   */
  setAuthenticationPremiumPurchaseTransaction();

  /**
   * Creates a function, which informs server about an in-store purchase of Telegram Premium before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] transaction_ Information about the transaction.
   * \param[in] is_restore_ Pass true if this is a restore of a Telegram Premium purchase; only for App Store.
   * \param[in] premium_day_count_ The number of days for which the Telegram Premium subscription will be granted.
   * \param[in] currency_ ISO 4217 currency code of the payment currency.
   * \param[in] amount_ Paid amount, in the smallest units of the currency.
   */
  setAuthenticationPremiumPurchaseTransaction(object_ptr<StoreTransaction> &&transaction_, bool is_restore_, int32 premium_day_count_, string const &currency_, int53 amount_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2014147806;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAuthenticationPremiumPurchaseTransaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class NetworkType;

class autoDownloadSettings;

class ok;

/**
 * Sets auto-download settings.
 *
 * Returns object_ptr<Ok>.
 */
class setAutoDownloadSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New user auto-download settings.
  object_ptr<autoDownloadSettings> settings_;
  static jfieldID settings_fieldID;
  /// Type of the network for which the new settings are relevant.
  object_ptr<NetworkType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which sets auto-download settings.
   *
   * Returns object_ptr<Ok>.
   */
  setAutoDownloadSettings();

  /**
   * Creates a function, which sets auto-download settings.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] settings_ New user auto-download settings.
   * \param[in] type_ Type of the network for which the new settings are relevant.
   */
  setAutoDownloadSettings(object_ptr<autoDownloadSettings> &&settings_, object_ptr<NetworkType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -353671948;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAutoDownloadSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class AutosaveSettingsScope;

class ok;

class scopeAutosaveSettings;

/**
 * Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings.
 *
 * Returns object_ptr<Ok>.
 */
class setAutosaveSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Autosave settings scope.
  object_ptr<AutosaveSettingsScope> scope_;
  static jfieldID scope_fieldID;
  /// New autosave settings for the scope; pass null to set autosave settings to default.
  object_ptr<scopeAutosaveSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings.
   *
   * Returns object_ptr<Ok>.
   */
  setAutosaveSettings();

  /**
   * Creates a function, which sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] scope_ Autosave settings scope.
   * \param[in] settings_ New autosave settings for the scope; pass null to set autosave settings to default.
   */
  setAutosaveSettings(object_ptr<AutosaveSettingsScope> &&scope_, object_ptr<scopeAutosaveSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 6846656;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setAutosaveSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the bio of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setBio final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new value of the user bio; 0-getOption(&quot;bio_length_max&quot;) characters without line feeds.
  string bio_;
  static jfieldID bio_fieldID;

  /**
   * Default constructor for a function, which changes the bio of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setBio();

  /**
   * Creates a function, which changes the bio of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bio_ The new value of the user bio; 0-getOption(&quot;bio_length_max&quot;) characters without line feeds.
   */
  explicit setBio(string const &bio_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1619582124;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBio> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class birthdate;

class ok;

/**
 * Changes the birthdate of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setBirthdate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new value of the current user's birthdate; pass null to remove the birthdate.
  object_ptr<birthdate> birthdate_;
  static jfieldID birthdate_fieldID;

  /**
   * Default constructor for a function, which changes the birthdate of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setBirthdate();

  /**
   * Creates a function, which changes the birthdate of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] birthdate_ The new value of the current user's birthdate; pass null to remove the birthdate.
   */
  explicit setBirthdate(object_ptr<birthdate> &&birthdate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1319755160;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBirthdate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the text shown in the chat with a bot if the chat is empty. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Ok>.
 */
class setBotInfoDescription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code. If empty, the description will be shown to all users for whose languages there is no dedicated description.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// New bot's description on the specified language.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Default constructor for a function, which sets the text shown in the chat with a bot if the chat is empty. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   */
  setBotInfoDescription();

  /**
   * Creates a function, which sets the text shown in the chat with a bot if the chat is empty. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] language_code_ A two-letter ISO 639-1 language code. If empty, the description will be shown to all users for whose languages there is no dedicated description.
   * \param[in] description_ New bot's description on the specified language.
   */
  setBotInfoDescription(int53 bot_user_id_, string const &language_code_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 693574984;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBotInfoDescription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the text shown on a bot's profile page and sent together with the link when users share the bot. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Ok>.
 */
class setBotInfoShortDescription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code. If empty, the short description will be shown to all users for whose languages there is no dedicated description.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// New bot's short description on the specified language.
  string short_description_;
  static jfieldID short_description_fieldID;

  /**
   * Default constructor for a function, which sets the text shown on a bot's profile page and sent together with the link when users share the bot. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   */
  setBotInfoShortDescription();

  /**
   * Creates a function, which sets the text shown on a bot's profile page and sent together with the link when users share the bot. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] language_code_ A two-letter ISO 639-1 language code. If empty, the short description will be shown to all users for whose languages there is no dedicated description.
   * \param[in] short_description_ New bot's short description on the specified language.
   */
  setBotInfoShortDescription(int53 bot_user_id_, string const &language_code_, string const &short_description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 982956771;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBotInfoShortDescription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the name of a bot. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Ok>.
 */
class setBotName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose languages there is no dedicated name.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// New bot's name on the specified language; 0-64 characters; must be non-empty if language code is empty.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which sets the name of a bot. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   */
  setBotName();

  /**
   * Creates a function, which sets the name of a bot. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] language_code_ A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose languages there is no dedicated name.
   * \param[in] name_ New bot's name on the specified language; 0-64 characters; must be non-empty if language code is empty.
   */
  setBotName(int53 bot_user_id_, string const &language_code_, string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -761922959;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBotName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatPhoto;

class ok;

/**
 * Changes a profile photo for a bot.
 *
 * Returns object_ptr<Ok>.
 */
class setBotProfilePhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Profile photo to set; pass null to delete the chat photo.
  object_ptr<InputChatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * Default constructor for a function, which changes a profile photo for a bot.
   *
   * Returns object_ptr<Ok>.
   */
  setBotProfilePhoto();

  /**
   * Creates a function, which changes a profile photo for a bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] photo_ Profile photo to set; pass null to delete the chat photo.
   */
  setBotProfilePhoto(int53 bot_user_id_, object_ptr<InputChatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1115272346;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBotProfilePhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBotUpdatesStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The number of pending updates.
  int32 pending_update_count_;
  static jfieldID pending_update_count_fieldID;
  /// The last error message.
  string error_message_;
  static jfieldID error_message_fieldID;

  /**
   * Default constructor for a function, which informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBotUpdatesStatus();

  /**
   * Creates a function, which informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] pending_update_count_ The number of pending updates.
   * \param[in] error_message_ The last error message.
   */
  setBotUpdatesStatus(int32 pending_update_count_, string const &error_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1154926191;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBotUpdatesStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the bio of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessAccountBio final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The new value of the bio; 0-getOption(&quot;bio_length_max&quot;) characters without line feeds.
  string bio_;
  static jfieldID bio_fieldID;

  /**
   * Default constructor for a function, which changes the bio of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessAccountBio();

  /**
   * Creates a function, which changes the bio of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] bio_ The new value of the bio; 0-getOption(&quot;bio_length_max&quot;) characters without line feeds.
   */
  setBusinessAccountBio(string const &business_connection_id_, string const &bio_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1698538041;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessAccountBio> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftSettings;

class ok;

/**
 * Changes settings for gift receiving of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessAccountGiftSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The new settings.
  object_ptr<giftSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which changes settings for gift receiving of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessAccountGiftSettings();

  /**
   * Creates a function, which changes settings for gift receiving of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] settings_ The new settings.
   */
  setBusinessAccountGiftSettings(string const &business_connection_id_, object_ptr<giftSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1757763090;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessAccountGiftSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the first and last name of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessAccountName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The new value of the first name for the business account; 1-64 characters.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// The new value of the optional last name for the business account; 0-64 characters.
  string last_name_;
  static jfieldID last_name_fieldID;

  /**
   * Default constructor for a function, which changes the first and last name of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessAccountName();

  /**
   * Creates a function, which changes the first and last name of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] first_name_ The new value of the first name for the business account; 1-64 characters.
   * \param[in] last_name_ The new value of the optional last name for the business account; 0-64 characters.
   */
  setBusinessAccountName(string const &business_connection_id_, string const &first_name_, string const &last_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 999582546;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessAccountName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatPhoto;

class ok;

/**
 * Changes a profile photo of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessAccountProfilePhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Profile photo to set; pass null to remove the photo.
  object_ptr<InputChatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// Pass true to set the public photo, which will be visible even if the main photo is hidden by privacy settings.
  bool is_public_;
  static jfieldID is_public_fieldID;

  /**
   * Default constructor for a function, which changes a profile photo of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessAccountProfilePhoto();

  /**
   * Creates a function, which changes a profile photo of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] photo_ Profile photo to set; pass null to remove the photo.
   * \param[in] is_public_ Pass true to set the public photo, which will be visible even if the main photo is hidden by privacy settings.
   */
  setBusinessAccountProfilePhoto(string const &business_connection_id_, object_ptr<InputChatPhoto> &&photo_, bool is_public_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1174440149;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessAccountProfilePhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the editable username of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessAccountUsername final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The new value of the username.
  string username_;
  static jfieldID username_fieldID;

  /**
   * Default constructor for a function, which changes the editable username of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessAccountUsername();

  /**
   * Creates a function, which changes the editable username of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] username_ The new value of the username.
   */
  setBusinessAccountUsername(string const &business_connection_id_, string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1520126367;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessAccountUsername> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessAwayMessageSettings;

class ok;

/**
 * Changes the business away message settings of the current user. Requires Telegram Business subscription.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessAwayMessageSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new settings for the away message of the business; pass null to disable the away message.
  object_ptr<businessAwayMessageSettings> away_message_settings_;
  static jfieldID away_message_settings_fieldID;

  /**
   * Default constructor for a function, which changes the business away message settings of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessAwayMessageSettings();

  /**
   * Creates a function, which changes the business away message settings of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] away_message_settings_ The new settings for the away message of the business; pass null to disable the away message.
   */
  explicit setBusinessAwayMessageSettings(object_ptr<businessAwayMessageSettings> &&away_message_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1232357484;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessAwayMessageSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessConnectedBot;

class ok;

/**
 * Adds or changes business bot that is connected to the current user account.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessConnectedBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Connection settings for the bot.
  object_ptr<businessConnectedBot> bot_;
  static jfieldID bot_fieldID;

  /**
   * Default constructor for a function, which adds or changes business bot that is connected to the current user account.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessConnectedBot();

  /**
   * Creates a function, which adds or changes business bot that is connected to the current user account.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_ Connection settings for the bot.
   */
  explicit setBusinessConnectedBot(object_ptr<businessConnectedBot> &&bot_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1393459472;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessConnectedBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessGreetingMessageSettings;

class ok;

/**
 * Changes the business greeting message settings of the current user. Requires Telegram Business subscription.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessGreetingMessageSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new settings for the greeting message of the business; pass null to disable the greeting message.
  object_ptr<businessGreetingMessageSettings> greeting_message_settings_;
  static jfieldID greeting_message_settings_fieldID;

  /**
   * Default constructor for a function, which changes the business greeting message settings of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessGreetingMessageSettings();

  /**
   * Creates a function, which changes the business greeting message settings of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] greeting_message_settings_ The new settings for the greeting message of the business; pass null to disable the greeting message.
   */
  explicit setBusinessGreetingMessageSettings(object_ptr<businessGreetingMessageSettings> &&greeting_message_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -873120707;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessGreetingMessageSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessLocation;

class ok;

/**
 * Changes the business location of the current user. Requires Telegram Business subscription.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessLocation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new location of the business; pass null to remove the location.
  object_ptr<businessLocation> location_;
  static jfieldID location_fieldID;

  /**
   * Default constructor for a function, which changes the business location of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessLocation();

  /**
   * Creates a function, which changes the business location of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] location_ The new location of the business; pass null to remove the location.
   */
  explicit setBusinessLocation(object_ptr<businessLocation> &&location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -344717547;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessLocation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Pins or unpins a message sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessMessageIsPinned final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true to pin the message, pass false to unpin it.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * Default constructor for a function, which pins or unpins a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessMessageIsPinned();

  /**
   * Creates a function, which pins or unpins a message sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] is_pinned_ Pass true to pin the message, pass false to unpin it.
   */
  setBusinessMessageIsPinned(string const &business_connection_id_, int53 chat_id_, int53 message_id_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -15403536;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessMessageIsPinned> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class businessOpeningHours;

class ok;

/**
 * Changes the business opening hours of the current user. Requires Telegram Business subscription.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessOpeningHours final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new opening hours of the business; pass null to remove the opening hours; up to 28 time intervals can be specified.
  object_ptr<businessOpeningHours> opening_hours_;
  static jfieldID opening_hours_fieldID;

  /**
   * Default constructor for a function, which changes the business opening hours of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessOpeningHours();

  /**
   * Creates a function, which changes the business opening hours of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] opening_hours_ The new opening hours of the business; pass null to remove the opening hours; up to 28 time intervals can be specified.
   */
  explicit setBusinessOpeningHours(object_ptr<businessOpeningHours> &&opening_hours_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -462379918;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessOpeningHours> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inputBusinessStartPage;

class ok;

/**
 * Changes the business start page of the current user. Requires Telegram Business subscription.
 *
 * Returns object_ptr<Ok>.
 */
class setBusinessStartPage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new start page of the business; pass null to remove custom start page.
  object_ptr<inputBusinessStartPage> start_page_;
  static jfieldID start_page_fieldID;

  /**
   * Default constructor for a function, which changes the business start page of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   */
  setBusinessStartPage();

  /**
   * Creates a function, which changes the business start page of the current user. Requires Telegram Business subscription.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] start_page_ The new start page of the business; pass null to remove custom start page.
   */
  explicit setBusinessStartPage(object_ptr<inputBusinessStartPage> &&start_page_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1628616290;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setBusinessStartPage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes accent color and background custom emoji of a channel chat. Requires can_change_info administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatAccentColor final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the accent color to use. The chat must have at least accentColor.min_channel_chat_boost_level boost level to pass the corresponding color.
  int32 accent_color_id_;
  static jfieldID accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. Use chatBoostLevelFeatures.can_set_background_custom_emoji to check whether a custom emoji can be set.
  int64 background_custom_emoji_id_;
  static jfieldID background_custom_emoji_id_fieldID;

  /**
   * Default constructor for a function, which changes accent color and background custom emoji of a channel chat. Requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatAccentColor();

  /**
   * Creates a function, which changes accent color and background custom emoji of a channel chat. Requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] accent_color_id_ Identifier of the accent color to use. The chat must have at least accentColor.min_channel_chat_boost_level boost level to pass the corresponding color.
   * \param[in] background_custom_emoji_id_ Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. Use chatBoostLevelFeatures.can_set_background_custom_emoji to check whether a custom emoji can be set.
   */
  setChatAccentColor(int53 chat_id_, int32 accent_color_id_, int64 background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 882857930;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatAccentColor> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StoryList;

class ok;

/**
 * Changes story list in which stories from the chat are shown.
 *
 * Returns object_ptr<Ok>.
 */
class setChatActiveStoriesList final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New list for active stories posted by the chat.
  object_ptr<StoryList> story_list_;
  static jfieldID story_list_fieldID;

  /**
   * Default constructor for a function, which changes story list in which stories from the chat are shown.
   *
   * Returns object_ptr<Ok>.
   */
  setChatActiveStoriesList();

  /**
   * Creates a function, which changes story list in which stories from the chat are shown.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat that posted stories.
   * \param[in] story_list_ New list for active stories posted by the chat.
   */
  setChatActiveStoriesList(int53 chat_id_, object_ptr<StoryList> &&story_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -521970415;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatActiveStoriesList> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class affiliateProgramParameters;

class ok;

/**
 * Changes affiliate program for a bot.
 *
 * Returns object_ptr<Ok>.
 */
class setChatAffiliateProgram final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat with an owned bot for which affiliate program is changed.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Parameters of the affiliate program; pass null to close the currently active program. If there is an active program, then commission and program duration can only be increased. If the active program is scheduled to be closed, then it can't be changed anymore.
  object_ptr<affiliateProgramParameters> parameters_;
  static jfieldID parameters_fieldID;

  /**
   * Default constructor for a function, which changes affiliate program for a bot.
   *
   * Returns object_ptr<Ok>.
   */
  setChatAffiliateProgram();

  /**
   * Creates a function, which changes affiliate program for a bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat with an owned bot for which affiliate program is changed.
   * \param[in] parameters_ Parameters of the affiliate program; pass null to close the currently active program. If there is an active program, then commission and program duration can only be increased. If the active program is scheduled to be closed, then it can't be changed anymore.
   */
  setChatAffiliateProgram(int53 chat_id_, object_ptr<affiliateProgramParameters> &&parameters_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 14680631;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatAffiliateProgram> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatAvailableReactions;

class ok;

/**
 * Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatAvailableReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Reactions available in the chat. All explicitly specified emoji reactions must be active. In channel chats up to the chat's boost level custom emoji reactions can be explicitly specified.
  object_ptr<ChatAvailableReactions> available_reactions_;
  static jfieldID available_reactions_fieldID;

  /**
   * Default constructor for a function, which changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatAvailableReactions();

  /**
   * Creates a function, which changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] available_reactions_ Reactions available in the chat. All explicitly specified emoji reactions must be active. In channel chats up to the chat's boost level custom emoji reactions can be explicitly specified.
   */
  setChatAvailableReactions(int53 chat_id_, object_ptr<ChatAvailableReactions> &&available_reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 267075078;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatAvailableReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundType;

class InputBackground;

class ok;

/**
 * Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users, and in chats with sufficient boost level and can_change_info administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatBackground final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The input background to use; pass null to create a new filled or chat theme background.
  object_ptr<InputBackground> background_;
  static jfieldID background_fieldID;
  /// Background type; pass null to use default background type for the chosen background; backgroundTypeChatTheme isn't supported for private and secret chats. Use chatBoostLevelFeatures.chat_theme_background_count and chatBoostLevelFeatures.can_set_custom_background to check whether the background type can be set in the boosted chat.
  object_ptr<BackgroundType> type_;
  static jfieldID type_fieldID;
  /// Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background.
  int32 dark_theme_dimming_;
  static jfieldID dark_theme_dimming_fieldID;
  /// Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious.
  bool only_for_self_;
  static jfieldID only_for_self_fieldID;

  /**
   * Default constructor for a function, which sets the background in a specific chat. Supported only in private and secret chats with non-deleted users, and in chats with sufficient boost level and can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatBackground();

  /**
   * Creates a function, which sets the background in a specific chat. Supported only in private and secret chats with non-deleted users, and in chats with sufficient boost level and can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] background_ The input background to use; pass null to create a new filled or chat theme background.
   * \param[in] type_ Background type; pass null to use default background type for the chosen background; backgroundTypeChatTheme isn't supported for private and secret chats. Use chatBoostLevelFeatures.chat_theme_background_count and chatBoostLevelFeatures.can_set_custom_background to check whether the background type can be set in the boosted chat.
   * \param[in] dark_theme_dimming_ Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background.
   * \param[in] only_for_self_ Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious.
   */
  setChatBackground(int53 chat_id_, object_ptr<InputBackground> &&background_, object_ptr<BackgroundType> &&type_, int32 dark_theme_dimming_, bool only_for_self_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 246727678;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes application-specific data associated with a chat.
 *
 * Returns object_ptr<Ok>.
 */
class setChatClientData final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of client_data.
  string client_data_;
  static jfieldID client_data_fieldID;

  /**
   * Default constructor for a function, which changes application-specific data associated with a chat.
   *
   * Returns object_ptr<Ok>.
   */
  setChatClientData();

  /**
   * Creates a function, which changes application-specific data associated with a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] client_data_ New value of client_data.
   */
  setChatClientData(int53 chat_id_, string const &client_data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -827119811;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatClientData> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatDescription final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New chat description; 0-255 characters.
  string description_;
  static jfieldID description_fieldID;

  /**
   * Default constructor for a function, which changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatDescription();

  /**
   * Creates a function, which changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] description_ New chat description; 0-255 characters.
   */
  setChatDescription(int53 chat_id_, string const &description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1957213277;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatDescription> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes direct messages group settings for a channel chat; requires owner privileges in the chat.
 *
 * Returns object_ptr<Ok>.
 */
class setChatDirectMessagesGroup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true if the direct messages group is enabled for the channel chat; pass false otherwise.
  bool is_enabled_;
  static jfieldID is_enabled_fieldID;
  /// The new number of Telegram Stars that must be paid for each message that is sent to the direct messages chat unless the sender is an administrator of the channel chat; 0-getOption(&quot;paid_message_star_count_max&quot;). The channel will receive getOption(&quot;paid_message_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for message sending. Requires supergroupFullInfo.can_enable_paid_messages for positive amounts.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which changes direct messages group settings for a channel chat; requires owner privileges in the chat.
   *
   * Returns object_ptr<Ok>.
   */
  setChatDirectMessagesGroup();

  /**
   * Creates a function, which changes direct messages group settings for a channel chat; requires owner privileges in the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the channel chat.
   * \param[in] is_enabled_ Pass true if the direct messages group is enabled for the channel chat; pass false otherwise.
   * \param[in] paid_message_star_count_ The new number of Telegram Stars that must be paid for each message that is sent to the direct messages chat unless the sender is an administrator of the channel chat; 0-getOption(&quot;paid_message_star_count_max&quot;). The channel will receive getOption(&quot;paid_message_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for message sending. Requires supergroupFullInfo.can_enable_paid_messages for positive amounts.
   */
  setChatDirectMessagesGroup(int53 chat_id_, bool is_enabled_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1633150115;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatDirectMessagesGroup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified.
 *
 * Returns object_ptr<Ok>.
 */
class setChatDiscussionGroup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages member right in the supergroup).
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that.
  int53 discussion_chat_id_;
  static jfieldID discussion_chat_id_fieldID;

  /**
   * Default constructor for a function, which changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified.
   *
   * Returns object_ptr<Ok>.
   */
  setChatDiscussionGroup();

  /**
   * Creates a function, which changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages member right in the supergroup).
   * \param[in] discussion_chat_id_ Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that.
   */
  setChatDiscussionGroup(int53 chat_id_, int53 discussion_chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -918801736;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatDiscussionGroup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageTopic;

class draftMessage;

class ok;

/**
 * Changes the draft message in a chat or a topic.
 *
 * Returns object_ptr<Ok>.
 */
class setChatDraftMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic in which the draft will be changed; pass null to change the draft for the chat itself.
  object_ptr<MessageTopic> topic_id_;
  static jfieldID topic_id_fieldID;
  /// New draft message; pass null to remove the draft. All files in draft message content must be of the type inputFileLocal. Media thumbnails and captions are ignored.
  object_ptr<draftMessage> draft_message_;
  static jfieldID draft_message_fieldID;

  /**
   * Default constructor for a function, which changes the draft message in a chat or a topic.
   *
   * Returns object_ptr<Ok>.
   */
  setChatDraftMessage();

  /**
   * Creates a function, which changes the draft message in a chat or a topic.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] topic_id_ Topic in which the draft will be changed; pass null to change the draft for the chat itself.
   * \param[in] draft_message_ New draft message; pass null to remove the draft. All files in draft message content must be of the type inputFileLocal. Media thumbnails and captions are ignored.
   */
  setChatDraftMessage(int53 chat_id_, object_ptr<MessageTopic> &&topic_id_, object_ptr<draftMessage> &&draft_message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -555614927;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatDraftMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatus;

class ok;

/**
 * Changes the emoji status of a chat. Use chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatEmojiStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New emoji status; pass null to remove emoji status.
  object_ptr<emojiStatus> emoji_status_;
  static jfieldID emoji_status_fieldID;

  /**
   * Default constructor for a function, which changes the emoji status of a chat. Use chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatEmojiStatus();

  /**
   * Creates a function, which changes the emoji status of a chat. Use chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] emoji_status_ New emoji status; pass null to remove emoji status.
   */
  setChatEmojiStatus(int53 chat_id_, object_ptr<emojiStatus> &&emoji_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1434982674;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatEmojiStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatLocation;

class ok;

/**
 * Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use.
 *
 * Returns object_ptr<Ok>.
 */
class setChatLocation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New location for the chat; must be valid and not null.
  object_ptr<chatLocation> location_;
  static jfieldID location_fieldID;

  /**
   * Default constructor for a function, which changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use.
   *
   * Returns object_ptr<Ok>.
   */
  setChatLocation();

  /**
   * Creates a function, which changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] location_ New location for the chat; must be valid and not null.
   */
  setChatLocation(int53 chat_id_, object_ptr<chatLocation> &&location_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -767091286;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatLocation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatMemberStatus;

class MessageSender;

class ok;

/**
 * Changes the status of a chat member; requires can_invite_users member right to add a chat member, can_promote_members administrator right to change administrator rights of the member, and can_restrict_members administrator right to change restrictions of a user. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed.
 *
 * Returns object_ptr<Ok>.
 */
class setChatMemberStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Member identifier. Chats can be only banned and unbanned in supergroups and channels.
  object_ptr<MessageSender> member_id_;
  static jfieldID member_id_fieldID;
  /// The new status of the member in the chat.
  object_ptr<ChatMemberStatus> status_;
  static jfieldID status_fieldID;

  /**
   * Default constructor for a function, which changes the status of a chat member; requires can_invite_users member right to add a chat member, can_promote_members administrator right to change administrator rights of the member, and can_restrict_members administrator right to change restrictions of a user. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed.
   *
   * Returns object_ptr<Ok>.
   */
  setChatMemberStatus();

  /**
   * Creates a function, which changes the status of a chat member; requires can_invite_users member right to add a chat member, can_promote_members administrator right to change administrator rights of the member, and can_restrict_members administrator right to change restrictions of a user. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] member_id_ Member identifier. Chats can be only banned and unbanned in supergroups and channels.
   * \param[in] status_ The new status of the member in the chat.
   */
  setChatMemberStatus(int53 chat_id_, object_ptr<MessageSender> &&member_id_, object_ptr<ChatMemberStatus> &&status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 81794847;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatMemberStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the tag or custom title of a chat member; requires can_manage_tags administrator right to change tag of other users; for basic groups and supergroups only.
 *
 * Returns object_ptr<Ok>.
 */
class setChatMemberTag final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the user, which tag is changed. Chats can't have member tags.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The new tag of the member in the chat; 0-16 characters without emoji.
  string tag_;
  static jfieldID tag_fieldID;

  /**
   * Default constructor for a function, which changes the tag or custom title of a chat member; requires can_manage_tags administrator right to change tag of other users; for basic groups and supergroups only.
   *
   * Returns object_ptr<Ok>.
   */
  setChatMemberTag();

  /**
   * Creates a function, which changes the tag or custom title of a chat member; requires can_manage_tags administrator right to change tag of other users; for basic groups and supergroups only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] user_id_ Identifier of the user, which tag is changed. Chats can't have member tags.
   * \param[in] tag_ The new tag of the member in the chat; 0-16 characters without emoji.
   */
  setChatMemberTag(int53 chat_id_, int53 user_id_, string const &tag_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 937859366;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatMemberTag> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
 *
 * Returns object_ptr<Ok>.
 */
class setChatMessageAutoDeleteTime final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
  int32 message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;

  /**
   * Default constructor for a function, which changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
   *
   * Returns object_ptr<Ok>.
   */
  setChatMessageAutoDeleteTime();

  /**
   * Creates a function, which changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels. Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_auto_delete_time_ New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
   */
  setChatMessageAutoDeleteTime(int53 chat_id_, int32 message_auto_delete_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1505643265;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatMessageAutoDeleteTime> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Selects a message sender to send messages in a chat.
 *
 * Returns object_ptr<Ok>.
 */
class setChatMessageSender final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New message sender for the chat.
  object_ptr<MessageSender> message_sender_id_;
  static jfieldID message_sender_id_fieldID;

  /**
   * Default constructor for a function, which selects a message sender to send messages in a chat.
   *
   * Returns object_ptr<Ok>.
   */
  setChatMessageSender();

  /**
   * Creates a function, which selects a message sender to send messages in a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_sender_id_ New message sender for the chat.
   */
  setChatMessageSender(int53 chat_id_, object_ptr<MessageSender> &&message_sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1421513858;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatMessageSender> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatNotificationSettings;

class ok;

/**
 * Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed.
 *
 * Returns object_ptr<Ok>.
 */
class setChatNotificationSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New notification settings for the chat. If the chat is muted for more than 366 days, it is considered to be muted forever.
  object_ptr<chatNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Default constructor for a function, which changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed.
   *
   * Returns object_ptr<Ok>.
   */
  setChatNotificationSettings();

  /**
   * Creates a function, which changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] notification_settings_ New notification settings for the chat. If the chat is muted for more than 366 days, it is considered to be muted forever.
   */
  setChatNotificationSettings(int53 chat_id_, object_ptr<chatNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 777199614;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatNotificationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages.
 *
 * Returns object_ptr<Ok>.
 */
class setChatPaidMessageStarCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new number of Telegram Stars that must be paid for each message that is sent to the supergroup chat unless the sender is an administrator of the chat; 0-getOption(&quot;paid_message_star_count_max&quot;). The supergroup will receive getOption(&quot;paid_message_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for message sending.
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages.
   *
   * Returns object_ptr<Ok>.
   */
  setChatPaidMessageStarCount();

  /**
   * Creates a function, which changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can_restrict_members administrator right and supergroupFullInfo.can_enable_paid_messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the supergroup chat.
   * \param[in] paid_message_star_count_ The new number of Telegram Stars that must be paid for each message that is sent to the supergroup chat unless the sender is an administrator of the chat; 0-getOption(&quot;paid_message_star_count_max&quot;). The supergroup will receive getOption(&quot;paid_message_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for message sending.
   */
  setChatPaidMessageStarCount(int53 chat_id_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1187053289;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatPaidMessageStarCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatPermissions;

class ok;

/**
 * Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatPermissions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New non-administrator members permissions in the chat.
  object_ptr<chatPermissions> permissions_;
  static jfieldID permissions_fieldID;

  /**
   * Default constructor for a function, which changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatPermissions();

  /**
   * Creates a function, which changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] permissions_ New non-administrator members permissions in the chat.
   */
  setChatPermissions(int53 chat_id_, object_ptr<chatPermissions> &&permissions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2138507006;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatPermissions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatPhoto;

class ok;

/**
 * Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatPhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New chat photo; pass null to delete the chat photo.
  object_ptr<InputChatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * Default constructor for a function, which changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatPhoto();

  /**
   * Creates a function, which changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] photo_ New chat photo; pass null to delete the chat photo.
   */
  setChatPhoto(int53 chat_id_, object_ptr<InputChatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -377778941;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatPhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the list of pinned stories on a chat page; requires can_edit_stories administrator right in the chat.
 *
 * Returns object_ptr<Ok>.
 */
class setChatPinnedStories final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New list of pinned stories. All stories must be posted to the chat page first. There can be up to getOption(&quot;pinned_story_count_max&quot;) pinned stories on a chat page.
  array<int32> story_ids_;
  static jfieldID story_ids_fieldID;

  /**
   * Default constructor for a function, which changes the list of pinned stories on a chat page; requires can_edit_stories administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   */
  setChatPinnedStories();

  /**
   * Creates a function, which changes the list of pinned stories on a chat page; requires can_edit_stories administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat that posted the stories.
   * \param[in] story_ids_ New list of pinned stories. All stories must be posted to the chat page first. There can be up to getOption(&quot;pinned_story_count_max&quot;) pinned stories on a chat page.
   */
  setChatPinnedStories(int53 chat_id_, array<int32> &&story_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -669062355;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatPinnedStories> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes accent color and background custom emoji for profile of a supergroup or channel chat. Requires can_change_info administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatProfileAccentColor final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_supergroup_chat_boost_level for supergroups or profileAccentColor.min_channel_chat_boost_level for channels boost level to pass the corresponding color.
  int32 profile_accent_color_id_;
  static jfieldID profile_accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set.
  int64 profile_background_custom_emoji_id_;
  static jfieldID profile_background_custom_emoji_id_fieldID;

  /**
   * Default constructor for a function, which changes accent color and background custom emoji for profile of a supergroup or channel chat. Requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatProfileAccentColor();

  /**
   * Creates a function, which changes accent color and background custom emoji for profile of a supergroup or channel chat. Requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] profile_accent_color_id_ Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_supergroup_chat_boost_level for supergroups or profileAccentColor.min_channel_chat_boost_level for channels boost level to pass the corresponding color.
   * \param[in] profile_background_custom_emoji_id_ Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set.
   */
  setChatProfileAccentColor(int53 chat_id_, int32 profile_accent_color_id_, int64 profile_background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1109896826;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatProfileAccentColor> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatSlowModeDelay final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New slow mode delay for the chat, in seconds; must be one of 0, 5, 10, 30, 60, 300, 900, 3600.
  int32 slow_mode_delay_;
  static jfieldID slow_mode_delay_fieldID;

  /**
   * Default constructor for a function, which changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatSlowModeDelay();

  /**
   * Creates a function, which changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] slow_mode_delay_ New slow mode delay for the chat, in seconds; must be one of 0, 5, 10, 30, 60, 300, 900, 3600.
   */
  setChatSlowModeDelay(int53 chat_id_, int32 slow_mode_delay_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -540350914;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatSlowModeDelay> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatTheme;

class ok;

/**
 * Changes the chat theme. Supported only in private and secret chats.
 *
 * Returns object_ptr<Ok>.
 */
class setChatTheme final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New chat theme; pass null to return the default theme.
  object_ptr<InputChatTheme> theme_;
  static jfieldID theme_fieldID;

  /**
   * Default constructor for a function, which changes the chat theme. Supported only in private and secret chats.
   *
   * Returns object_ptr<Ok>.
   */
  setChatTheme();

  /**
   * Creates a function, which changes the chat theme. Supported only in private and secret chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] theme_ New chat theme; pass null to return the default theme.
   */
  setChatTheme(int53 chat_id_, object_ptr<InputChatTheme> &&theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1474791506;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatTheme> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
 *
 * Returns object_ptr<Ok>.
 */
class setChatTitle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New title of the chat; 1-128 characters.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Default constructor for a function, which changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   */
  setChatTitle();

  /**
   * Creates a function, which changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] title_ New title of the chat; 1-128 characters.
   */
  setChatTitle(int53 chat_id_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 164282047;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setChatTitle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the list of close friends of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setCloseFriends final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifiers of close friends; the users must be contacts of the current user.
  array<int53> user_ids_;
  static jfieldID user_ids_fieldID;

  /**
   * Default constructor for a function, which changes the list of close friends of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setCloseFriends();

  /**
   * Creates a function, which changes the list of close friends of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_ids_ User identifiers of close friends; the users must be contacts of the current user.
   */
  explicit setCloseFriends(array<int53> &&user_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1908013258;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setCloseFriends> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BotCommandScope;

class botCommand;

class ok;

/**
 * Sets the list of commands supported by the bot for the given user scope and language; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setCommands final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The scope to which the commands are relevant; pass null to change commands in the default bot command scope.
  object_ptr<BotCommandScope> scope_;
  static jfieldID scope_fieldID;
  /// A two-letter ISO 639-1 language code. If empty, the commands will be applied to all users from the given scope, for which language there are no dedicated commands.
  string language_code_;
  static jfieldID language_code_fieldID;
  /// List of the bot's commands.
  array<object_ptr<botCommand>> commands_;
  static jfieldID commands_fieldID;

  /**
   * Default constructor for a function, which sets the list of commands supported by the bot for the given user scope and language; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setCommands();

  /**
   * Creates a function, which sets the list of commands supported by the bot for the given user scope and language; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] scope_ The scope to which the commands are relevant; pass null to change commands in the default bot command scope.
   * \param[in] language_code_ A two-letter ISO 639-1 language code. If empty, the commands will be applied to all users from the given scope, for which language there are no dedicated commands.
   * \param[in] commands_ List of the bot's commands.
   */
  setCommands(object_ptr<BotCommandScope> &&scope_, string const &language_code_, array<object_ptr<botCommand>> &&commands_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -907165606;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setCommands> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets a custom emoji sticker set thumbnail.
 *
 * Returns object_ptr<Ok>.
 */
class setCustomEmojiStickerSetThumbnail final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  static jfieldID name_fieldID;
  /// Identifier of the custom emoji from the sticker set, which will be set as sticker set thumbnail; pass 0 to remove the sticker set thumbnail.
  int64 custom_emoji_id_;
  static jfieldID custom_emoji_id_fieldID;

  /**
   * Default constructor for a function, which sets a custom emoji sticker set thumbnail.
   *
   * Returns object_ptr<Ok>.
   */
  setCustomEmojiStickerSetThumbnail();

  /**
   * Creates a function, which sets a custom emoji sticker set thumbnail.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ Sticker set name. The sticker set must be owned by the current user.
   * \param[in] custom_emoji_id_ Identifier of the custom emoji from the sticker set, which will be set as sticker set thumbnail; pass 0 to remove the sticker set thumbnail.
   */
  setCustomEmojiStickerSetThumbnail(string const &name_, int64 custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1122836246;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setCustomEmojiStickerSetThumbnail> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class languagePackInfo;

class languagePackString;

class ok;

/**
 * Adds or changes a custom local language pack to the current localization target.
 *
 * Returns object_ptr<Ok>.
 */
class setCustomLanguagePack final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Information about the language pack. Language pack identifier must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization.
  object_ptr<languagePackInfo> info_;
  static jfieldID info_fieldID;
  /// Strings of the new language pack.
  array<object_ptr<languagePackString>> strings_;
  static jfieldID strings_fieldID;

  /**
   * Default constructor for a function, which adds or changes a custom local language pack to the current localization target.
   *
   * Returns object_ptr<Ok>.
   */
  setCustomLanguagePack();

  /**
   * Creates a function, which adds or changes a custom local language pack to the current localization target.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] info_ Information about the language pack. Language pack identifier must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization.
   * \param[in] strings_ Strings of the new language pack.
   */
  setCustomLanguagePack(object_ptr<languagePackInfo> &&info_, array<object_ptr<languagePackString>> &&strings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -296742819;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setCustomLanguagePack> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class languagePackString;

class ok;

/**
 * Adds, edits or deletes a string in a custom local language pack. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class setCustomLanguagePackString final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a previously added custom local language pack in the current localization target.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;
  /// New language pack string.
  object_ptr<languagePackString> new_string_;
  static jfieldID new_string_fieldID;

  /**
   * Default constructor for a function, which adds, edits or deletes a string in a custom local language pack. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  setCustomLanguagePackString();

  /**
   * Creates a function, which adds, edits or deletes a string in a custom local language pack. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] language_pack_id_ Identifier of a previously added custom local language pack in the current localization target.
   * \param[in] new_string_ New language pack string.
   */
  setCustomLanguagePackString(string const &language_pack_id_, object_ptr<languagePackString> &&new_string_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1316365592;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setCustomLanguagePackString> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain.
 *
 * Returns object_ptr<Ok>.
 */
class setDatabaseEncryptionKey final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New encryption key.
  bytes new_encryption_key_;
  static jfieldID new_encryption_key_fieldID;

  /**
   * Default constructor for a function, which changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain.
   *
   * Returns object_ptr<Ok>.
   */
  setDatabaseEncryptionKey();

  /**
   * Creates a function, which changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] new_encryption_key_ New encryption key.
   */
  explicit setDatabaseEncryptionKey(bytes const &new_encryption_key_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1204599371;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setDatabaseEncryptionKey> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BackgroundType;

class InputBackground;

class background;

/**
 * Sets default background for chats; adds the background to the list of installed backgrounds.
 *
 * Returns object_ptr<Background>.
 */
class setDefaultBackground final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The input background to use; pass null to create a new filled background.
  object_ptr<InputBackground> background_;
  static jfieldID background_fieldID;
  /// Background type; pass null to use the default type of the remote background; backgroundTypeChatTheme isn't supported.
  object_ptr<BackgroundType> type_;
  static jfieldID type_fieldID;
  /// Pass true if the background is set for a dark theme.
  bool for_dark_theme_;
  static jfieldID for_dark_theme_fieldID;

  /**
   * Default constructor for a function, which sets default background for chats; adds the background to the list of installed backgrounds.
   *
   * Returns object_ptr<Background>.
   */
  setDefaultBackground();

  /**
   * Creates a function, which sets default background for chats; adds the background to the list of installed backgrounds.
   *
   * Returns object_ptr<Background>.
   *
   * \param[in] background_ The input background to use; pass null to create a new filled background.
   * \param[in] type_ Background type; pass null to use the default type of the remote background; backgroundTypeChatTheme isn't supported.
   * \param[in] for_dark_theme_ Pass true if the background is set for a dark theme.
   */
  setDefaultBackground(object_ptr<InputBackground> &&background_, object_ptr<BackgroundType> &&type_, bool for_dark_theme_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1982748511;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<background>;

  static object_ptr<setDefaultBackground> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatAdministratorRights;

class ok;

/**
 * Sets default administrator rights for adding the bot to channel chats; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setDefaultChannelAdministratorRights final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Default administrator rights for adding the bot to channels; pass null to remove default rights.
  object_ptr<chatAdministratorRights> default_channel_administrator_rights_;
  static jfieldID default_channel_administrator_rights_fieldID;

  /**
   * Default constructor for a function, which sets default administrator rights for adding the bot to channel chats; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setDefaultChannelAdministratorRights();

  /**
   * Creates a function, which sets default administrator rights for adding the bot to channel chats; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] default_channel_administrator_rights_ Default administrator rights for adding the bot to channels; pass null to remove default rights.
   */
  explicit setDefaultChannelAdministratorRights(object_ptr<chatAdministratorRights> &&default_channel_administrator_rights_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -234004967;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setDefaultChannelAdministratorRights> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatAdministratorRights;

class ok;

/**
 * Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setDefaultGroupAdministratorRights final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Default administrator rights for adding the bot to basic group and supergroup chats; pass null to remove default rights.
  object_ptr<chatAdministratorRights> default_group_administrator_rights_;
  static jfieldID default_group_administrator_rights_fieldID;

  /**
   * Default constructor for a function, which sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setDefaultGroupAdministratorRights();

  /**
   * Creates a function, which sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] default_group_administrator_rights_ Default administrator rights for adding the bot to basic group and supergroup chats; pass null to remove default rights.
   */
  explicit setDefaultGroupAdministratorRights(object_ptr<chatAdministratorRights> &&default_group_administrator_rights_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1700231016;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setDefaultGroupAdministratorRights> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class messageAutoDeleteTime;

class ok;

/**
 * Changes the default message auto-delete time for new chats.
 *
 * Returns object_ptr<Ok>.
 */
class setDefaultMessageAutoDeleteTime final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New default message auto-delete time; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
  object_ptr<messageAutoDeleteTime> message_auto_delete_time_;
  static jfieldID message_auto_delete_time_fieldID;

  /**
   * Default constructor for a function, which changes the default message auto-delete time for new chats.
   *
   * Returns object_ptr<Ok>.
   */
  setDefaultMessageAutoDeleteTime();

  /**
   * Creates a function, which changes the default message auto-delete time for new chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] message_auto_delete_time_ New default message auto-delete time; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.
   */
  explicit setDefaultMessageAutoDeleteTime(object_ptr<messageAutoDeleteTime> &&message_auto_delete_time_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1772301460;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setDefaultMessageAutoDeleteTime> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class ok;

/**
 * Changes type of default reaction for the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setDefaultReactionType final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New type of the default reaction. The paid reaction can't be set as default.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;

  /**
   * Default constructor for a function, which changes type of default reaction for the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setDefaultReactionType();

  /**
   * Creates a function, which changes type of default reaction for the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] reaction_type_ New type of the default reaction. The paid reaction can't be set as default.
   */
  explicit setDefaultReactionType(object_ptr<ReactionType> &&reaction_type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1694730813;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setDefaultReactionType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the marked as unread state of the topic in a channel direct messages chat administered by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setDirectMessagesChatTopicIsMarkedAsUnread final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier of the channel direct messages chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic identifier.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;
  /// New value of is_marked_as_unread.
  bool is_marked_as_unread_;
  static jfieldID is_marked_as_unread_fieldID;

  /**
   * Default constructor for a function, which changes the marked as unread state of the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setDirectMessagesChatTopicIsMarkedAsUnread();

  /**
   * Creates a function, which changes the marked as unread state of the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier of the channel direct messages chat.
   * \param[in] topic_id_ Topic identifier.
   * \param[in] is_marked_as_unread_ New value of is_marked_as_unread.
   */
  setDirectMessagesChatTopicIsMarkedAsUnread(int53 chat_id_, int53 topic_id_, bool is_marked_as_unread_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1569655059;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setDirectMessagesChatTopicIsMarkedAsUnread> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatus;

class ok;

/**
 * Changes the emoji status of the current user; for Telegram Premium users only.
 *
 * Returns object_ptr<Ok>.
 */
class setEmojiStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New emoji status; pass null to switch to the default badge.
  object_ptr<emojiStatus> emoji_status_;
  static jfieldID emoji_status_fieldID;

  /**
   * Default constructor for a function, which changes the emoji status of the current user; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   */
  setEmojiStatus();

  /**
   * Creates a function, which changes the emoji status of the current user; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] emoji_status_ New emoji status; pass null to switch to the default badge.
   */
  explicit setEmojiStatus(object_ptr<emojiStatus> &&emoji_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1829224867;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setEmojiStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib on a file generation progress.
 *
 * Returns object_ptr<Ok>.
 */
class setFileGenerationProgress final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the generation process.
  int64 generation_id_;
  static jfieldID generation_id_fieldID;
  /// Expected size of the generated file, in bytes; 0 if unknown.
  int53 expected_size_;
  static jfieldID expected_size_fieldID;
  /// The number of bytes already generated.
  int53 local_prefix_size_;
  static jfieldID local_prefix_size_fieldID;

  /**
   * Default constructor for a function, which informs TDLib on a file generation progress.
   *
   * Returns object_ptr<Ok>.
   */
  setFileGenerationProgress();

  /**
   * Creates a function, which informs TDLib on a file generation progress.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] generation_id_ The identifier of the generation process.
   * \param[in] expected_size_ Expected size of the generated file, in bytes; 0 if unknown.
   * \param[in] local_prefix_size_ The number of bytes already generated.
   */
  setFileGenerationProgress(int64 generation_id_, int53 expected_size_, int53 local_prefix_size_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1836403518;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setFileGenerationProgress> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chatNotificationSettings;

class ok;

/**
 * Changes the notification settings of a forum topic in a forum supergroup chat or a chat with a bot with topics.
 *
 * Returns object_ptr<Ok>.
 */
class setForumTopicNotificationSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// New notification settings for the forum topic. If the topic is muted for more than 366 days, it is considered to be muted forever.
  object_ptr<chatNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Default constructor for a function, which changes the notification settings of a forum topic in a forum supergroup chat or a chat with a bot with topics.
   *
   * Returns object_ptr<Ok>.
   */
  setForumTopicNotificationSettings();

  /**
   * Creates a function, which changes the notification settings of a forum topic in a forum supergroup chat or a chat with a bot with topics.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier.
   * \param[in] notification_settings_ New notification settings for the forum topic. If the topic is muted for more than 366 days, it is considered to be muted forever.
   */
  setForumTopicNotificationSettings(int53 chat_id_, int32 forum_topic_id_, object_ptr<chatNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1989500300;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setForumTopicNotificationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class message;

/**
 * Updates the game score of the specified user in the game; for bots only.
 *
 * Returns object_ptr<Message>.
 */
class setGameScore final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The chat to which the message with the game belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass true to edit the game message to include the current scoreboard.
  bool edit_message_;
  static jfieldID edit_message_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The new score.
  int32 score_;
  static jfieldID score_fieldID;
  /// Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table.
  bool force_;
  static jfieldID force_fieldID;

  /**
   * Default constructor for a function, which updates the game score of the specified user in the game; for bots only.
   *
   * Returns object_ptr<Message>.
   */
  setGameScore();

  /**
   * Creates a function, which updates the game score of the specified user in the game; for bots only.
   *
   * Returns object_ptr<Message>.
   *
   * \param[in] chat_id_ The chat to which the message with the game belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] edit_message_ Pass true to edit the game message to include the current scoreboard.
   * \param[in] user_id_ User identifier.
   * \param[in] score_ The new score.
   * \param[in] force_ Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table.
   */
  setGameScore(int53 chat_id_, int53 message_id_, bool edit_message_, int53 user_id_, int32 score_, bool force_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2127359430;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<message>;

  static object_ptr<setGameScore> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class giftCollection;

/**
 * Changes name of a gift collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
 *
 * Returns object_ptr<GiftCollection>.
 */
class setGiftCollectionName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that owns the collection.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// Identifier of the gift collection.
  int32 collection_id_;
  static jfieldID collection_id_fieldID;
  /// New name of the collection; 1-12 characters.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which changes name of a gift collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   */
  setGiftCollectionName();

  /**
   * Creates a function, which changes name of a gift collection. If the collection is owned by a channel chat, then requires can_post_messages administrator right in the channel chat. Returns the changed collection.
   *
   * Returns object_ptr<GiftCollection>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that owns the collection.
   * \param[in] collection_id_ Identifier of the gift collection.
   * \param[in] name_ New name of the collection; 1-12 characters.
   */
  setGiftCollectionName(object_ptr<MessageSender> &&owner_id_, int32 collection_id_, string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1108355593;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<giftCollection>;

  static object_ptr<setGiftCollectionName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class GiftResalePrice;

class ok;

/**
 * Changes resale price of a unique gift owned by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setGiftResalePrice final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the unique gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// The new price for the unique gift; pass null to disallow gift resale. The current user will receive getOption(&quot;gift_resale_star_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for the gift if the gift price is in Telegram Stars or getOption(&quot;gift_resale_ton_earnings_per_mille&quot;) Toncoins for each 1000 Toncoins paid for the gift if the gift price is in Toncoins.
  object_ptr<GiftResalePrice> price_;
  static jfieldID price_fieldID;

  /**
   * Default constructor for a function, which changes resale price of a unique gift owned by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setGiftResalePrice();

  /**
   * Creates a function, which changes resale price of a unique gift owned by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] received_gift_id_ Identifier of the unique gift.
   * \param[in] price_ The new price for the unique gift; pass null to disallow gift resale. The current user will receive getOption(&quot;gift_resale_star_earnings_per_mille&quot;) Telegram Stars for each 1000 Telegram Stars paid for the gift if the gift price is in Telegram Stars or getOption(&quot;gift_resale_ton_earnings_per_mille&quot;) Toncoins for each 1000 Toncoins paid for the gift if the gift price is in Toncoins.
   */
  setGiftResalePrice(string const &received_gift_id_, object_ptr<GiftResalePrice> &&price_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 373916170;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setGiftResalePrice> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class giftSettings;

class ok;

/**
 * Changes settings for gift receiving for the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setGiftSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new settings.
  object_ptr<giftSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which changes settings for gift receiving for the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setGiftSettings();

  /**
   * Creates a function, which changes settings for gift receiving for the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] settings_ The new settings.
   */
  explicit setGiftSettings(object_ptr<giftSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -519330046;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setGiftSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the minimum number of Telegram Stars that must be paid by general participant for each sent message to a live story call. Requires groupCall.can_be_managed right.
 *
 * Returns object_ptr<Ok>.
 */
class setGroupCallPaidMessageStarCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier; must be an identifier of a live story call.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// The new minimum number of Telegram Stars; 0-getOption(&quot;paid_group_call_message_star_count_max&quot;).
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which changes the minimum number of Telegram Stars that must be paid by general participant for each sent message to a live story call. Requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   */
  setGroupCallPaidMessageStarCount();

  /**
   * Creates a function, which changes the minimum number of Telegram Stars that must be paid by general participant for each sent message to a live story call. Requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier; must be an identifier of a live story call.
   * \param[in] paid_message_star_count_ The new minimum number of Telegram Stars; 0-getOption(&quot;paid_group_call_message_star_count_max&quot;).
   */
  setGroupCallPaidMessageStarCount(int32 group_call_id_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1764341527;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setGroupCallPaidMessageStarCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

/**
 * Informs TDLib that speaking state of a participant of an active group call has changed. Returns identifier of the participant if it is found.
 *
 * Returns object_ptr<MessageSender>.
 */
class setGroupCallParticipantIsSpeaking final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Group call participant's synchronization audio source identifier, or 0 for the current user.
  int32 audio_source_;
  static jfieldID audio_source_fieldID;
  /// Pass true if the user is speaking.
  bool is_speaking_;
  static jfieldID is_speaking_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that speaking state of a participant of an active group call has changed. Returns identifier of the participant if it is found.
   *
   * Returns object_ptr<MessageSender>.
   */
  setGroupCallParticipantIsSpeaking();

  /**
   * Creates a function, which informs TDLib that speaking state of a participant of an active group call has changed. Returns identifier of the participant if it is found.
   *
   * Returns object_ptr<MessageSender>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] audio_source_ Group call participant's synchronization audio source identifier, or 0 for the current user.
   * \param[in] is_speaking_ Pass true if the user is speaking.
   */
  setGroupCallParticipantIsSpeaking(int32 group_call_id_, int32 audio_source_, bool is_speaking_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1019676164;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<MessageSender>;

  static object_ptr<setGroupCallParticipantIsSpeaking> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Changes volume level of a participant of an active group call; not supported for live stories. If the current user can manage the group call or is the owner of the group call, then the participant's volume level will be changed for all users with the default volume level.
 *
 * Returns object_ptr<Ok>.
 */
class setGroupCallParticipantVolumeLevel final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Participant identifier.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// New participant's volume level; 1-20000 in hundreds of percents.
  int32 volume_level_;
  static jfieldID volume_level_fieldID;

  /**
   * Default constructor for a function, which changes volume level of a participant of an active group call; not supported for live stories. If the current user can manage the group call or is the owner of the group call, then the participant's volume level will be changed for all users with the default volume level.
   *
   * Returns object_ptr<Ok>.
   */
  setGroupCallParticipantVolumeLevel();

  /**
   * Creates a function, which changes volume level of a participant of an active group call; not supported for live stories. If the current user can manage the group call or is the owner of the group call, then the participant's volume level will be changed for all users with the default volume level.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] participant_id_ Participant identifier.
   * \param[in] volume_level_ New participant's volume level; 1-20000 in hundreds of percents.
   */
  setGroupCallParticipantVolumeLevel(int32 group_call_id_, object_ptr<MessageSender> &&participant_id_, int32 volume_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1753769944;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setGroupCallParticipantVolumeLevel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the period of inactivity after which sessions will automatically be terminated.
 *
 * Returns object_ptr<Ok>.
 */
class setInactiveSessionTtl final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New number of days of inactivity before sessions will be automatically terminated; 1-366 days.
  int32 inactive_session_ttl_days_;
  static jfieldID inactive_session_ttl_days_fieldID;

  /**
   * Default constructor for a function, which changes the period of inactivity after which sessions will automatically be terminated.
   *
   * Returns object_ptr<Ok>.
   */
  setInactiveSessionTtl();

  /**
   * Creates a function, which changes the period of inactivity after which sessions will automatically be terminated.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inactive_session_ttl_days_ New number of days of inactivity before sessions will be automatically terminated; 1-366 days.
   */
  explicit setInactiveSessionTtl(int32 inactive_session_ttl_days_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1570548048;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setInactiveSessionTtl> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Updates the game score of the specified user in a game; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setInlineGameScore final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Inline message identifier.
  string inline_message_id_;
  static jfieldID inline_message_id_fieldID;
  /// Pass true to edit the game message to include the current scoreboard.
  bool edit_message_;
  static jfieldID edit_message_fieldID;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The new score.
  int32 score_;
  static jfieldID score_fieldID;
  /// Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table.
  bool force_;
  static jfieldID force_fieldID;

  /**
   * Default constructor for a function, which updates the game score of the specified user in a game; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setInlineGameScore();

  /**
   * Creates a function, which updates the game score of the specified user in a game; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] inline_message_id_ Inline message identifier.
   * \param[in] edit_message_ Pass true to edit the game message to include the current scoreboard.
   * \param[in] user_id_ User identifier.
   * \param[in] score_ The new score.
   * \param[in] force_ Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table.
   */
  setInlineGameScore(string const &inline_message_id_, bool edit_message_, int53 user_id_, int32 score_, bool force_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -948871797;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setInlineGameScore> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Selects a message sender to send messages in a live story call.
 *
 * Returns object_ptr<Ok>.
 */
class setLiveStoryMessageSender final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New message sender for the group call.
  object_ptr<MessageSender> message_sender_id_;
  static jfieldID message_sender_id_fieldID;

  /**
   * Default constructor for a function, which selects a message sender to send messages in a live story call.
   *
   * Returns object_ptr<Ok>.
   */
  setLiveStoryMessageSender();

  /**
   * Creates a function, which selects a message sender to send messages in a live story call.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] message_sender_id_ New message sender for the group call.
   */
  setLiveStoryMessageSender(int32 group_call_id_, object_ptr<MessageSender> &&message_sender_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1855297410;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setLiveStoryMessageSender> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class LogStream;

class ok;

/**
 * Sets new log stream for internal logging of TDLib. Can be called synchronously.
 *
 * Returns object_ptr<Ok>.
 */
class setLogStream final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New log stream.
  object_ptr<LogStream> log_stream_;
  static jfieldID log_stream_fieldID;

  /**
   * Default constructor for a function, which sets new log stream for internal logging of TDLib. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   */
  setLogStream();

  /**
   * Creates a function, which sets new log stream for internal logging of TDLib. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] log_stream_ New log stream.
   */
  explicit setLogStream(object_ptr<LogStream> &&log_stream_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1364199535;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setLogStream> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously.
 *
 * Returns object_ptr<Ok>.
 */
class setLogTagVerbosityLevel final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Logging tag to change verbosity level.
  string tag_;
  static jfieldID tag_fieldID;
  /// New verbosity level; 1-1024.
  int32 new_verbosity_level_;
  static jfieldID new_verbosity_level_fieldID;

  /**
   * Default constructor for a function, which sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   */
  setLogTagVerbosityLevel();

  /**
   * Creates a function, which sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] tag_ Logging tag to change verbosity level.
   * \param[in] new_verbosity_level_ New verbosity level; 1-1024.
   */
  setLogTagVerbosityLevel(string const &tag_, int32 new_verbosity_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2095589738;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setLogTagVerbosityLevel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the verbosity level of the internal logging of TDLib. Can be called synchronously.
 *
 * Returns object_ptr<Ok>.
 */
class setLogVerbosityLevel final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging.
  int32 new_verbosity_level_;
  static jfieldID new_verbosity_level_fieldID;

  /**
   * Default constructor for a function, which sets the verbosity level of the internal logging of TDLib. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   */
  setLogVerbosityLevel();

  /**
   * Creates a function, which sets the verbosity level of the internal logging of TDLib. Can be called synchronously.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] new_verbosity_level_ New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging.
   */
  explicit setLogVerbosityLevel(int32 new_verbosity_level_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -303429678;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setLogVerbosityLevel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emailAddressAuthenticationCodeInfo;

/**
 * Changes the login email address of the user. The email address can be changed only if the current user already has login email and passwordState.login_email_address_pattern is non-empty, or the user received suggestedActionSetLoginEmailAddress and isLoginEmailAddressRequired succeeds. The change will not be applied until the new login email address is confirmed with checkLoginEmailAddressCode. To use Apple ID/Google ID instead of an email address, call checkLoginEmailAddressCode directly.
 *
 * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
 */
class setLoginEmailAddress final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New login email address.
  string new_login_email_address_;
  static jfieldID new_login_email_address_fieldID;

  /**
   * Default constructor for a function, which changes the login email address of the user. The email address can be changed only if the current user already has login email and passwordState.login_email_address_pattern is non-empty, or the user received suggestedActionSetLoginEmailAddress and isLoginEmailAddressRequired succeeds. The change will not be applied until the new login email address is confirmed with checkLoginEmailAddressCode. To use Apple ID/Google ID instead of an email address, call checkLoginEmailAddressCode directly.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   */
  setLoginEmailAddress();

  /**
   * Creates a function, which changes the login email address of the user. The email address can be changed only if the current user already has login email and passwordState.login_email_address_pattern is non-empty, or the user received suggestedActionSetLoginEmailAddress and isLoginEmailAddressRequired succeeds. The change will not be applied until the new login email address is confirmed with checkLoginEmailAddressCode. To use Apple ID/Google ID instead of an email address, call checkLoginEmailAddressCode directly.
   *
   * Returns object_ptr<EmailAddressAuthenticationCodeInfo>.
   *
   * \param[in] new_login_email_address_ New login email address.
   */
  explicit setLoginEmailAddress(string const &new_login_email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 935019476;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<emailAddressAuthenticationCodeInfo>;

  static object_ptr<setLoginEmailAddress> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ProfileTab;

class ok;

/**
 * Changes the main profile tab of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setMainProfileTab final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new value of the main profile tab.
  object_ptr<ProfileTab> main_profile_tab_;
  static jfieldID main_profile_tab_fieldID;

  /**
   * Default constructor for a function, which changes the main profile tab of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setMainProfileTab();

  /**
   * Creates a function, which changes the main profile tab of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] main_profile_tab_ The new value of the main profile tab.
   */
  explicit setMainProfileTab(object_ptr<ProfileTab> &&main_profile_tab_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1663496423;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setMainProfileTab> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class botAccessSettings;

class ok;

/**
 * Sets access settings of a managed bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setManagedBotAccessSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the managed bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// New access settings.
  object_ptr<botAccessSettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which sets access settings of a managed bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setManagedBotAccessSettings();

  /**
   * Creates a function, which sets access settings of a managed bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the managed bot.
   * \param[in] settings_ New access settings.
   */
  setManagedBotAccessSettings(int53 bot_user_id_, object_ptr<botAccessSettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -662104110;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setManagedBotAccessSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class botMenuButton;

class ok;

/**
 * Sets menu button for the given user or for all users; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setMenuButton final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or 0 to set menu button for all users.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// New menu button.
  object_ptr<botMenuButton> menu_button_;
  static jfieldID menu_button_fieldID;

  /**
   * Default constructor for a function, which sets menu button for the given user or for all users; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setMenuButton();

  /**
   * Creates a function, which sets menu button for the given user or for all users; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user or 0 to set menu button for all users.
   * \param[in] menu_button_ New menu button.
   */
  setMenuButton(int53 user_id_, object_ptr<botMenuButton> &&menu_button_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1269841599;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setMenuButton> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class ok;

/**
 * Changes the fact-check of a message. Can be only used if messageProperties.can_set_fact_check == true.
 *
 * Returns object_ptr<Ok>.
 */
class setMessageFactCheck final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The channel chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// New text of the fact-check; 0-getOption(&quot;fact_check_length_max&quot;) characters; pass null to remove it. Only Bold, Italic, and TextUrl entities with https://t.me/ links are supported.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;

  /**
   * Default constructor for a function, which changes the fact-check of a message. Can be only used if messageProperties.can_set_fact_check == true.
   *
   * Returns object_ptr<Ok>.
   */
  setMessageFactCheck();

  /**
   * Creates a function, which changes the fact-check of a message. Can be only used if messageProperties.can_set_fact_check == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ The channel chat the message belongs to.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] text_ New text of the fact-check; 0-getOption(&quot;fact_check_length_max&quot;) characters; pass null to remove it. Only Bold, Italic, and TextUrl entities with https://t.me/ links are supported.
   */
  setMessageFactCheck(int53 chat_id_, int53 message_id_, object_ptr<formattedText> &&text_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -4309752;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setMessageFactCheck> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class ok;

/**
 * Sets reactions on a message; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setMessageReactions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Types of the reaction to set; pass an empty list to remove the reactions.
  array<object_ptr<ReactionType>> reaction_types_;
  static jfieldID reaction_types_fieldID;
  /// Pass true if the reactions are added with a big animation.
  bool is_big_;
  static jfieldID is_big_fieldID;

  /**
   * Default constructor for a function, which sets reactions on a message; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setMessageReactions();

  /**
   * Creates a function, which sets reactions on a message; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] reaction_types_ Types of the reaction to set; pass an empty list to remove the reactions.
   * \param[in] is_big_ Pass true if the reactions are added with a big animation.
   */
  setMessageReactions(int53 chat_id_, int53 message_id_, array<object_ptr<ReactionType>> &&reaction_types_, bool is_big_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -372524900;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setMessageReactions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class BlockList;

class MessageSender;

class ok;

/**
 * Changes the block list of a message sender. Currently, only users and supergroup chats can be blocked.
 *
 * Returns object_ptr<Ok>.
 */
class setMessageSenderBlockList final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of a message sender to block/unblock.
  object_ptr<MessageSender> sender_id_;
  static jfieldID sender_id_fieldID;
  /// New block list for the message sender; pass null to unblock the message sender.
  object_ptr<BlockList> block_list_;
  static jfieldID block_list_fieldID;

  /**
   * Default constructor for a function, which changes the block list of a message sender. Currently, only users and supergroup chats can be blocked.
   *
   * Returns object_ptr<Ok>.
   */
  setMessageSenderBlockList();

  /**
   * Creates a function, which changes the block list of a message sender. Currently, only users and supergroup chats can be blocked.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sender_id_ Identifier of a message sender to block/unblock.
   * \param[in] block_list_ New block list for the message sender; pass null to unblock the message sender.
   */
  setMessageSenderBlockList(object_ptr<MessageSender> &&sender_id_, object_ptr<BlockList> &&block_list_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1987355503;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setMessageSenderBlockList> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Changes the verification status of a user or a chat by an owned bot.
 *
 * Returns object_ptr<Ok>.
 */
class setMessageSenderBotVerification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the owned bot, which will verify the user or the chat.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Identifier of the user or the supergroup or channel chat, which will be verified by the bot.
  object_ptr<MessageSender> verified_id_;
  static jfieldID verified_id_fieldID;
  /// Custom description of verification reason; 0-getOption(&quot;bot_verification_custom_description_length_max&quot;). If empty, then &quot;was verified by organization &quot;organization_name&quot;&quot; will be used as description. Can be specified only if the bot is allowed to provide custom description.
  string custom_description_;
  static jfieldID custom_description_fieldID;

  /**
   * Default constructor for a function, which changes the verification status of a user or a chat by an owned bot.
   *
   * Returns object_ptr<Ok>.
   */
  setMessageSenderBotVerification();

  /**
   * Creates a function, which changes the verification status of a user or a chat by an owned bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the owned bot, which will verify the user or the chat.
   * \param[in] verified_id_ Identifier of the user or the supergroup or channel chat, which will be verified by the bot.
   * \param[in] custom_description_ Custom description of verification reason; 0-getOption(&quot;bot_verification_custom_description_length_max&quot;). If empty, then &quot;was verified by organization &quot;organization_name&quot;&quot; will be used as description. Can be specified only if the bot is allowed to provide custom description.
   */
  setMessageSenderBotVerification(int53 bot_user_id_, object_ptr<MessageSender> &&verified_id_, string const &custom_description_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1262364086;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setMessageSenderBotVerification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the first and last name of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new value of the first name for the current user; 1-64 characters.
  string first_name_;
  static jfieldID first_name_fieldID;
  /// The new value of the optional last name for the current user; 0-64 characters.
  string last_name_;
  static jfieldID last_name_fieldID;

  /**
   * Default constructor for a function, which changes the first and last name of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setName();

  /**
   * Creates a function, which changes the first and last name of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] first_name_ The new value of the first name for the current user; 1-64 characters.
   * \param[in] last_name_ The new value of the optional last name for the current user; 0-64 characters.
   */
  setName(string const &first_name_, string const &last_name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1711693584;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class NetworkType;

class ok;

/**
 * Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics.
 *
 * Returns object_ptr<Ok>.
 */
class setNetworkType final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new network type; pass null to set network type to networkTypeOther.
  object_ptr<NetworkType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics.
   *
   * Returns object_ptr<Ok>.
   */
  setNetworkType();

  /**
   * Creates a function, which sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] type_ The new network type; pass null to set network type to networkTypeOther.
   */
  explicit setNetworkType(object_ptr<NetworkType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -701635234;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setNetworkType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class newChatPrivacySettings;

class ok;

/**
 * Changes privacy settings for new chat creation; can be used only if getOption(&quot;can_set_new_chat_privacy_settings&quot;).
 *
 * Returns object_ptr<Ok>.
 */
class setNewChatPrivacySettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New settings.
  object_ptr<newChatPrivacySettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which changes privacy settings for new chat creation; can be used only if getOption(&quot;can_set_new_chat_privacy_settings&quot;).
   *
   * Returns object_ptr<Ok>.
   */
  setNewChatPrivacySettings();

  /**
   * Creates a function, which changes privacy settings for new chat creation; can be used only if getOption(&quot;can_set_new_chat_privacy_settings&quot;).
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] settings_ New settings.
   */
  explicit setNewChatPrivacySettings(object_ptr<newChatPrivacySettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1774139215;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setNewChatPrivacySettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class OptionValue;

class ok;

/**
 * Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class setOption final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The name of the option.
  string name_;
  static jfieldID name_fieldID;
  /// The new value of the option; pass null to reset option value to a default value.
  object_ptr<OptionValue> value_;
  static jfieldID value_fieldID;

  /**
   * Default constructor for a function, which sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  setOption();

  /**
   * Creates a function, which sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ The name of the option.
   * \param[in] value_ The new value of the option; pass null to reset option value to a default value.
   */
  setOption(string const &name_, object_ptr<OptionValue> &&value_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2114670322;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setOption> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PaidReactionType;

class ok;

/**
 * Changes type of paid message reaction of the current user on a message. The message must have paid reaction added by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setPaidMessageReactionType final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// New type of the paid reaction.
  object_ptr<PaidReactionType> type_;
  static jfieldID type_fieldID;

  /**
   * Default constructor for a function, which changes type of paid message reaction of the current user on a message. The message must have paid reaction added by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setPaidMessageReactionType();

  /**
   * Creates a function, which changes type of paid message reaction of the current user on a message. The message must have paid reaction added by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] type_ New type of the paid reaction.
   */
  setPaidMessageReactionType(int53 chat_id_, int53 message_id_, object_ptr<PaidReactionType> &&type_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -829934930;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPaidMessageReactionType> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputPassportElement;

class PassportElement;

/**
 * Adds an element to the user's Telegram Passport. May return an error with a message &quot;PHONE_VERIFICATION_NEEDED&quot; or &quot;EMAIL_VERIFICATION_NEEDED&quot; if the chosen phone number or the chosen email address must be verified first.
 *
 * Returns object_ptr<PassportElement>.
 */
class setPassportElement final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Input Telegram Passport element.
  object_ptr<InputPassportElement> element_;
  static jfieldID element_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which adds an element to the user's Telegram Passport. May return an error with a message &quot;PHONE_VERIFICATION_NEEDED&quot; or &quot;EMAIL_VERIFICATION_NEEDED&quot; if the chosen phone number or the chosen email address must be verified first.
   *
   * Returns object_ptr<PassportElement>.
   */
  setPassportElement();

  /**
   * Creates a function, which adds an element to the user's Telegram Passport. May return an error with a message &quot;PHONE_VERIFICATION_NEEDED&quot; or &quot;EMAIL_VERIFICATION_NEEDED&quot; if the chosen phone number or the chosen email address must be verified first.
   *
   * Returns object_ptr<PassportElement>.
   *
   * \param[in] element_ Input Telegram Passport element.
   * \param[in] password_ The 2-step verification password of the current user.
   */
  setPassportElement(object_ptr<InputPassportElement> &&element_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2068173212;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<PassportElement>;

  static object_ptr<setPassportElement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class inputPassportElementError;

class ok;

/**
 * Informs the user who some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed.
 *
 * Returns object_ptr<Ok>.
 */
class setPassportElementErrors final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The errors.
  array<object_ptr<inputPassportElementError>> errors_;
  static jfieldID errors_fieldID;

  /**
   * Default constructor for a function, which informs the user who some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed.
   *
   * Returns object_ptr<Ok>.
   */
  setPassportElementErrors();

  /**
   * Creates a function, which informs the user who some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] errors_ The errors.
   */
  setPassportElementErrors(int53 user_id_, array<object_ptr<inputPassportElementError>> &&errors_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2056754881;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPassportElementErrors> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Changes the 2-step verification password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed.
 *
 * Returns object_ptr<PasswordState>.
 */
class setPassword final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Previous 2-step verification password of the user.
  string old_password_;
  static jfieldID old_password_fieldID;
  /// New 2-step verification password of the user; may be empty to remove the password.
  string new_password_;
  static jfieldID new_password_fieldID;
  /// New password hint; may be empty.
  string new_hint_;
  static jfieldID new_hint_fieldID;
  /// Pass true to change also the recovery email address.
  bool set_recovery_email_address_;
  static jfieldID set_recovery_email_address_fieldID;
  /// New recovery email address; may be empty.
  string new_recovery_email_address_;
  static jfieldID new_recovery_email_address_fieldID;

  /**
   * Default constructor for a function, which changes the 2-step verification password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed.
   *
   * Returns object_ptr<PasswordState>.
   */
  setPassword();

  /**
   * Creates a function, which changes the 2-step verification password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed.
   *
   * Returns object_ptr<PasswordState>.
   *
   * \param[in] old_password_ Previous 2-step verification password of the user.
   * \param[in] new_password_ New 2-step verification password of the user; may be empty to remove the password.
   * \param[in] new_hint_ New password hint; may be empty.
   * \param[in] set_recovery_email_address_ Pass true to change also the recovery email address.
   * \param[in] new_recovery_email_address_ New recovery email address; may be empty.
   */
  setPassword(string const &old_password_, string const &new_password_, string const &new_hint_, bool set_recovery_email_address_, string const &new_recovery_email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1193589027;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<setPassword> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the personal chat of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setPersonalChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which changes the personal chat of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setPersonalChat();

  /**
   * Creates a function, which changes the personal chat of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats.
   */
  explicit setPersonalChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1068782668;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPersonalChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class ok;

/**
 * Changes the order of pinned chats.
 *
 * Returns object_ptr<Ok>.
 */
class setPinnedChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat list in which to change the order of pinned chats.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// The new list of pinned chats.
  array<int53> chat_ids_;
  static jfieldID chat_ids_fieldID;

  /**
   * Default constructor for a function, which changes the order of pinned chats.
   *
   * Returns object_ptr<Ok>.
   */
  setPinnedChats();

  /**
   * Creates a function, which changes the order of pinned chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_list_ Chat list in which to change the order of pinned chats.
   * \param[in] chat_ids_ The new list of pinned chats.
   */
  setPinnedChats(object_ptr<ChatList> &&chat_list_, array<int53> &&chat_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -695640000;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPinnedChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the order of pinned topics in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator right in the supergroup.
 *
 * Returns object_ptr<Ok>.
 */
class setPinnedForumTopics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The new list of identifiers of the pinned forum topics.
  array<int32> forum_topic_ids_;
  static jfieldID forum_topic_ids_fieldID;

  /**
   * Default constructor for a function, which changes the order of pinned topics in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  setPinnedForumTopics();

  /**
   * Creates a function, which changes the order of pinned topics in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_ids_ The new list of identifiers of the pinned forum topics.
   */
  setPinnedForumTopics(int53 chat_id_, array<int32> &&forum_topic_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1871668497;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPinnedForumTopics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Changes the list of pinned gifts on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat.
 *
 * Returns object_ptr<Ok>.
 */
class setPinnedGifts final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user or the channel chat that received the gifts.
  object_ptr<MessageSender> owner_id_;
  static jfieldID owner_id_fieldID;
  /// New list of pinned gifts. All gifts must be upgraded and saved on the profile page first. There can be up to getOption(&quot;pinned_gift_count_max&quot;) pinned gifts.
  array<string> received_gift_ids_;
  static jfieldID received_gift_ids_fieldID;

  /**
   * Default constructor for a function, which changes the list of pinned gifts on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   */
  setPinnedGifts();

  /**
   * Creates a function, which changes the list of pinned gifts on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] owner_id_ Identifier of the user or the channel chat that received the gifts.
   * \param[in] received_gift_ids_ New list of pinned gifts. All gifts must be upgraded and saved on the profile page first. There can be up to getOption(&quot;pinned_gift_count_max&quot;) pinned gifts.
   */
  setPinnedGifts(object_ptr<MessageSender> &&owner_id_, array<string> &&received_gift_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1613526306;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPinnedGifts> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the order of pinned Saved Messages topics.
 *
 * Returns object_ptr<Ok>.
 */
class setPinnedSavedMessagesTopics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of the new pinned Saved Messages topics.
  array<int53> saved_messages_topic_ids_;
  static jfieldID saved_messages_topic_ids_fieldID;

  /**
   * Default constructor for a function, which changes the order of pinned Saved Messages topics.
   *
   * Returns object_ptr<Ok>.
   */
  setPinnedSavedMessagesTopics();

  /**
   * Creates a function, which changes the order of pinned Saved Messages topics.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] saved_messages_topic_ids_ Identifiers of the new pinned Saved Messages topics.
   */
  explicit setPinnedSavedMessagesTopics(array<int53> &&saved_messages_topic_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -194818924;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPinnedSavedMessagesTopics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the user answer to a poll.
 *
 * Returns object_ptr<Ok>.
 */
class setPollAnswer final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers.
  array<int32> option_ids_;
  static jfieldID option_ids_fieldID;

  /**
   * Default constructor for a function, which changes the user answer to a poll.
   *
   * Returns object_ptr<Ok>.
   */
  setPollAnswer();

  /**
   * Creates a function, which changes the user answer to a poll.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the poll belongs.
   * \param[in] message_id_ Identifier of the message containing the poll.
   * \param[in] option_ids_ 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers.
   */
  setPollAnswer(int53 chat_id_, int53 message_id_, array<int32> &&option_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1399388792;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setPollAnswer> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only.
 *
 * Returns object_ptr<Ok>.
 */
class setProfileAccentColor final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the accent color to use for profile; pass -1 if none.
  int32 profile_accent_color_id_;
  static jfieldID profile_accent_color_id_fieldID;
  /// Identifier of a custom emoji to be shown on the user's profile photo background; 0 if none.
  int64 profile_background_custom_emoji_id_;
  static jfieldID profile_background_custom_emoji_id_fieldID;

  /**
   * Default constructor for a function, which changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   */
  setProfileAccentColor();

  /**
   * Creates a function, which changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] profile_accent_color_id_ Identifier of the accent color to use for profile; pass -1 if none.
   * \param[in] profile_background_custom_emoji_id_ Identifier of a custom emoji to be shown on the user's profile photo background; 0 if none.
   */
  setProfileAccentColor(int32 profile_accent_color_id_, int64 profile_background_custom_emoji_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1986281112;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setProfileAccentColor> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes position of an audio file in the profile audio files of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setProfileAudioPosition final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the file from profile audio files, which position will be changed.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Identifier of the file from profile audio files after which the file will be positioned; pass 0 to move the file to the beginning of the list.
  int32 after_file_id_;
  static jfieldID after_file_id_fieldID;

  /**
   * Default constructor for a function, which changes position of an audio file in the profile audio files of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setProfileAudioPosition();

  /**
   * Creates a function, which changes position of an audio file in the profile audio files of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the file from profile audio files, which position will be changed.
   * \param[in] after_file_id_ Identifier of the file from profile audio files after which the file will be positioned; pass 0 to move the file to the beginning of the list.
   */
  setProfileAudioPosition(int32 file_id_, int32 after_file_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1209963614;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setProfileAudioPosition> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatPhoto;

class ok;

/**
 * Changes a profile photo for the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setProfilePhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Profile photo to set.
  object_ptr<InputChatPhoto> photo_;
  static jfieldID photo_fieldID;
  /// Pass true to set the public photo, which will be visible even if the main photo is hidden by privacy settings.
  bool is_public_;
  static jfieldID is_public_fieldID;

  /**
   * Default constructor for a function, which changes a profile photo for the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setProfilePhoto();

  /**
   * Creates a function, which changes a profile photo for the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] photo_ Profile photo to set.
   * \param[in] is_public_ Pass true to set the public photo, which will be visible even if the main photo is hidden by privacy settings.
   */
  setProfilePhoto(object_ptr<InputChatPhoto> &&photo_, bool is_public_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2048260627;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setProfilePhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes name of a quick reply shortcut.
 *
 * Returns object_ptr<Ok>.
 */
class setQuickReplyShortcutName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the quick reply shortcut.
  int32 shortcut_id_;
  static jfieldID shortcut_id_fieldID;
  /// New name for the shortcut. Use checkQuickReplyShortcutName to check its validness.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which changes name of a quick reply shortcut.
   *
   * Returns object_ptr<Ok>.
   */
  setQuickReplyShortcutName();

  /**
   * Creates a function, which changes name of a quick reply shortcut.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] shortcut_id_ Unique identifier of the quick reply shortcut.
   * \param[in] name_ New name for the shortcut. Use checkQuickReplyShortcutName to check its validness.
   */
  setQuickReplyShortcutName(int32 shortcut_id_, string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 186709105;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setQuickReplyShortcutName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

class reactionNotificationSettings;

/**
 * Changes notification settings for reactions.
 *
 * Returns object_ptr<Ok>.
 */
class setReactionNotificationSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new notification settings for reactions.
  object_ptr<reactionNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Default constructor for a function, which changes notification settings for reactions.
   *
   * Returns object_ptr<Ok>.
   */
  setReactionNotificationSettings();

  /**
   * Creates a function, which changes notification settings for reactions.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] notification_settings_ The new notification settings for reactions.
   */
  explicit setReactionNotificationSettings(object_ptr<reactionNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1186124949;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setReactionNotificationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

class readDatePrivacySettings;

/**
 * Changes privacy settings for message read date.
 *
 * Returns object_ptr<Ok>.
 */
class setReadDatePrivacySettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// New settings.
  object_ptr<readDatePrivacySettings> settings_;
  static jfieldID settings_fieldID;

  /**
   * Default constructor for a function, which changes privacy settings for message read date.
   *
   * Returns object_ptr<Ok>.
   */
  setReadDatePrivacySettings();

  /**
   * Creates a function, which changes privacy settings for message read date.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] settings_ New settings.
   */
  explicit setReadDatePrivacySettings(object_ptr<readDatePrivacySettings> &&settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 493913782;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setReadDatePrivacySettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class passwordState;

/**
 * Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation.
 *
 * Returns object_ptr<PasswordState>.
 */
class setRecoveryEmailAddress final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;
  /// New recovery email address.
  string new_recovery_email_address_;
  static jfieldID new_recovery_email_address_fieldID;

  /**
   * Default constructor for a function, which changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation.
   *
   * Returns object_ptr<PasswordState>.
   */
  setRecoveryEmailAddress();

  /**
   * Creates a function, which changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation.
   *
   * Returns object_ptr<PasswordState>.
   *
   * \param[in] password_ The 2-step verification password of the current user.
   * \param[in] new_recovery_email_address_ New recovery email address.
   */
  setRecoveryEmailAddress(string const &password_, string const &new_recovery_email_address_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1981836385;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<passwordState>;

  static object_ptr<setRecoveryEmailAddress> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class ok;

/**
 * Changes label of a Saved Messages tag; for Telegram Premium users only.
 *
 * Returns object_ptr<Ok>.
 */
class setSavedMessagesTagLabel final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The tag which label will be changed.
  object_ptr<ReactionType> tag_;
  static jfieldID tag_fieldID;
  /// New label for the tag; 0-12 characters.
  string label_;
  static jfieldID label_fieldID;

  /**
   * Default constructor for a function, which changes label of a Saved Messages tag; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   */
  setSavedMessagesTagLabel();

  /**
   * Creates a function, which changes label of a Saved Messages tag; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] tag_ The tag which label will be changed.
   * \param[in] label_ New label for the tag; 0-12 characters.
   */
  setSavedMessagesTagLabel(object_ptr<ReactionType> &&tag_, string const &label_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1338323696;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setSavedMessagesTagLabel> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class NotificationSettingsScope;

class ok;

class scopeNotificationSettings;

/**
 * Changes notification settings for chats of a given type.
 *
 * Returns object_ptr<Ok>.
 */
class setScopeNotificationSettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Types of chats for which to change the notification settings.
  object_ptr<NotificationSettingsScope> scope_;
  static jfieldID scope_fieldID;
  /// The new notification settings for the given scope.
  object_ptr<scopeNotificationSettings> notification_settings_;
  static jfieldID notification_settings_fieldID;

  /**
   * Default constructor for a function, which changes notification settings for chats of a given type.
   *
   * Returns object_ptr<Ok>.
   */
  setScopeNotificationSettings();

  /**
   * Creates a function, which changes notification settings for chats of a given type.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] scope_ Types of chats for which to change the notification settings.
   * \param[in] notification_settings_ The new notification settings for the given scope.
   */
  setScopeNotificationSettings(object_ptr<NotificationSettingsScope> &&scope_, object_ptr<scopeNotificationSettings> &&notification_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2049984966;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setScopeNotificationSettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Changes the list of emojis corresponding to a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setStickerEmojis final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;
  /// New string with 1-20 emoji corresponding to the sticker.
  string emojis_;
  static jfieldID emojis_fieldID;

  /**
   * Default constructor for a function, which changes the list of emojis corresponding to a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setStickerEmojis();

  /**
   * Creates a function, which changes the list of emojis corresponding to a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker.
   * \param[in] emojis_ New string with 1-20 emoji corresponding to the sticker.
   */
  setStickerEmojis(object_ptr<InputFile> &&sticker_, string const &emojis_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -638843855;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStickerEmojis> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Changes the list of keywords of a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setStickerKeywords final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;
  /// List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker.
  array<string> keywords_;
  static jfieldID keywords_fieldID;

  /**
   * Default constructor for a function, which changes the list of keywords of a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setStickerKeywords();

  /**
   * Creates a function, which changes the list of keywords of a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker.
   * \param[in] keywords_ List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker.
   */
  setStickerKeywords(object_ptr<InputFile> &&sticker_, array<string> &&keywords_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 137223565;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStickerKeywords> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class maskPosition;

class ok;

/**
 * Changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setStickerMaskPosition final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;
  /// Position where the mask is placed; pass null to remove mask position.
  object_ptr<maskPosition> mask_position_;
  static jfieldID mask_position_fieldID;

  /**
   * Default constructor for a function, which changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setStickerMaskPosition();

  /**
   * Creates a function, which changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker.
   * \param[in] mask_position_ Position where the mask is placed; pass null to remove mask position.
   */
  setStickerMaskPosition(object_ptr<InputFile> &&sticker_, object_ptr<maskPosition> &&mask_position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1202280912;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStickerMaskPosition> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class ok;

/**
 * Changes the position of a sticker in the set to which it belongs. The sticker set must be owned by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setStickerPositionInSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;
  /// New position of the sticker in the set, 0-based.
  int32 position_;
  static jfieldID position_fieldID;

  /**
   * Default constructor for a function, which changes the position of a sticker in the set to which it belongs. The sticker set must be owned by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setStickerPositionInSet();

  /**
   * Creates a function, which changes the position of a sticker in the set to which it belongs. The sticker set must be owned by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_ Sticker.
   * \param[in] position_ New position of the sticker in the set, 0-based.
   */
  setStickerPositionInSet(object_ptr<InputFile> &&sticker_, int32 position_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2075281185;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStickerPositionInSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class StickerFormat;

class ok;

/**
 * Sets a sticker set thumbnail.
 *
 * Returns object_ptr<Ok>.
 */
class setStickerSetThumbnail final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set owner; ignored for regular users.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  static jfieldID name_fieldID;
  /// Thumbnail to set; pass null to remove the sticker set thumbnail.
  object_ptr<InputFile> thumbnail_;
  static jfieldID thumbnail_fieldID;
  /// Format of the thumbnail; pass null if thumbnail is removed.
  object_ptr<StickerFormat> format_;
  static jfieldID format_fieldID;

  /**
   * Default constructor for a function, which sets a sticker set thumbnail.
   *
   * Returns object_ptr<Ok>.
   */
  setStickerSetThumbnail();

  /**
   * Creates a function, which sets a sticker set thumbnail.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Sticker set owner; ignored for regular users.
   * \param[in] name_ Sticker set name. The sticker set must be owned by the current user.
   * \param[in] thumbnail_ Thumbnail to set; pass null to remove the sticker set thumbnail.
   * \param[in] format_ Format of the thumbnail; pass null if thumbnail is removed.
   */
  setStickerSetThumbnail(int53 user_id_, string const &name_, object_ptr<InputFile> &&thumbnail_, object_ptr<StickerFormat> &&format_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1677617458;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStickerSetThumbnail> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets a sticker set title.
 *
 * Returns object_ptr<Ok>.
 */
class setStickerSetTitle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker set name. The sticker set must be owned by the current user.
  string name_;
  static jfieldID name_fieldID;
  /// New sticker set title.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Default constructor for a function, which sets a sticker set title.
   *
   * Returns object_ptr<Ok>.
   */
  setStickerSetTitle();

  /**
   * Creates a function, which sets a sticker set title.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] name_ Sticker set name. The sticker set must be owned by the current user.
   * \param[in] title_ New sticker set title.
   */
  setStickerSetTitle(string const &name_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1693004706;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStickerSetTitle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class storyAlbum;

/**
 * Changes name of an album of stories. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
 *
 * Returns object_ptr<StoryAlbum>.
 */
class setStoryAlbumName final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that owns the stories.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the story album.
  int32 story_album_id_;
  static jfieldID story_album_id_fieldID;
  /// New name of the album; 1-12 characters.
  string name_;
  static jfieldID name_fieldID;

  /**
   * Default constructor for a function, which changes name of an album of stories. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   */
  setStoryAlbumName();

  /**
   * Creates a function, which changes name of an album of stories. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat. Returns the changed album.
   *
   * Returns object_ptr<StoryAlbum>.
   *
   * \param[in] chat_id_ Identifier of the chat that owns the stories.
   * \param[in] story_album_id_ Identifier of the story album.
   * \param[in] name_ New name of the album; 1-12 characters.
   */
  setStoryAlbumName(int53 chat_id_, int32 story_album_id_, string const &name_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1143129794;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<storyAlbum>;

  static object_ptr<setStoryAlbumName> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StoryPrivacySettings;

class ok;

/**
 * Changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_set_privacy_settings == true.
 *
 * Returns object_ptr<Ok>.
 */
class setStoryPrivacySettings final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// The new privacy settings for the story.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  static jfieldID privacy_settings_fieldID;

  /**
   * Default constructor for a function, which changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_set_privacy_settings == true.
   *
   * Returns object_ptr<Ok>.
   */
  setStoryPrivacySettings();

  /**
   * Creates a function, which changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_set_privacy_settings == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_id_ Identifier of the story.
   * \param[in] privacy_settings_ The new privacy settings for the story.
   */
  setStoryPrivacySettings(int32 story_id_, object_ptr<StoryPrivacySettings> &&privacy_settings_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -655801550;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStoryPrivacySettings> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReactionType;

class ok;

/**
 * Changes chosen reaction on a story that has already been sent; not supported for live stories.
 *
 * Returns object_ptr<Ok>.
 */
class setStoryReaction final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the poster of the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// The identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Type of the reaction to set; pass null to remove the reaction. Custom emoji reactions can be used only by Telegram Premium users. Paid reactions can't be set.
  object_ptr<ReactionType> reaction_type_;
  static jfieldID reaction_type_fieldID;
  /// Pass true if the reaction needs to be added to recent reactions.
  bool update_recent_reactions_;
  static jfieldID update_recent_reactions_fieldID;

  /**
   * Default constructor for a function, which changes chosen reaction on a story that has already been sent; not supported for live stories.
   *
   * Returns object_ptr<Ok>.
   */
  setStoryReaction();

  /**
   * Creates a function, which changes chosen reaction on a story that has already been sent; not supported for live stories.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ The identifier of the poster of the story.
   * \param[in] story_id_ The identifier of the story.
   * \param[in] reaction_type_ Type of the reaction to set; pass null to remove the reaction. Custom emoji reactions can be used only by Telegram Premium users. Paid reactions can't be set.
   * \param[in] update_recent_reactions_ Pass true if the reaction needs to be added to recent reactions.
   */
  setStoryReaction(int53 story_poster_chat_id_, int32 story_id_, object_ptr<ReactionType> &&reaction_type_, bool update_recent_reactions_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 250731529;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setStoryReaction> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color.
 *
 * Returns object_ptr<Ok>.
 */
class setSupergroupCustomEmojiStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of the custom emoji sticker set identifier for the supergroup. Use 0 to remove the custom emoji sticker set in the supergroup.
  int64 custom_emoji_sticker_set_id_;
  static jfieldID custom_emoji_sticker_set_id_fieldID;

  /**
   * Default constructor for a function, which changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color.
   *
   * Returns object_ptr<Ok>.
   */
  setSupergroupCustomEmojiStickerSet();

  /**
   * Creates a function, which changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup.
   * \param[in] custom_emoji_sticker_set_id_ New value of the custom emoji sticker set identifier for the supergroup. Use 0 to remove the custom emoji sticker set in the supergroup.
   */
  setSupergroupCustomEmojiStickerSet(int53 supergroup_id_, int64 custom_emoji_sticker_set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1328894639;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setSupergroupCustomEmojiStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ProfileTab;

class ok;

/**
 * Changes the main profile tab of the channel; requires can_change_info administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setSupergroupMainProfileTab final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The new value of the main profile tab.
  object_ptr<ProfileTab> main_profile_tab_;
  static jfieldID main_profile_tab_fieldID;

  /**
   * Default constructor for a function, which changes the main profile tab of the channel; requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setSupergroupMainProfileTab();

  /**
   * Creates a function, which changes the main profile tab of the channel; requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the channel.
   * \param[in] main_profile_tab_ The new value of the main profile tab.
   */
  setSupergroupMainProfileTab(int53 supergroup_id_, object_ptr<ProfileTab> &&main_profile_tab_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1314899548;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setSupergroupMainProfileTab> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the sticker set of a supergroup; requires can_change_info administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setSupergroupStickerSet final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set.
  int64 sticker_set_id_;
  static jfieldID sticker_set_id_fieldID;

  /**
   * Default constructor for a function, which changes the sticker set of a supergroup; requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setSupergroupStickerSet();

  /**
   * Creates a function, which changes the sticker set of a supergroup; requires can_change_info administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup.
   * \param[in] sticker_set_id_ New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set.
   */
  setSupergroupStickerSet(int53 supergroup_id_, int64 sticker_set_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2056344215;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setSupergroupStickerSet> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class setSupergroupUnrestrictBoostCount final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of the unrestrict_boost_count supergroup setting; 0-8. Use 0 to remove the setting.
  int32 unrestrict_boost_count_;
  static jfieldID unrestrict_boost_count_fieldID;

  /**
   * Default constructor for a function, which changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  setSupergroupUnrestrictBoostCount();

  /**
   * Creates a function, which changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup.
   * \param[in] unrestrict_boost_count_ New value of the unrestrict_boost_count supergroup setting; 0-8. Use 0 to remove the setting.
   */
  setSupergroupUnrestrictBoostCount(int53 supergroup_id_, int32 unrestrict_boost_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 969814179;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setSupergroupUnrestrictBoostCount> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the editable username of a supergroup or channel, requires owner privileges in the supergroup or channel.
 *
 * Returns object_ptr<Ok>.
 */
class setSupergroupUsername final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of the username. Use an empty string to remove the username. The username can't be completely removed if there is another active or disabled username.
  string username_;
  static jfieldID username_fieldID;

  /**
   * Default constructor for a function, which changes the editable username of a supergroup or channel, requires owner privileges in the supergroup or channel.
   *
   * Returns object_ptr<Ok>.
   */
  setSupergroupUsername();

  /**
   * Creates a function, which changes the editable username of a supergroup or channel, requires owner privileges in the supergroup or channel.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   * \param[in] username_ New value of the username. Use an empty string to remove the username. The username can't be completely removed if there is another active or disabled username.
   */
  setSupergroupUsername(int53 supergroup_id_, string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1346325252;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setSupergroupUsername> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
 *
 * Returns object_ptr<Ok>.
 */
class setTdlibParameters final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to use Telegram test environment instead of the production environment.
  bool use_test_dc_;
  static jfieldID use_test_dc_fieldID;
  /// The path to the directory for the persistent database; if empty, the current working directory will be used.
  string database_directory_;
  static jfieldID database_directory_fieldID;
  /// The path to the directory for storing files; if empty, database_directory will be used.
  string files_directory_;
  static jfieldID files_directory_fieldID;
  /// Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned.
  bytes database_encryption_key_;
  static jfieldID database_encryption_key_fieldID;
  /// Pass true to keep information about downloaded and uploaded files between application restarts.
  bool use_file_database_;
  static jfieldID use_file_database_fieldID;
  /// Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database.
  bool use_chat_info_database_;
  static jfieldID use_chat_info_database_fieldID;
  /// Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database.
  bool use_message_database_;
  static jfieldID use_message_database_fieldID;
  /// Pass true to enable support for secret chats.
  bool use_secret_chats_;
  static jfieldID use_secret_chats_fieldID;
  /// Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
  int32 api_id_;
  static jfieldID api_id_fieldID;
  /// Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
  string api_hash_;
  static jfieldID api_hash_fieldID;
  /// IETF language tag of the user's operating system language; must be non-empty.
  string system_language_code_;
  static jfieldID system_language_code_fieldID;
  /// Model of the device the application is being run on; must be non-empty.
  string device_model_;
  static jfieldID device_model_fieldID;
  /// Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.
  string system_version_;
  static jfieldID system_version_fieldID;
  /// Application version; must be non-empty.
  string application_version_;
  static jfieldID application_version_fieldID;

  /**
   * Default constructor for a function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
   *
   * Returns object_ptr<Ok>.
   */
  setTdlibParameters();

  /**
   * Creates a function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] use_test_dc_ Pass true to use Telegram test environment instead of the production environment.
   * \param[in] database_directory_ The path to the directory for the persistent database; if empty, the current working directory will be used.
   * \param[in] files_directory_ The path to the directory for storing files; if empty, database_directory will be used.
   * \param[in] database_encryption_key_ Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned.
   * \param[in] use_file_database_ Pass true to keep information about downloaded and uploaded files between application restarts.
   * \param[in] use_chat_info_database_ Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database.
   * \param[in] use_message_database_ Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database.
   * \param[in] use_secret_chats_ Pass true to enable support for secret chats.
   * \param[in] api_id_ Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
   * \param[in] api_hash_ Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
   * \param[in] system_language_code_ IETF language tag of the user's operating system language; must be non-empty.
   * \param[in] device_model_ Model of the device the application is being run on; must be non-empty.
   * \param[in] system_version_ Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.
   * \param[in] application_version_ Application version; must be non-empty.
   */
  setTdlibParameters(bool use_test_dc_, string const &database_directory_, string const &files_directory_, bytes const &database_encryption_key_, bool use_file_database_, bool use_chat_info_database_, bool use_message_database_, bool use_secret_chats_, int32 api_id_, string const &api_hash_, string const &system_language_code_, string const &device_model_, string const &system_version_, string const &application_version_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -775883218;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setTdlibParameters> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes color scheme for the current user based on an owned or a hosted upgraded gift; for Telegram Premium users only.
 *
 * Returns object_ptr<Ok>.
 */
class setUpgradedGiftColors final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the upgradedGiftColors scheme to use.
  int64 upgraded_gift_colors_id_;
  static jfieldID upgraded_gift_colors_id_fieldID;

  /**
   * Default constructor for a function, which changes color scheme for the current user based on an owned or a hosted upgraded gift; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   */
  setUpgradedGiftColors();

  /**
   * Creates a function, which changes color scheme for the current user based on an owned or a hosted upgraded gift; for Telegram Premium users only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] upgraded_gift_colors_id_ Identifier of the upgradedGiftColors scheme to use.
   */
  explicit setUpgradedGiftColors(int64 upgraded_gift_colors_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -966832402;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setUpgradedGiftColors> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class emojiStatus;

class ok;

/**
 * Changes the emoji status of a user; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class setUserEmojiStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// New emoji status; pass null to switch to the default badge.
  object_ptr<emojiStatus> emoji_status_;
  static jfieldID emoji_status_fieldID;

  /**
   * Default constructor for a function, which changes the emoji status of a user; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  setUserEmojiStatus();

  /**
   * Creates a function, which changes the emoji status of a user; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user.
   * \param[in] emoji_status_ New emoji status; pass null to switch to the default badge.
   */
  setUserEmojiStatus(int53 user_id_, object_ptr<emojiStatus> &&emoji_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -451519541;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setUserEmojiStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class ok;

/**
 * Changes a note of a contact user.
 *
 * Returns object_ptr<Ok>.
 */
class setUserNote final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Note to set for the user; 0-getOption(&quot;user_note_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
  object_ptr<formattedText> note_;
  static jfieldID note_fieldID;

  /**
   * Default constructor for a function, which changes a note of a contact user.
   *
   * Returns object_ptr<Ok>.
   */
  setUserNote();

  /**
   * Creates a function, which changes a note of a contact user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] note_ Note to set for the user; 0-getOption(&quot;user_note_text_length_max&quot;) characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, and DateTime entities are allowed.
   */
  setUserNote(int53 user_id_, object_ptr<formattedText> &&note_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -351487655;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setUserNote> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatPhoto;

class ok;

/**
 * Changes a personal profile photo of a contact user.
 *
 * Returns object_ptr<Ok>.
 */
class setUserPersonalProfilePhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Profile photo to set; pass null to delete the photo; inputChatPhotoPrevious isn't supported in this function.
  object_ptr<InputChatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * Default constructor for a function, which changes a personal profile photo of a contact user.
   *
   * Returns object_ptr<Ok>.
   */
  setUserPersonalProfilePhoto();

  /**
   * Creates a function, which changes a personal profile photo of a contact user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] photo_ Profile photo to set; pass null to delete the photo; inputChatPhotoPrevious isn't supported in this function.
   */
  setUserPersonalProfilePhoto(int53 user_id_, object_ptr<InputChatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 464136438;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setUserPersonalProfilePhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class UserPrivacySetting;

class ok;

class userPrivacySettingRules;

/**
 * Changes user privacy settings.
 *
 * Returns object_ptr<Ok>.
 */
class setUserPrivacySettingRules final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The privacy setting.
  object_ptr<UserPrivacySetting> setting_;
  static jfieldID setting_fieldID;
  /// The new privacy rules.
  object_ptr<userPrivacySettingRules> rules_;
  static jfieldID rules_fieldID;

  /**
   * Default constructor for a function, which changes user privacy settings.
   *
   * Returns object_ptr<Ok>.
   */
  setUserPrivacySettingRules();

  /**
   * Creates a function, which changes user privacy settings.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] setting_ The privacy setting.
   * \param[in] rules_ The new privacy rules.
   */
  setUserPrivacySettingRules(object_ptr<UserPrivacySetting> &&setting_, object_ptr<userPrivacySettingRules> &&rules_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -473812741;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setUserPrivacySettingRules> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

class userSupportInfo;

/**
 * Sets support information for the given user; for Telegram support only.
 *
 * Returns object_ptr<UserSupportInfo>.
 */
class setUserSupportInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// New information message.
  object_ptr<formattedText> message_;
  static jfieldID message_fieldID;

  /**
   * Default constructor for a function, which sets support information for the given user; for Telegram support only.
   *
   * Returns object_ptr<UserSupportInfo>.
   */
  setUserSupportInfo();

  /**
   * Creates a function, which sets support information for the given user; for Telegram support only.
   *
   * Returns object_ptr<UserSupportInfo>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] message_ New information message.
   */
  setUserSupportInfo(int53 user_id_, object_ptr<formattedText> &&message_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2088986621;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<userSupportInfo>;

  static object_ptr<setUserSupportInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the editable username of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class setUsername final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The new value of the username. Use an empty string to remove the username. The username can't be completely removed if there is another active or disabled username.
  string username_;
  static jfieldID username_fieldID;

  /**
   * Default constructor for a function, which changes the editable username of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  setUsername();

  /**
   * Creates a function, which changes the editable username of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] username_ The new value of the username. Use an empty string to remove the username. The username can't be completely removed if there is another active or disabled username.
   */
  explicit setUsername(string const &username_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 439901214;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setUsername> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Changes default participant identifier, on whose behalf a video chat in the chat will be joined.
 *
 * Returns object_ptr<Ok>.
 */
class setVideoChatDefaultParticipant final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Default group call participant identifier to join the video chats in the chat.
  object_ptr<MessageSender> default_participant_id_;
  static jfieldID default_participant_id_fieldID;

  /**
   * Default constructor for a function, which changes default participant identifier, on whose behalf a video chat in the chat will be joined.
   *
   * Returns object_ptr<Ok>.
   */
  setVideoChatDefaultParticipant();

  /**
   * Creates a function, which changes default participant identifier, on whose behalf a video chat in the chat will be joined.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] default_participant_id_ Default group call participant identifier to join the video chats in the chat.
   */
  setVideoChatDefaultParticipant(int53 chat_id_, object_ptr<MessageSender> &&default_participant_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -240749901;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setVideoChatDefaultParticipant> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sets title of a video chat; requires groupCall.can_be_managed right.
 *
 * Returns object_ptr<Ok>.
 */
class setVideoChatTitle final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New group call title; 1-64 characters.
  string title_;
  static jfieldID title_fieldID;

  /**
   * Default constructor for a function, which sets title of a video chat; requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   */
  setVideoChatTitle();

  /**
   * Creates a function, which sets title of a video chat; requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] title_ New group call title; 1-64 characters.
   */
  setVideoChatTitle(int32 group_call_id_, string const &title_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1915482994;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<setVideoChatTitle> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class KeyboardButtonSource;

class ok;

/**
 * Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot.
 *
 * Returns object_ptr<Ok>.
 */
class shareChatWithBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Source of the button.
  object_ptr<KeyboardButtonSource> source_;
  static jfieldID source_fieldID;
  /// Identifier of the button.
  int32 button_id_;
  static jfieldID button_id_fieldID;
  /// Identifier of the shared chat.
  int53 shared_chat_id_;
  static jfieldID shared_chat_id_fieldID;
  /// Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check bot_is_member and bot_administrator_rights restrictions. If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat. If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights.
  bool only_check_;
  static jfieldID only_check_fieldID;

  /**
   * Default constructor for a function, which shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot.
   *
   * Returns object_ptr<Ok>.
   */
  shareChatWithBot();

  /**
   * Creates a function, which shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] source_ Source of the button.
   * \param[in] button_id_ Identifier of the button.
   * \param[in] shared_chat_id_ Identifier of the shared chat.
   * \param[in] only_check_ Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check bot_is_member and bot_administrator_rights restrictions. If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat. If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights.
   */
  shareChatWithBot(object_ptr<KeyboardButtonSource> &&source_, int32 button_id_, int53 shared_chat_id_, bool only_check_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -917243698;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<shareChatWithBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber.
 *
 * Returns object_ptr<Ok>.
 */
class sharePhoneNumber final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the user with whom to share the phone number. The user must be a mutual contact.
  int53 user_id_;
  static jfieldID user_id_fieldID;

  /**
   * Default constructor for a function, which shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber.
   *
   * Returns object_ptr<Ok>.
   */
  sharePhoneNumber();

  /**
   * Creates a function, which shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ Identifier of the user with whom to share the phone number. The user must be a mutual contact.
   */
  explicit sharePhoneNumber(int53 user_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1097130069;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<sharePhoneNumber> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class KeyboardButtonSource;

class ok;

/**
 * Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot.
 *
 * Returns object_ptr<Ok>.
 */
class shareUsersWithBot final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Source of the button.
  object_ptr<KeyboardButtonSource> source_;
  static jfieldID source_fieldID;
  /// Identifier of the button.
  int32 button_id_;
  static jfieldID button_id_fieldID;
  /// Identifiers of the shared users.
  array<int53> shared_user_ids_;
  static jfieldID shared_user_ids_fieldID;
  /// Pass true to check that the users can be shared by the button instead of actually sharing them.
  bool only_check_;
  static jfieldID only_check_fieldID;

  /**
   * Default constructor for a function, which shares users after pressing a keyboardButtonTypeRequestUsers button with the bot.
   *
   * Returns object_ptr<Ok>.
   */
  shareUsersWithBot();

  /**
   * Creates a function, which shares users after pressing a keyboardButtonTypeRequestUsers button with the bot.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] source_ Source of the button.
   * \param[in] button_id_ Identifier of the button.
   * \param[in] shared_user_ids_ Identifiers of the shared users.
   * \param[in] only_check_ Pass true to check that the users can be shared by the button instead of actually sharing them.
   */
  shareUsersWithBot(object_ptr<KeyboardButtonSource> &&source_, int32 button_id_, array<int53> &&shared_user_ids_, bool only_check_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1154320179;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<shareUsersWithBot> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Starts recording of an active group call; for video chats only. Requires groupCall.can_be_managed right.
 *
 * Returns object_ptr<Ok>.
 */
class startGroupCallRecording final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Group call recording title; 0-64 characters.
  string title_;
  static jfieldID title_fieldID;
  /// Pass true to record a video file instead of an audio file.
  bool record_video_;
  static jfieldID record_video_fieldID;
  /// Pass true to use portrait orientation for video instead of landscape one.
  bool use_portrait_orientation_;
  static jfieldID use_portrait_orientation_fieldID;

  /**
   * Default constructor for a function, which starts recording of an active group call; for video chats only. Requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   */
  startGroupCallRecording();

  /**
   * Creates a function, which starts recording of an active group call; for video chats only. Requires groupCall.can_be_managed right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] title_ Group call recording title; 0-64 characters.
   * \param[in] record_video_ Pass true to record a video file instead of an audio file.
   * \param[in] use_portrait_orientation_ Pass true to use portrait orientation for video instead of landscape one.
   */
  startGroupCallRecording(int32 group_call_id_, string const &title_, bool record_video_, bool use_portrait_orientation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1757774971;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<startGroupCallRecording> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class text;

/**
 * Starts screen sharing in a joined group call; not supported in live stories. Returns join response payload for tgcalls.
 *
 * Returns object_ptr<Text>.
 */
class startGroupCallScreenSharing final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Screen sharing audio channel synchronization source identifier; received from tgcalls.
  int32 audio_source_id_;
  static jfieldID audio_source_id_fieldID;
  /// Group call join payload; received from tgcalls.
  string payload_;
  static jfieldID payload_fieldID;

  /**
   * Default constructor for a function, which starts screen sharing in a joined group call; not supported in live stories. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   */
  startGroupCallScreenSharing();

  /**
   * Creates a function, which starts screen sharing in a joined group call; not supported in live stories. Returns join response payload for tgcalls.
   *
   * Returns object_ptr<Text>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] audio_source_id_ Screen sharing audio channel synchronization source identifier; received from tgcalls.
   * \param[in] payload_ Group call join payload; received from tgcalls.
   */
  startGroupCallScreenSharing(int32 group_call_id_, int32 audio_source_id_, string const &payload_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -884068051;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<text>;

  static object_ptr<startGroupCallScreenSharing> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class StartLiveStoryResult;

class StoryPrivacySettings;

/**
 * Starts a new live story on behalf of a chat; requires can_post_stories administrator right for channel chats.
 *
 * Returns object_ptr<StartLiveStoryResult>.
 */
class startLiveStory final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that will start the live story. Pass Saved Messages chat identifier when starting a live story on behalf of the current user, or a channel chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The privacy settings for the story; ignored for stories posted on behalf of channel chats.
  object_ptr<StoryPrivacySettings> privacy_settings_;
  static jfieldID privacy_settings_fieldID;
  /// Pass true if the content of the story must be protected from screenshotting.
  bool protect_content_;
  static jfieldID protect_content_fieldID;
  /// Pass true to create an RTMP stream instead of an ordinary group call.
  bool is_rtmp_stream_;
  static jfieldID is_rtmp_stream_fieldID;
  /// Pass true to allow viewers of the story to send messages.
  bool enable_messages_;
  static jfieldID enable_messages_fieldID;
  /// The minimum number of Telegram Stars that must be paid by viewers for each sent message to the call; 0-getOption(&quot;paid_group_call_message_star_count_max&quot;).
  int53 paid_message_star_count_;
  static jfieldID paid_message_star_count_fieldID;

  /**
   * Default constructor for a function, which starts a new live story on behalf of a chat; requires can_post_stories administrator right for channel chats.
   *
   * Returns object_ptr<StartLiveStoryResult>.
   */
  startLiveStory();

  /**
   * Creates a function, which starts a new live story on behalf of a chat; requires can_post_stories administrator right for channel chats.
   *
   * Returns object_ptr<StartLiveStoryResult>.
   *
   * \param[in] chat_id_ Identifier of the chat that will start the live story. Pass Saved Messages chat identifier when starting a live story on behalf of the current user, or a channel chat identifier.
   * \param[in] privacy_settings_ The privacy settings for the story; ignored for stories posted on behalf of channel chats.
   * \param[in] protect_content_ Pass true if the content of the story must be protected from screenshotting.
   * \param[in] is_rtmp_stream_ Pass true to create an RTMP stream instead of an ordinary group call.
   * \param[in] enable_messages_ Pass true to allow viewers of the story to send messages.
   * \param[in] paid_message_star_count_ The minimum number of Telegram Stars that must be paid by viewers for each sent message to the call; 0-getOption(&quot;paid_group_call_message_star_count_max&quot;).
   */
  startLiveStory(int53 chat_id_, object_ptr<StoryPrivacySettings> &&privacy_settings_, bool protect_content_, bool is_rtmp_stream_, bool enable_messages_, int53 paid_message_star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1253467958;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<StartLiveStoryResult>;

  static object_ptr<startLiveStory> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Starts a scheduled video chat.
 *
 * Returns object_ptr<Ok>.
 */
class startScheduledVideoChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier of the video chat.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;

  /**
   * Default constructor for a function, which starts a scheduled video chat.
   *
   * Returns object_ptr<Ok>.
   */
  startScheduledVideoChat();

  /**
   * Creates a function, which starts a scheduled video chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier of the video chat.
   */
  explicit startScheduledVideoChat(int32 group_call_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1300829822;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<startScheduledVideoChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class businessMessage;

/**
 * Stops a poll sent on behalf of a business account; for bots only.
 *
 * Returns object_ptr<BusinessMessage>.
 */
class stopBusinessPoll final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which the message with the poll was sent.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// The chat the message belongs to.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Default constructor for a function, which stops a poll sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   */
  stopBusinessPoll();

  /**
   * Creates a function, which stops a poll sent on behalf of a business account; for bots only.
   *
   * Returns object_ptr<BusinessMessage>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which the message with the poll was sent.
   * \param[in] chat_id_ The chat the message belongs to.
   * \param[in] message_id_ Identifier of the message containing the poll.
   * \param[in] reply_markup_ The new message reply markup; pass null if none.
   */
  stopBusinessPoll(string const &business_connection_id_, int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1142218400;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<businessMessage>;

  static object_ptr<stopBusinessPoll> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ReplyMarkup;

class ok;

/**
 * Stops a poll.
 *
 * Returns object_ptr<Ok>.
 */
class stopPoll final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the poll belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message containing the poll. Use messageProperties.can_be_edited to check whether the poll can be stopped.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// The new message reply markup; pass null if none; for bots only.
  object_ptr<ReplyMarkup> reply_markup_;
  static jfieldID reply_markup_fieldID;

  /**
   * Default constructor for a function, which stops a poll.
   *
   * Returns object_ptr<Ok>.
   */
  stopPoll();

  /**
   * Creates a function, which stops a poll.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the poll belongs.
   * \param[in] message_id_ Identifier of the message containing the poll. Use messageProperties.can_be_edited to check whether the poll can be stopped.
   * \param[in] reply_markup_ The new message reply markup; pass null if none; for bots only.
   */
  stopPoll(int53 chat_id_, int53 message_id_, object_ptr<ReplyMarkup> &&reply_markup_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1659374253;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<stopPoll> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class birthdate;

class ok;

/**
 * Suggests a birthdate to another regular user with common messages and allowing non-paid messages.
 *
 * Returns object_ptr<Ok>.
 */
class suggestUserBirthdate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Birthdate to suggest.
  object_ptr<birthdate> birthdate_;
  static jfieldID birthdate_fieldID;

  /**
   * Default constructor for a function, which suggests a birthdate to another regular user with common messages and allowing non-paid messages.
   *
   * Returns object_ptr<Ok>.
   */
  suggestUserBirthdate();

  /**
   * Creates a function, which suggests a birthdate to another regular user with common messages and allowing non-paid messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] birthdate_ Birthdate to suggest.
   */
  suggestUserBirthdate(int53 user_id_, object_ptr<birthdate> &&birthdate_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 39506613;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<suggestUserBirthdate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputChatPhoto;

class ok;

/**
 * Suggests a profile photo to another regular user with common messages and allowing non-paid messages.
 *
 * Returns object_ptr<Ok>.
 */
class suggestUserProfilePhoto final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Profile photo to suggest; inputChatPhotoPrevious isn't supported in this function.
  object_ptr<InputChatPhoto> photo_;
  static jfieldID photo_fieldID;

  /**
   * Default constructor for a function, which suggests a profile photo to another regular user with common messages and allowing non-paid messages.
   *
   * Returns object_ptr<Ok>.
   */
  suggestUserProfilePhoto();

  /**
   * Creates a function, which suggests a profile photo to another regular user with common messages and allowing non-paid messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] user_id_ User identifier.
   * \param[in] photo_ Profile photo to suggest; inputChatPhotoPrevious isn't supported in this function.
   */
  suggestUserProfilePhoto(int53 user_id_, object_ptr<InputChatPhoto> &&photo_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1788742557;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<suggestUserProfilePhoto> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Summarizes content of the message with non-empty summary_language_code.
 *
 * Returns object_ptr<FormattedText>.
 */
class summarizeMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Pass a language code to which the summary will be translated; pass an empty string if translation isn't needed. See translateText.to_language_code for the list of supported values.
  string translate_to_language_code_;
  static jfieldID translate_to_language_code_fieldID;
  /// Tone of the summarization; see translateText.tone for the list of supported values.
  string tone_;
  static jfieldID tone_fieldID;

  /**
   * Default constructor for a function, which summarizes content of the message with non-empty summary_language_code.
   *
   * Returns object_ptr<FormattedText>.
   */
  summarizeMessage();

  /**
   * Creates a function, which summarizes content of the message with non-empty summary_language_code.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] translate_to_language_code_ Pass a language code to which the summary will be translated; pass an empty string if translation isn't needed. See translateText.to_language_code for the list of supported values.
   * \param[in] tone_ Tone of the summarization; see translateText.tone for the list of supported values.
   */
  summarizeMessage(int53 chat_id_, int53 message_id_, string const &translate_to_language_code_, string const &tone_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1464885562;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<summarizeMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class synchronizeLanguagePack final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Language pack identifier.
  string language_pack_id_;
  static jfieldID language_pack_id_fieldID;

  /**
   * Default constructor for a function, which fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  synchronizeLanguagePack();

  /**
   * Creates a function, which fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] language_pack_id_ Language pack identifier.
   */
  explicit synchronizeLanguagePack(string const &language_pack_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2065307858;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<synchronizeLanguagePack> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Terminates all other sessions of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class terminateAllOtherSessions final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which terminates all other sessions of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  terminateAllOtherSessions();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1874485523;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<terminateAllOtherSessions> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Terminates a session of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class terminateSession final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Session identifier.
  int64 session_id_;
  static jfieldID session_id_fieldID;

  /**
   * Default constructor for a function, which terminates a session of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  terminateSession();

  /**
   * Creates a function, which terminates a session of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] session_id_ Session identifier.
   */
  explicit terminateSession(int64 session_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -407385812;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<terminateSession> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testBytes;

/**
 * Returns the received bytes; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestBytes>.
 */
class testCallBytes final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Bytes to return.
  bytes x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the received bytes; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestBytes>.
   */
  testCallBytes();

  /**
   * Creates a function, which returns the received bytes; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestBytes>.
   *
   * \param[in] x_ Bytes to return.
   */
  explicit testCallBytes(bytes const &x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -736011607;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testBytes>;

  static object_ptr<testCallBytes> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Does nothing; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class testCallEmpty final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which does nothing; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  testCallEmpty();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -627291626;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<testCallEmpty> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testString;

/**
 * Returns the received string; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestString>.
 */
class testCallString final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// String to return.
  string x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the received string; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestString>.
   */
  testCallString();

  /**
   * Creates a function, which returns the received string; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestString>.
   *
   * \param[in] x_ String to return.
   */
  explicit testCallString(string const &x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1732818385;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testString>;

  static object_ptr<testCallString> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testVectorInt;

/**
 * Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestVectorInt>.
 */
class testCallVectorInt final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of numbers to return.
  array<int32> x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorInt>.
   */
  testCallVectorInt();

  /**
   * Creates a function, which returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorInt>.
   *
   * \param[in] x_ Vector of numbers to return.
   */
  explicit testCallVectorInt(array<int32> &&x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2137277793;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testVectorInt>;

  static object_ptr<testCallVectorInt> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testInt;

class testVectorIntObject;

/**
 * Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestVectorIntObject>.
 */
class testCallVectorIntObject final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of objects to return.
  array<object_ptr<testInt>> x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorIntObject>.
   */
  testCallVectorIntObject();

  /**
   * Creates a function, which returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorIntObject>.
   *
   * \param[in] x_ Vector of objects to return.
   */
  explicit testCallVectorIntObject(array<object_ptr<testInt>> &&x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1825428218;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testVectorIntObject>;

  static object_ptr<testCallVectorIntObject> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testVectorString;

/**
 * Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestVectorString>.
 */
class testCallVectorString final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of strings to return.
  array<string> x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorString>.
   */
  testCallVectorString();

  /**
   * Creates a function, which returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorString>.
   *
   * \param[in] x_ Vector of strings to return.
   */
  explicit testCallVectorString(array<string> &&x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -408600900;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testVectorString>;

  static object_ptr<testCallVectorString> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testString;

class testVectorStringObject;

/**
 * Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestVectorStringObject>.
 */
class testCallVectorStringObject final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Vector of objects to return.
  array<object_ptr<testString>> x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorStringObject>.
   */
  testCallVectorStringObject();

  /**
   * Creates a function, which returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestVectorStringObject>.
   *
   * \param[in] x_ Vector of objects to return.
   */
  explicit testCallVectorStringObject(array<object_ptr<testString>> &&x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1527666429;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testVectorStringObject>;

  static object_ptr<testCallVectorStringObject> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Forces an updates.getDifference call to the Telegram servers; for testing only.
 *
 * Returns object_ptr<Ok>.
 */
class testGetDifference final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which forces an updates.getDifference call to the Telegram servers; for testing only.
   *
   * Returns object_ptr<Ok>.
   */
  testGetDifference();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1747084069;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<testGetDifference> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class testNetwork final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which sends a simple network request to the Telegram servers; for testing only. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  testNetwork();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1343998901;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<testNetwork> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

class proxy;

/**
 * Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization.
 *
 * Returns object_ptr<Ok>.
 */
class testProxy final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The proxy to test.
  object_ptr<proxy> proxy_;
  static jfieldID proxy_fieldID;
  /// Identifier of a datacenter with which to test connection.
  int32 dc_id_;
  static jfieldID dc_id_fieldID;
  /// The maximum overall timeout for the request.
  double timeout_;
  static jfieldID timeout_fieldID;

  /**
   * Default constructor for a function, which sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   */
  testProxy();

  /**
   * Creates a function, which sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] proxy_ The proxy to test.
   * \param[in] dc_id_ Identifier of a datacenter with which to test connection.
   * \param[in] timeout_ The maximum overall timeout for the request.
   */
  testProxy(object_ptr<proxy> &&proxy_, int32 dc_id_, double timeout_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2057109116;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<testProxy> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class error;

/**
 * Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously.
 *
 * Returns object_ptr<Error>.
 */
class testReturnError final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The error to be returned.
  object_ptr<error> error_;
  static jfieldID error_fieldID;

  /**
   * Default constructor for a function, which returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously.
   *
   * Returns object_ptr<Error>.
   */
  testReturnError();

  /**
   * Creates a function, which returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously.
   *
   * Returns object_ptr<Error>.
   *
   * \param[in] error_ The error to be returned.
   */
  explicit testReturnError(object_ptr<error> &&error_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 455179506;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<error>;

  static object_ptr<testReturnError> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class testInt;

/**
 * Returns the squared received number; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<TestInt>.
 */
class testSquareInt final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Number to square.
  int32 x_;
  static jfieldID x_fieldID;

  /**
   * Default constructor for a function, which returns the squared received number; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestInt>.
   */
  testSquareInt();

  /**
   * Creates a function, which returns the squared received number; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<TestInt>.
   *
   * \param[in] x_ Number to square.
   */
  explicit testSquareInt(int32 x_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -60135024;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<testInt>;

  static object_ptr<testSquareInt> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class Update;

/**
 * Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization.
 *
 * Returns object_ptr<Update>.
 */
class testUseUpdate final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;

  /**
   * Default constructor for a function, which does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization.
   *
   * Returns object_ptr<Update>.
   */
  testUseUpdate();

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 717094686;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<Update>;

  static object_ptr<testUseUpdate> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes pause state of all files in the file download list.
 *
 * Returns object_ptr<Ok>.
 */
class toggleAllDownloadsArePaused final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to pause all downloads; pass false to unpause them.
  bool are_paused_;
  static jfieldID are_paused_fieldID;

  /**
   * Default constructor for a function, which changes pause state of all files in the file download list.
   *
   * Returns object_ptr<Ok>.
   */
  toggleAllDownloadsArePaused();

  /**
   * Creates a function, which changes pause state of all files in the file download list.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] are_paused_ Pass true to pause all downloads; pass false to unpause them.
   */
  explicit toggleAllDownloadsArePaused(bool are_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1251512322;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleAllDownloadsArePaused> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether the bot can manage emoji status of the current user.
 *
 * Returns object_ptr<Ok>.
 */
class toggleBotCanManageEmojiStatus final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// User identifier of the bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Pass true if the bot is allowed to change emoji status of the user; pass false otherwise.
  bool can_manage_emoji_status_;
  static jfieldID can_manage_emoji_status_fieldID;

  /**
   * Default constructor for a function, which toggles whether the bot can manage emoji status of the current user.
   *
   * Returns object_ptr<Ok>.
   */
  toggleBotCanManageEmojiStatus();

  /**
   * Creates a function, which toggles whether the bot can manage emoji status of the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ User identifier of the bot.
   * \param[in] can_manage_emoji_status_ Pass true if the bot is allowed to change emoji status of the user; pass false otherwise.
   */
  toggleBotCanManageEmojiStatus(int53 bot_user_id_, bool can_manage_emoji_status_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 622495770;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleBotCanManageEmojiStatus> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Adds or removes a bot to attachment and side menu. Bot can be added to the menu, only if userTypeBot.can_be_added_to_attachment_menu == true.
 *
 * Returns object_ptr<Ok>.
 */
class toggleBotIsAddedToAttachmentMenu final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Bot's user identifier.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu.
  bool is_added_;
  static jfieldID is_added_fieldID;
  /// Pass true if the current user allowed the bot to send them messages. Ignored if is_added is false.
  bool allow_write_access_;
  static jfieldID allow_write_access_fieldID;

  /**
   * Default constructor for a function, which adds or removes a bot to attachment and side menu. Bot can be added to the menu, only if userTypeBot.can_be_added_to_attachment_menu == true.
   *
   * Returns object_ptr<Ok>.
   */
  toggleBotIsAddedToAttachmentMenu();

  /**
   * Creates a function, which adds or removes a bot to attachment and side menu. Bot can be added to the menu, only if userTypeBot.can_be_added_to_attachment_menu == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Bot's user identifier.
   * \param[in] is_added_ Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu.
   * \param[in] allow_write_access_ Pass true if the current user allowed the bot to send them messages. Ignored if is_added is false.
   */
  toggleBotIsAddedToAttachmentMenu(int53 bot_user_id_, bool is_added_, bool allow_write_access_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1906712934;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleBotIsAddedToAttachmentMenu> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes active state for a username of a bot. The editable username can be disabled only if there are other active usernames. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached. Can be called only if userTypeBot.can_be_edited == true.
 *
 * Returns object_ptr<Ok>.
 */
class toggleBotUsernameIsActive final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the target bot.
  int53 bot_user_id_;
  static jfieldID bot_user_id_fieldID;
  /// The username to change.
  string username_;
  static jfieldID username_fieldID;
  /// Pass true to activate the username; pass false to disable it.
  bool is_active_;
  static jfieldID is_active_fieldID;

  /**
   * Default constructor for a function, which changes active state for a username of a bot. The editable username can be disabled only if there are other active usernames. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   */
  toggleBotUsernameIsActive();

  /**
   * Creates a function, which changes active state for a username of a bot. The editable username can be disabled only if there are other active usernames. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached. Can be called only if userTypeBot.can_be_edited == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] bot_user_id_ Identifier of the target bot.
   * \param[in] username_ The username to change.
   * \param[in] is_active_ Pass true to activate the username; pass false to disable it.
   */
  toggleBotUsernameIsActive(int53 bot_user_id_, string const &username_, bool is_active_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2036569097;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleBotUsernameIsActive> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Pauses or resumes the connected business bot in a specific chat.
 *
 * Returns object_ptr<Ok>.
 */
class toggleBusinessConnectedBotChatIsPaused final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to pause the connected bot in the chat; pass false to resume the bot.
  bool is_paused_;
  static jfieldID is_paused_fieldID;

  /**
   * Default constructor for a function, which pauses or resumes the connected business bot in a specific chat.
   *
   * Returns object_ptr<Ok>.
   */
  toggleBusinessConnectedBotChatIsPaused();

  /**
   * Creates a function, which pauses or resumes the connected business bot in a specific chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_paused_ Pass true to pause the connected bot in the chat; pass false to resume the bot.
   */
  toggleBusinessConnectedBotChatIsPaused(int53 chat_id_, bool is_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1328957509;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleBusinessConnectedBotChatIsPaused> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the value of the default disable_notification parameter, used when a message is sent to a chat.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatDefaultDisableNotification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of default_disable_notification.
  bool default_disable_notification_;
  static jfieldID default_disable_notification_fieldID;

  /**
   * Default constructor for a function, which changes the value of the default disable_notification parameter, used when a message is sent to a chat.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatDefaultDisableNotification();

  /**
   * Creates a function, which changes the value of the default disable_notification parameter, used when a message is sent to a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] default_disable_notification_ New value of default_disable_notification.
   */
  toggleChatDefaultDisableNotification(int53 chat_id_, bool default_disable_notification_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 314794002;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatDefaultDisableNotification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether chat folder tags are enabled.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatFolderTags final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to enable folder tags; pass false to disable them.
  bool are_tags_enabled_;
  static jfieldID are_tags_enabled_fieldID;

  /**
   * Default constructor for a function, which toggles whether chat folder tags are enabled.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatFolderTags();

  /**
   * Creates a function, which toggles whether chat folder tags are enabled.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] are_tags_enabled_ Pass true to enable folder tags; pass false to disable them.
   */
  explicit toggleChatFolderTags(bool are_tags_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2092209084;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatFolderTags> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether notifications for new gifts received by a channel chat are sent to the current user; requires can_post_messages administrator right in the chat.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatGiftNotifications final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to enable notifications about new gifts owned by the channel chat; pass false to disable the notifications.
  bool are_enabled_;
  static jfieldID are_enabled_fieldID;

  /**
   * Default constructor for a function, which toggles whether notifications for new gifts received by a channel chat are sent to the current user; requires can_post_messages administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatGiftNotifications();

  /**
   * Creates a function, which toggles whether notifications for new gifts received by a channel chat are sent to the current user; requires can_post_messages administrator right in the chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the channel chat.
   * \param[in] are_enabled_ Pass true to enable notifications about new gifts owned by the channel chat; pass false to disable the notifications.
   */
  toggleChatGiftNotifications(int53 chat_id_, bool are_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2069429154;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatGiftNotifications> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the ability of users to save, forward, or copy chat content. Requires owner privileges in basic groups, supergroups and channels. Requires Telegram Premium to enable protected content in private chats. Not available in Saved Messages and private chats with bots or support accounts.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatHasProtectedContent final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of has_protected_content.
  bool has_protected_content_;
  static jfieldID has_protected_content_fieldID;

  /**
   * Default constructor for a function, which changes the ability of users to save, forward, or copy chat content. Requires owner privileges in basic groups, supergroups and channels. Requires Telegram Premium to enable protected content in private chats. Not available in Saved Messages and private chats with bots or support accounts.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatHasProtectedContent();

  /**
   * Creates a function, which changes the ability of users to save, forward, or copy chat content. Requires owner privileges in basic groups, supergroups and channels. Requires Telegram Premium to enable protected content in private chats. Not available in Saved Messages and private chats with bots or support accounts.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] has_protected_content_ New value of has_protected_content.
   */
  toggleChatHasProtectedContent(int53 chat_id_, bool has_protected_content_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 975231309;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatHasProtectedContent> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the marked as unread state of a chat.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatIsMarkedAsUnread final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of is_marked_as_unread.
  bool is_marked_as_unread_;
  static jfieldID is_marked_as_unread_fieldID;

  /**
   * Default constructor for a function, which changes the marked as unread state of a chat.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatIsMarkedAsUnread();

  /**
   * Creates a function, which changes the marked as unread state of a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_marked_as_unread_ New value of is_marked_as_unread.
   */
  toggleChatIsMarkedAsUnread(int53 chat_id_, bool is_marked_as_unread_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -986129697;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatIsMarkedAsUnread> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ChatList;

class ok;

/**
 * Changes the pinned state of a chat. There can be up to getOption(&quot;pinned_chat_count_max&quot;)/getOption(&quot;pinned_archived_chat_count_max&quot;) pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatIsPinned final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat list in which to change the pinned state of the chat.
  object_ptr<ChatList> chat_list_;
  static jfieldID chat_list_fieldID;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to pin the chat; pass false to unpin it.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * Default constructor for a function, which changes the pinned state of a chat. There can be up to getOption(&quot;pinned_chat_count_max&quot;)/getOption(&quot;pinned_archived_chat_count_max&quot;) pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatIsPinned();

  /**
   * Creates a function, which changes the pinned state of a chat. There can be up to getOption(&quot;pinned_chat_count_max&quot;)/getOption(&quot;pinned_archived_chat_count_max&quot;) pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_list_ Chat list in which to change the pinned state of the chat.
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_pinned_ Pass true to pin the chat; pass false to unpin it.
   */
  toggleChatIsPinned(object_ptr<ChatList> &&chat_list_, int53 chat_id_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1485429186;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatIsPinned> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the translatable state of a chat.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatIsTranslatable final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of is_translatable.
  bool is_translatable_;
  static jfieldID is_translatable_fieldID;

  /**
   * Default constructor for a function, which changes the translatable state of a chat.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatIsTranslatable();

  /**
   * Creates a function, which changes the translatable state of a chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] is_translatable_ New value of is_translatable.
   */
  toggleChatIsTranslatable(int53 chat_id_, bool is_translatable_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1812345889;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatIsTranslatable> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the view_as_topics setting of a forum chat or Saved Messages.
 *
 * Returns object_ptr<Ok>.
 */
class toggleChatViewAsTopics final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// New value of view_as_topics.
  bool view_as_topics_;
  static jfieldID view_as_topics_fieldID;

  /**
   * Default constructor for a function, which changes the view_as_topics setting of a forum chat or Saved Messages.
   *
   * Returns object_ptr<Ok>.
   */
  toggleChatViewAsTopics();

  /**
   * Creates a function, which changes the view_as_topics setting of a forum chat or Saved Messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] view_as_topics_ New value of view_as_topics.
   */
  toggleChatViewAsTopics(int53 chat_id_, bool view_as_topics_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 724009948;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleChatViewAsTopics> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Allows to send unpaid messages to the given topic of the channel direct messages chat administered by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class toggleDirectMessagesChatTopicCanSendUnpaidMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the topic.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;
  /// Pass true to allow unpaid messages; pass false to disallow unpaid messages.
  bool can_send_unpaid_messages_;
  static jfieldID can_send_unpaid_messages_fieldID;
  /// Pass true to refund the user previously paid messages.
  bool refund_payments_;
  static jfieldID refund_payments_fieldID;

  /**
   * Default constructor for a function, which allows to send unpaid messages to the given topic of the channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  toggleDirectMessagesChatTopicCanSendUnpaidMessages();

  /**
   * Creates a function, which allows to send unpaid messages to the given topic of the channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] topic_id_ Identifier of the topic.
   * \param[in] can_send_unpaid_messages_ Pass true to allow unpaid messages; pass false to disallow unpaid messages.
   * \param[in] refund_payments_ Pass true to refund the user previously paid messages.
   */
  toggleDirectMessagesChatTopicCanSendUnpaidMessages(int53 chat_id_, int53 topic_id_, bool can_send_unpaid_messages_, bool refund_payments_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -335898703;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleDirectMessagesChatTopicCanSendUnpaidMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes pause state of a file in the file download list.
 *
 * Returns object_ptr<Ok>.
 */
class toggleDownloadIsPaused final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the downloaded file.
  int32 file_id_;
  static jfieldID file_id_fieldID;
  /// Pass true if the download is paused.
  bool is_paused_;
  static jfieldID is_paused_fieldID;

  /**
   * Default constructor for a function, which changes pause state of a file in the file download list.
   *
   * Returns object_ptr<Ok>.
   */
  toggleDownloadIsPaused();

  /**
   * Creates a function, which changes pause state of a file in the file download list.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] file_id_ Identifier of the downloaded file.
   * \param[in] is_paused_ Pass true if the download is paused.
   */
  toggleDownloadIsPaused(int32 file_id_, bool is_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -947493099;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleDownloadIsPaused> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic.
 *
 * Returns object_ptr<Ok>.
 */
class toggleForumTopicIsClosed final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// Pass true to close the topic; pass false to reopen it.
  bool is_closed_;
  static jfieldID is_closed_fieldID;

  /**
   * Default constructor for a function, which toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic.
   *
   * Returns object_ptr<Ok>.
   */
  toggleForumTopicIsClosed();

  /**
   * Creates a function, which toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] forum_topic_id_ Forum topic identifier.
   * \param[in] is_closed_ Pass true to close the topic; pass false to reopen it.
   */
  toggleForumTopicIsClosed(int53 chat_id_, int32 forum_topic_id_, bool is_closed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 982153376;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleForumTopicIsClosed> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the pinned state of a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator right in the supergroup. There can be up to getOption(&quot;pinned_forum_topic_count_max&quot;) pinned forum topics.
 *
 * Returns object_ptr<Ok>.
 */
class toggleForumTopicIsPinned final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;
  /// Pass true to pin the topic; pass false to unpin it.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * Default constructor for a function, which changes the pinned state of a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator right in the supergroup. There can be up to getOption(&quot;pinned_forum_topic_count_max&quot;) pinned forum topics.
   *
   * Returns object_ptr<Ok>.
   */
  toggleForumTopicIsPinned();

  /**
   * Creates a function, which changes the pinned state of a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator right in the supergroup. There can be up to getOption(&quot;pinned_forum_topic_count_max&quot;) pinned forum topics.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] forum_topic_id_ Forum topic identifier.
   * \param[in] is_pinned_ Pass true to pin the topic; pass false to unpin it.
   */
  toggleForumTopicIsPinned(int53 chat_id_, int32 forum_topic_id_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1474651795;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleForumTopicIsPinned> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGeneralForumTopicIsHidden final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Pass true to hide and close the General topic; pass false to unhide it.
  bool is_hidden_;
  static jfieldID is_hidden_fieldID;

  /**
   * Default constructor for a function, which toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGeneralForumTopicIsHidden();

  /**
   * Creates a function, which toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] is_hidden_ Pass true to hide and close the General topic; pass false to unhide it.
   */
  toggleGeneralForumTopicIsHidden(int53 chat_id_, bool is_hidden_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1595741256;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGeneralForumTopicIsHidden> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether a gift is shown on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGiftIsSaved final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// Pass true to display the gift on the user's or the channel's profile page; pass false to remove it from the profile page.
  bool is_saved_;
  static jfieldID is_saved_fieldID;

  /**
   * Default constructor for a function, which toggles whether a gift is shown on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGiftIsSaved();

  /**
   * Creates a function, which toggles whether a gift is shown on the current user's or the channel's profile page; requires can_post_messages administrator right in the channel chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] received_gift_id_ Identifier of the gift.
   * \param[in] is_saved_ Pass true to display the gift on the user's or the channel's profile page; pass false to remove it from the profile page.
   */
  toggleGiftIsSaved(string const &received_gift_id_, bool is_saved_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 693198065;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGiftIsSaved> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether participants of a group call can send messages there. Requires groupCall.can_toggle_are_messages_allowed right.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallAreMessagesAllowed final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New value of the are_messages_allowed setting.
  bool are_messages_allowed_;
  static jfieldID are_messages_allowed_fieldID;

  /**
   * Default constructor for a function, which toggles whether participants of a group call can send messages there. Requires groupCall.can_toggle_are_messages_allowed right.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallAreMessagesAllowed();

  /**
   * Creates a function, which toggles whether participants of a group call can send messages there. Requires groupCall.can_toggle_are_messages_allowed right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] are_messages_allowed_ New value of the are_messages_allowed setting.
   */
  toggleGroupCallAreMessagesAllowed(int32 group_call_id_, bool are_messages_allowed_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1535668758;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGroupCallAreMessagesAllowed> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether current user's video is enabled.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallIsMyVideoEnabled final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Pass true if the current user's video is enabled.
  bool is_my_video_enabled_;
  static jfieldID is_my_video_enabled_fieldID;

  /**
   * Default constructor for a function, which toggles whether current user's video is enabled.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallIsMyVideoEnabled();

  /**
   * Creates a function, which toggles whether current user's video is enabled.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] is_my_video_enabled_ Pass true if the current user's video is enabled.
   */
  toggleGroupCallIsMyVideoEnabled(int32 group_call_id_, bool is_my_video_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1624289030;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGroupCallIsMyVideoEnabled> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether current user's video is paused.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallIsMyVideoPaused final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Pass true if the current user's video is paused.
  bool is_my_video_paused_;
  static jfieldID is_my_video_paused_fieldID;

  /**
   * Default constructor for a function, which toggles whether current user's video is paused.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallIsMyVideoPaused();

  /**
   * Creates a function, which toggles whether current user's video is paused.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] is_my_video_paused_ Pass true if the current user's video is paused.
   */
  toggleGroupCallIsMyVideoPaused(int32 group_call_id_, bool is_my_video_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -478875239;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGroupCallIsMyVideoPaused> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Toggles whether a group call participant hand is rased; for video chats only.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallParticipantIsHandRaised final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Participant identifier.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed right to lower other's hand.
  bool is_hand_raised_;
  static jfieldID is_hand_raised_fieldID;

  /**
   * Default constructor for a function, which toggles whether a group call participant hand is rased; for video chats only.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallParticipantIsHandRaised();

  /**
   * Creates a function, which toggles whether a group call participant hand is rased; for video chats only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] participant_id_ Participant identifier.
   * \param[in] is_hand_raised_ Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed right to lower other's hand.
   */
  toggleGroupCallParticipantIsHandRaised(int32 group_call_id_, object_ptr<MessageSender> &&participant_id_, bool is_hand_raised_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1896127519;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGroupCallParticipantIsHandRaised> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves; not supported for live stories.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallParticipantIsMuted final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Participant identifier.
  object_ptr<MessageSender> participant_id_;
  static jfieldID participant_id_fieldID;
  /// Pass true to mute the user; pass false to unmute them.
  bool is_muted_;
  static jfieldID is_muted_fieldID;

  /**
   * Default constructor for a function, which toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves; not supported for live stories.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallParticipantIsMuted();

  /**
   * Creates a function, which toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves; not supported for live stories.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] participant_id_ Participant identifier.
   * \param[in] is_muted_ Pass true to mute the user; pass false to unmute them.
   */
  toggleGroupCallParticipantIsMuted(int32 group_call_id_, object_ptr<MessageSender> &&participant_id_, bool is_muted_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1308093433;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGroupCallParticipantIsMuted> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Pauses or unpauses screen sharing in a joined group call; not supported in live stories.
 *
 * Returns object_ptr<Ok>.
 */
class toggleGroupCallScreenSharingIsPaused final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// Pass true to pause screen sharing; pass false to unpause it.
  bool is_paused_;
  static jfieldID is_paused_fieldID;

  /**
   * Default constructor for a function, which pauses or unpauses screen sharing in a joined group call; not supported in live stories.
   *
   * Returns object_ptr<Ok>.
   */
  toggleGroupCallScreenSharingIsPaused();

  /**
   * Creates a function, which pauses or unpauses screen sharing in a joined group call; not supported in live stories.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] is_paused_ Pass true to pause screen sharing; pass false to unpause it.
   */
  toggleGroupCallScreenSharingIsPaused(int32 group_call_id_, bool is_paused_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1602530464;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleGroupCallScreenSharingIsPaused> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether the current user has sponsored messages enabled. The setting has no effect for users without Telegram Premium for which sponsored messages are always enabled.
 *
 * Returns object_ptr<Ok>.
 */
class toggleHasSponsoredMessagesEnabled final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Pass true to enable sponsored messages for the current user; false to disable them.
  bool has_sponsored_messages_enabled_;
  static jfieldID has_sponsored_messages_enabled_fieldID;

  /**
   * Default constructor for a function, which toggles whether the current user has sponsored messages enabled. The setting has no effect for users without Telegram Premium for which sponsored messages are always enabled.
   *
   * Returns object_ptr<Ok>.
   */
  toggleHasSponsoredMessagesEnabled();

  /**
   * Creates a function, which toggles whether the current user has sponsored messages enabled. The setting has no effect for users without Telegram Premium for which sponsored messages are always enabled.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] has_sponsored_messages_enabled_ Pass true to enable sponsored messages for the current user; false to disable them.
   */
  explicit toggleHasSponsoredMessagesEnabled(bool has_sponsored_messages_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1963285740;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleHasSponsoredMessagesEnabled> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the pinned state of a Saved Messages topic. There can be up to getOption(&quot;pinned_saved_messages_topic_count_max&quot;) pinned topics. The limit can be increased with Telegram Premium.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSavedMessagesTopicIsPinned final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of Saved Messages topic to pin or unpin.
  int53 saved_messages_topic_id_;
  static jfieldID saved_messages_topic_id_fieldID;
  /// Pass true to pin the topic; pass false to unpin it.
  bool is_pinned_;
  static jfieldID is_pinned_fieldID;

  /**
   * Default constructor for a function, which changes the pinned state of a Saved Messages topic. There can be up to getOption(&quot;pinned_saved_messages_topic_count_max&quot;) pinned topics. The limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSavedMessagesTopicIsPinned();

  /**
   * Creates a function, which changes the pinned state of a Saved Messages topic. There can be up to getOption(&quot;pinned_saved_messages_topic_count_max&quot;) pinned topics. The limit can be increased with Telegram Premium.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] saved_messages_topic_id_ Identifier of Saved Messages topic to pin or unpin.
   * \param[in] is_pinned_ Pass true to pin the topic; pass false to unpin it.
   */
  toggleSavedMessagesTopicIsPinned(int53 saved_messages_topic_id_, bool is_pinned_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1588378164;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSavedMessagesTopicIsPinned> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether a session can accept incoming calls.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSessionCanAcceptCalls final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Session identifier.
  int64 session_id_;
  static jfieldID session_id_fieldID;
  /// Pass true to allow accepting incoming calls by the session; pass false otherwise.
  bool can_accept_calls_;
  static jfieldID can_accept_calls_fieldID;

  /**
   * Default constructor for a function, which toggles whether a session can accept incoming calls.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSessionCanAcceptCalls();

  /**
   * Creates a function, which toggles whether a session can accept incoming calls.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] session_id_ Session identifier.
   * \param[in] can_accept_calls_ Pass true to allow accepting incoming calls by the session; pass false otherwise.
   */
  toggleSessionCanAcceptCalls(int64 session_id_, bool can_accept_calls_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1819027208;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSessionCanAcceptCalls> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether a session can accept incoming secret chats.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSessionCanAcceptSecretChats final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Session identifier.
  int64 session_id_;
  static jfieldID session_id_fieldID;
  /// Pass true to allow accepting secret chats by the session; pass false otherwise.
  bool can_accept_secret_chats_;
  static jfieldID can_accept_secret_chats_fieldID;

  /**
   * Default constructor for a function, which toggles whether a session can accept incoming secret chats.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSessionCanAcceptSecretChats();

  /**
   * Creates a function, which toggles whether a session can accept incoming secret chats.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] session_id_ Session identifier.
   * \param[in] can_accept_secret_chats_ Pass true to allow accepting secret chats by the session; pass false otherwise.
   */
  toggleSessionCanAcceptSecretChats(int64 session_id_, bool can_accept_secret_chats_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1000843390;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSessionCanAcceptSecretChats> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_posted_to_chat_page == true.
 *
 * Returns object_ptr<Ok>.
 */
class toggleStoryIsPostedToChatPage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat that posted the story.
  int53 story_poster_chat_id_;
  static jfieldID story_poster_chat_id_fieldID;
  /// Identifier of the story.
  int32 story_id_;
  static jfieldID story_id_fieldID;
  /// Pass true to make the story accessible after expiration; pass false to make it private.
  bool is_posted_to_chat_page_;
  static jfieldID is_posted_to_chat_page_fieldID;

  /**
   * Default constructor for a function, which toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_posted_to_chat_page == true.
   *
   * Returns object_ptr<Ok>.
   */
  toggleStoryIsPostedToChatPage();

  /**
   * Creates a function, which toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_posted_to_chat_page == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] story_poster_chat_id_ Identifier of the chat that posted the story.
   * \param[in] story_id_ Identifier of the story.
   * \param[in] is_posted_to_chat_page_ Pass true to make the story accessible after expiration; pass false to make it private.
   */
  toggleStoryIsPostedToChatPage(int53 story_poster_chat_id_, int32 story_id_, bool is_posted_to_chat_page_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -2141806228;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleStoryIsPostedToChatPage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupCanHaveSponsoredMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The new value of can_have_sponsored_messages.
  bool can_have_sponsored_messages_;
  static jfieldID can_have_sponsored_messages_fieldID;

  /**
   * Default constructor for a function, which toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupCanHaveSponsoredMessages();

  /**
   * Creates a function, which toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable sponsored messages.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ The identifier of the channel.
   * \param[in] can_have_sponsored_messages_ The new value of can_have_sponsored_messages.
   */
  toggleSupergroupCanHaveSponsoredMessages(int53 supergroup_id_, bool can_have_sponsored_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1098204302;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupCanHaveSponsoredMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupHasAggressiveAntiSpamEnabled final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the supergroup, which isn't a broadcast group.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The new value of has_aggressive_anti_spam_enabled.
  bool has_aggressive_anti_spam_enabled_;
  static jfieldID has_aggressive_anti_spam_enabled_fieldID;

  /**
   * Default constructor for a function, which toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupHasAggressiveAntiSpamEnabled();

  /**
   * Creates a function, which toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ The identifier of the supergroup, which isn't a broadcast group.
   * \param[in] has_aggressive_anti_spam_enabled_ The new value of has_aggressive_anti_spam_enabled.
   */
  toggleSupergroupHasAggressiveAntiSpamEnabled(int53 supergroup_id_, bool has_aggressive_anti_spam_enabled_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1748956943;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupHasAggressiveAntiSpamEnabled> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether messages are automatically translated in the channel chat; requires can_change_info administrator right in the channel. The chat must have at least chatBoostFeatures.min_automatic_translation_boost_level boost level to enable automatic translation.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupHasAutomaticTranslation final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The new value of has_automatic_translation.
  bool has_automatic_translation_;
  static jfieldID has_automatic_translation_fieldID;

  /**
   * Default constructor for a function, which toggles whether messages are automatically translated in the channel chat; requires can_change_info administrator right in the channel. The chat must have at least chatBoostFeatures.min_automatic_translation_boost_level boost level to enable automatic translation.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupHasAutomaticTranslation();

  /**
   * Creates a function, which toggles whether messages are automatically translated in the channel chat; requires can_change_info administrator right in the channel. The chat must have at least chatBoostFeatures.min_automatic_translation_boost_level boost level to enable automatic translation.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ The identifier of the channel.
   * \param[in] has_automatic_translation_ The new value of has_automatic_translation.
   */
  toggleSupergroupHasAutomaticTranslation(int53 supergroup_id_, bool has_automatic_translation_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -184993048;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupHasAutomaticTranslation> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupHasHiddenMembers final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of has_hidden_members.
  bool has_hidden_members_;
  static jfieldID has_hidden_members_fieldID;

  /**
   * Default constructor for a function, which toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupHasHiddenMembers();

  /**
   * Creates a function, which toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup.
   * \param[in] has_hidden_members_ New value of has_hidden_members.
   */
  toggleSupergroupHasHiddenMembers(int53 supergroup_id_, bool has_hidden_members_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1537892918;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupHasHiddenMembers> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupIsAllHistoryAvailable final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The new value of is_all_history_available.
  bool is_all_history_available_;
  static jfieldID is_all_history_available_fieldID;

  /**
   * Default constructor for a function, which toggles whether the message history of a supergroup is available to new members; requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupIsAllHistoryAvailable();

  /**
   * Creates a function, which toggles whether the message history of a supergroup is available to new members; requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ The identifier of the supergroup.
   * \param[in] is_all_history_available_ The new value of is_all_history_available.
   */
  toggleSupergroupIsAllHistoryAvailable(int53 supergroup_id_, bool is_all_history_available_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1155110478;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupIsAllHistoryAvailable> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupIsBroadcastGroup final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;

  /**
   * Default constructor for a function, which upgrades supergroup to a broadcast group; requires owner privileges in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupIsBroadcastGroup();

  /**
   * Creates a function, which upgrades supergroup to a broadcast group; requires owner privileges in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup.
   */
  explicit toggleSupergroupIsBroadcastGroup(int53 supergroup_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 884089365;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupIsBroadcastGroup> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupIsForum final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of is_forum.
  bool is_forum_;
  static jfieldID is_forum_fieldID;
  /// New value of has_forum_tabs; ignored if is_forum is false.
  bool has_forum_tabs_;
  static jfieldID has_forum_tabs_fieldID;

  /**
   * Default constructor for a function, which toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupIsForum();

  /**
   * Creates a function, which toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup.
   * \param[in] is_forum_ New value of is_forum.
   * \param[in] has_forum_tabs_ New value of has_forum_tabs; ignored if is_forum is false.
   */
  toggleSupergroupIsForum(int53 supergroup_id_, bool is_forum_, bool has_forum_tabs_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 371064337;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupIsForum> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupJoinByRequest final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup that isn't a broadcast group and isn't a channel direct message group.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of join_by_request.
  bool join_by_request_;
  static jfieldID join_by_request_fieldID;

  /**
   * Default constructor for a function, which toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupJoinByRequest();

  /**
   * Creates a function, which toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup that isn't a broadcast group and isn't a channel direct message group.
   * \param[in] join_by_request_ New value of join_by_request.
   */
  toggleSupergroupJoinByRequest(int53 supergroup_id_, bool join_by_request_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2111807454;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupJoinByRequest> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupJoinToSendMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup that isn't a broadcast group.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of join_to_send_messages.
  bool join_to_send_messages_;
  static jfieldID join_to_send_messages_fieldID;

  /**
   * Default constructor for a function, which toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupJoinToSendMessages();

  /**
   * Creates a function, which toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup that isn't a broadcast group.
   * \param[in] join_to_send_messages_ New value of join_to_send_messages.
   */
  toggleSupergroupJoinToSendMessages(int53 supergroup_id_, bool join_to_send_messages_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -182022642;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupJoinToSendMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether sender signature or link to the account is added to sent messages in a channel; requires can_change_info member right.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupSignMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// New value of sign_messages.
  bool sign_messages_;
  static jfieldID sign_messages_fieldID;
  /// New value of show_message_sender.
  bool show_message_sender_;
  static jfieldID show_message_sender_fieldID;

  /**
   * Default constructor for a function, which toggles whether sender signature or link to the account is added to sent messages in a channel; requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupSignMessages();

  /**
   * Creates a function, which toggles whether sender signature or link to the account is added to sent messages in a channel; requires can_change_info member right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the channel.
   * \param[in] sign_messages_ New value of sign_messages.
   * \param[in] show_message_sender_ New value of show_message_sender.
   */
  toggleSupergroupSignMessages(int53 supergroup_id_, bool sign_messages_, bool show_message_sender_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 572268491;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupSignMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes active state for a username of a supergroup or channel, requires owner privileges in the supergroup or channel. The editable username can't be disabled. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached.
 *
 * Returns object_ptr<Ok>.
 */
class toggleSupergroupUsernameIsActive final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the supergroup or channel.
  int53 supergroup_id_;
  static jfieldID supergroup_id_fieldID;
  /// The username to change.
  string username_;
  static jfieldID username_fieldID;
  /// Pass true to activate the username; pass false to disable it.
  bool is_active_;
  static jfieldID is_active_fieldID;

  /**
   * Default constructor for a function, which changes active state for a username of a supergroup or channel, requires owner privileges in the supergroup or channel. The editable username can't be disabled. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached.
   *
   * Returns object_ptr<Ok>.
   */
  toggleSupergroupUsernameIsActive();

  /**
   * Creates a function, which changes active state for a username of a supergroup or channel, requires owner privileges in the supergroup or channel. The editable username can't be disabled. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] supergroup_id_ Identifier of the supergroup or channel.
   * \param[in] username_ The username to change.
   * \param[in] is_active_ Pass true to activate the username; pass false to disable it.
   */
  toggleSupergroupUsernameIsActive(int53 supergroup_id_, string const &username_, bool is_active_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1500811777;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleSupergroupUsernameIsActive> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes active state for a username of the current user. The editable username can't be disabled. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached.
 *
 * Returns object_ptr<Ok>.
 */
class toggleUsernameIsActive final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The username to change.
  string username_;
  static jfieldID username_fieldID;
  /// Pass true to activate the username; pass false to disable it.
  bool is_active_;
  static jfieldID is_active_fieldID;

  /**
   * Default constructor for a function, which changes active state for a username of the current user. The editable username can't be disabled. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached.
   *
   * Returns object_ptr<Ok>.
   */
  toggleUsernameIsActive();

  /**
   * Creates a function, which changes active state for a username of the current user. The editable username can't be disabled. May return an error with a message &quot;USERNAMES_ACTIVE_TOO_MUCH&quot; if the maximum number of active usernames has been reached.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] username_ The username to change.
   * \param[in] is_active_ Pass true to activate the username; pass false to disable it.
   */
  toggleUsernameIsActive(string const &username_, bool is_active_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1244098019;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleUsernameIsActive> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether the current user will receive a notification when the video chat starts; for scheduled video chats only.
 *
 * Returns object_ptr<Ok>.
 */
class toggleVideoChatEnabledStartNotification final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New value of the enabled_start_notification setting.
  bool enabled_start_notification_;
  static jfieldID enabled_start_notification_fieldID;

  /**
   * Default constructor for a function, which toggles whether the current user will receive a notification when the video chat starts; for scheduled video chats only.
   *
   * Returns object_ptr<Ok>.
   */
  toggleVideoChatEnabledStartNotification();

  /**
   * Creates a function, which toggles whether the current user will receive a notification when the video chat starts; for scheduled video chats only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] enabled_start_notification_ New value of the enabled_start_notification setting.
   */
  toggleVideoChatEnabledStartNotification(int32 group_call_id_, bool enabled_start_notification_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1851489086;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleVideoChatEnabledStartNotification> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Toggles whether new participants of a video chat can be unmuted only by administrators of the video chat. Requires groupCall.can_toggle_mute_new_participants right.
 *
 * Returns object_ptr<Ok>.
 */
class toggleVideoChatMuteNewParticipants final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Group call identifier.
  int32 group_call_id_;
  static jfieldID group_call_id_fieldID;
  /// New value of the mute_new_participants setting.
  bool mute_new_participants_;
  static jfieldID mute_new_participants_fieldID;

  /**
   * Default constructor for a function, which toggles whether new participants of a video chat can be unmuted only by administrators of the video chat. Requires groupCall.can_toggle_mute_new_participants right.
   *
   * Returns object_ptr<Ok>.
   */
  toggleVideoChatMuteNewParticipants();

  /**
   * Creates a function, which toggles whether new participants of a video chat can be unmuted only by administrators of the video chat. Requires groupCall.can_toggle_mute_new_participants right.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] group_call_id_ Group call identifier.
   * \param[in] mute_new_participants_ New value of the mute_new_participants setting.
   */
  toggleVideoChatMuteNewParticipants(int32 group_call_id_, bool mute_new_participants_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 987023756;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<toggleVideoChatMuteNewParticipants> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Transfers Telegram Stars from the business account to the business bot; for bots only.
 *
 * Returns object_ptr<Ok>.
 */
class transferBusinessAccountStars final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Number of Telegram Stars to transfer.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which transfers Telegram Stars from the business account to the business bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   */
  transferBusinessAccountStars();

  /**
   * Creates a function, which transfers Telegram Stars from the business account to the business bot; for bots only.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection.
   * \param[in] star_count_ Number of Telegram Stars to transfer.
   */
  transferBusinessAccountStars(string const &business_connection_id_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 732562464;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<transferBusinessAccountStars> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Changes the owner of a chat; for basic groups, supergroups and channel chats only; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session.
 *
 * Returns object_ptr<Ok>.
 */
class transferChatOwnership final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// The 2-step verification password of the current user.
  string password_;
  static jfieldID password_fieldID;

  /**
   * Default constructor for a function, which changes the owner of a chat; for basic groups, supergroups and channel chats only; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session.
   *
   * Returns object_ptr<Ok>.
   */
  transferChatOwnership();

  /**
   * Creates a function, which changes the owner of a chat; for basic groups, supergroups and channel chats only; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] user_id_ Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user.
   * \param[in] password_ The 2-step verification password of the current user.
   */
  transferChatOwnership(int53 chat_id_, int53 user_id_, string const &password_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2006977043;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<transferChatOwnership> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSender;

class ok;

/**
 * Sends an upgraded gift to another user or channel chat.
 *
 * Returns object_ptr<Ok>.
 */
class transferGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request; for bots only.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// Identifier of the user or the channel chat that will receive the gift.
  object_ptr<MessageSender> new_owner_id_;
  static jfieldID new_owner_id_fieldID;
  /// The Telegram Star amount required to pay for the transfer.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which sends an upgraded gift to another user or channel chat.
   *
   * Returns object_ptr<Ok>.
   */
  transferGift();

  /**
   * Creates a function, which sends an upgraded gift to another user or channel chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request; for bots only.
   * \param[in] received_gift_id_ Identifier of the gift.
   * \param[in] new_owner_id_ Identifier of the user or the channel chat that will receive the gift.
   * \param[in] star_count_ The Telegram Star amount required to pay for the transfer.
   */
  transferGift(string const &business_connection_id_, string const &received_gift_id_, object_ptr<MessageSender> &&new_owner_id_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1167293126;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<transferGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Extracts text or caption of the given message and translates it to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.
 *
 * Returns object_ptr<FormattedText>.
 */
class translateMessageText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to which the message belongs.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the message.
  int53 message_id_;
  static jfieldID message_id_fieldID;
  /// Language code of the language to which the message is translated. See translateText.to_language_code for the list of supported values.
  string to_language_code_;
  static jfieldID to_language_code_fieldID;
  /// Tone of the translation; see translateText.tone for the list of supported values.
  string tone_;
  static jfieldID tone_fieldID;

  /**
   * Default constructor for a function, which extracts text or caption of the given message and translates it to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.
   *
   * Returns object_ptr<FormattedText>.
   */
  translateMessageText();

  /**
   * Creates a function, which extracts text or caption of the given message and translates it to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] chat_id_ Identifier of the chat to which the message belongs.
   * \param[in] message_id_ Identifier of the message.
   * \param[in] to_language_code_ Language code of the language to which the message is translated. See translateText.to_language_code for the list of supported values.
   * \param[in] tone_ Tone of the translation; see translateText.tone for the list of supported values.
   */
  translateMessageText(int53 chat_id_, int53 message_id_, string const &to_language_code_, string const &tone_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1995371403;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<translateMessageText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class formattedText;

/**
 * Translates a text to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.
 *
 * Returns object_ptr<FormattedText>.
 */
class translateText final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Text to translate.
  object_ptr<formattedText> text_;
  static jfieldID text_fieldID;
  /// Language code of the language to which the message is translated. Must be one of &quot;af&quot;, &quot;sq&quot;, &quot;am&quot;, &quot;ar&quot;, &quot;hy&quot;, &quot;az&quot;, &quot;eu&quot;, &quot;be&quot;, &quot;bn&quot;, &quot;bs&quot;, &quot;bg&quot;, &quot;ca&quot;, &quot;ceb&quot;, &quot;zh-CN&quot;, &quot;zh&quot;, &quot;zh-Hans&quot;, &quot;zh-TW&quot;, &quot;zh-Hant&quot;, &quot;co&quot;, &quot;hr&quot;, &quot;cs&quot;, &quot;da&quot;, &quot;nl&quot;, &quot;en&quot;, &quot;eo&quot;, &quot;et&quot;, &quot;fi&quot;, &quot;fr&quot;, &quot;fy&quot;, &quot;gl&quot;, &quot;ka&quot;, &quot;de&quot;, &quot;el&quot;, &quot;gu&quot;, &quot;ht&quot;, &quot;ha&quot;, &quot;haw&quot;, &quot;he&quot;, &quot;iw&quot;, &quot;hi&quot;, &quot;hmn&quot;, &quot;hu&quot;, &quot;is&quot;, &quot;ig&quot;, &quot;id&quot;, &quot;in&quot;, &quot;ga&quot;, &quot;it&quot;, &quot;ja&quot;, &quot;jv&quot;, &quot;kn&quot;, &quot;kk&quot;, &quot;km&quot;, &quot;rw&quot;, &quot;ko&quot;, &quot;ku&quot;, &quot;ky&quot;, &quot;lo&quot;, &quot;la&quot;, &quot;lv&quot;, &quot;lt&quot;, &quot;lb&quot;, &quot;mk&quot;, &quot;mg&quot;, &quot;ms&quot;, &quot;ml&quot;, &quot;mt&quot;, &quot;mi&quot;, &quot;mr&quot;, &quot;mn&quot;, &quot;my&quot;, &quot;ne&quot;, &quot;no&quot;, &quot;ny&quot;, &quot;or&quot;, &quot;ps&quot;, &quot;fa&quot;, &quot;pl&quot;, &quot;pt&quot;, &quot;pt-BR&quot;, &quot;pa&quot;, &quot;ro&quot;, &quot;ru&quot;, &quot;sm&quot;, &quot;gd&quot;, &quot;sr&quot;, &quot;st&quot;, &quot;sn&quot;, &quot;sd&quot;, &quot;si&quot;, &quot;sk&quot;, &quot;sl&quot;, &quot;so&quot;, &quot;es&quot;, &quot;su&quot;, &quot;sw&quot;, &quot;sv&quot;, &quot;tl&quot;, &quot;tg&quot;, &quot;ta&quot;, &quot;tt&quot;, &quot;te&quot;, &quot;th&quot;, &quot;tr&quot;, &quot;tk&quot;, &quot;uk&quot;, &quot;ur&quot;, &quot;ug&quot;, &quot;uz&quot;, &quot;vi&quot;, &quot;cy&quot;, &quot;xh&quot;, &quot;yi&quot;, &quot;ji&quot;, &quot;yo&quot;, &quot;zu&quot;.
  string to_language_code_;
  static jfieldID to_language_code_fieldID;
  /// Tone of the translation; must be one of &quot;&quot;, &quot;formal&quot;, &quot;neutral&quot;, &quot;casual&quot;; defaults to &quot;neutral&quot;.
  string tone_;
  static jfieldID tone_fieldID;

  /**
   * Default constructor for a function, which translates a text to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.
   *
   * Returns object_ptr<FormattedText>.
   */
  translateText();

  /**
   * Creates a function, which translates a text to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved.
   *
   * Returns object_ptr<FormattedText>.
   *
   * \param[in] text_ Text to translate.
   * \param[in] to_language_code_ Language code of the language to which the message is translated. Must be one of &quot;af&quot;, &quot;sq&quot;, &quot;am&quot;, &quot;ar&quot;, &quot;hy&quot;, &quot;az&quot;, &quot;eu&quot;, &quot;be&quot;, &quot;bn&quot;, &quot;bs&quot;, &quot;bg&quot;, &quot;ca&quot;, &quot;ceb&quot;, &quot;zh-CN&quot;, &quot;zh&quot;, &quot;zh-Hans&quot;, &quot;zh-TW&quot;, &quot;zh-Hant&quot;, &quot;co&quot;, &quot;hr&quot;, &quot;cs&quot;, &quot;da&quot;, &quot;nl&quot;, &quot;en&quot;, &quot;eo&quot;, &quot;et&quot;, &quot;fi&quot;, &quot;fr&quot;, &quot;fy&quot;, &quot;gl&quot;, &quot;ka&quot;, &quot;de&quot;, &quot;el&quot;, &quot;gu&quot;, &quot;ht&quot;, &quot;ha&quot;, &quot;haw&quot;, &quot;he&quot;, &quot;iw&quot;, &quot;hi&quot;, &quot;hmn&quot;, &quot;hu&quot;, &quot;is&quot;, &quot;ig&quot;, &quot;id&quot;, &quot;in&quot;, &quot;ga&quot;, &quot;it&quot;, &quot;ja&quot;, &quot;jv&quot;, &quot;kn&quot;, &quot;kk&quot;, &quot;km&quot;, &quot;rw&quot;, &quot;ko&quot;, &quot;ku&quot;, &quot;ky&quot;, &quot;lo&quot;, &quot;la&quot;, &quot;lv&quot;, &quot;lt&quot;, &quot;lb&quot;, &quot;mk&quot;, &quot;mg&quot;, &quot;ms&quot;, &quot;ml&quot;, &quot;mt&quot;, &quot;mi&quot;, &quot;mr&quot;, &quot;mn&quot;, &quot;my&quot;, &quot;ne&quot;, &quot;no&quot;, &quot;ny&quot;, &quot;or&quot;, &quot;ps&quot;, &quot;fa&quot;, &quot;pl&quot;, &quot;pt&quot;, &quot;pt-BR&quot;, &quot;pa&quot;, &quot;ro&quot;, &quot;ru&quot;, &quot;sm&quot;, &quot;gd&quot;, &quot;sr&quot;, &quot;st&quot;, &quot;sn&quot;, &quot;sd&quot;, &quot;si&quot;, &quot;sk&quot;, &quot;sl&quot;, &quot;so&quot;, &quot;es&quot;, &quot;su&quot;, &quot;sw&quot;, &quot;sv&quot;, &quot;tl&quot;, &quot;tg&quot;, &quot;ta&quot;, &quot;tt&quot;, &quot;te&quot;, &quot;th&quot;, &quot;tr&quot;, &quot;tk&quot;, &quot;uk&quot;, &quot;ur&quot;, &quot;ug&quot;, &quot;uz&quot;, &quot;vi&quot;, &quot;cy&quot;, &quot;xh&quot;, &quot;yi&quot;, &quot;ji&quot;, &quot;yo&quot;, &quot;zu&quot;.
   * \param[in] tone_ Tone of the translation; must be one of &quot;&quot;, &quot;formal&quot;, &quot;neutral&quot;, &quot;casual&quot;; defaults to &quot;neutral&quot;.
   */
  translateText(object_ptr<formattedText> &&text_, string const &to_language_code_, string const &tone_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -617975379;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<formattedText>;

  static object_ptr<translateText> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
 *
 * Returns object_ptr<Ok>.
 */
class unpinAllChatMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
   *
   * Returns object_ptr<Ok>.
   */
  unpinAllChatMessages();

  /**
   * Creates a function, which removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   */
  explicit unpinAllChatMessages(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1437805385;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<unpinAllChatMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all pinned messages from the topic in a channel direct messages chat administered by the current user.
 *
 * Returns object_ptr<Ok>.
 */
class unpinAllDirectMessagesChatTopicMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Topic identifier.
  int53 topic_id_;
  static jfieldID topic_id_fieldID;

  /**
   * Default constructor for a function, which removes all pinned messages from the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   */
  unpinAllDirectMessagesChatTopicMessages();

  /**
   * Creates a function, which removes all pinned messages from the topic in a channel direct messages chat administered by the current user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] topic_id_ Topic identifier.
   */
  unpinAllDirectMessagesChatTopicMessages(int53 chat_id_, int53 topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 89671100;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<unpinAllDirectMessagesChatTopicMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes all pinned messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_pin_messages member right in the supergroup.
 *
 * Returns object_ptr<Ok>.
 */
class unpinAllForumTopicMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Forum topic identifier in which messages will be unpinned.
  int32 forum_topic_id_;
  static jfieldID forum_topic_id_fieldID;

  /**
   * Default constructor for a function, which removes all pinned messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_pin_messages member right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   */
  unpinAllForumTopicMessages();

  /**
   * Creates a function, which removes all pinned messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_pin_messages member right in the supergroup.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] forum_topic_id_ Forum topic identifier in which messages will be unpinned.
   */
  unpinAllForumTopicMessages(int53 chat_id_, int32 forum_topic_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1113340771;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<unpinAllForumTopicMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
 *
 * Returns object_ptr<Ok>.
 */
class unpinChatMessage final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// Identifier of the removed pinned message.
  int53 message_id_;
  static jfieldID message_id_fieldID;

  /**
   * Default constructor for a function, which removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
   *
   * Returns object_ptr<Ok>.
   */
  unpinChatMessage();

  /**
   * Creates a function, which removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Identifier of the chat.
   * \param[in] message_id_ Identifier of the removed pinned message.
   */
  unpinChatMessage(int53 chat_id_, int53 message_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 2065448670;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<unpinChatMessage> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class chat;

/**
 * Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group.
 *
 * Returns object_ptr<Chat>.
 */
class upgradeBasicGroupChatToSupergroupChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifier of the chat to upgrade.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;

  /**
   * Default constructor for a function, which creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group.
   *
   * Returns object_ptr<Chat>.
   */
  upgradeBasicGroupChatToSupergroupChat();

  /**
   * Creates a function, which creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group.
   *
   * Returns object_ptr<Chat>.
   *
   * \param[in] chat_id_ Identifier of the chat to upgrade.
   */
  explicit upgradeBasicGroupChatToSupergroupChat(int53 chat_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 300488122;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<chat>;

  static object_ptr<upgradeBasicGroupChatToSupergroupChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class upgradeGiftResult;

/**
 * Upgrades a regular gift.
 *
 * Returns object_ptr<UpgradeGiftResult>.
 */
class upgradeGift final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of business connection on behalf of which to send the request; for bots only.
  string business_connection_id_;
  static jfieldID business_connection_id_fieldID;
  /// Identifier of the gift.
  string received_gift_id_;
  static jfieldID received_gift_id_fieldID;
  /// Pass true to keep the original gift text, sender and receiver in the upgraded gift.
  bool keep_original_details_;
  static jfieldID keep_original_details_fieldID;
  /// The Telegram Star amount required to pay for the upgrade. It the gift has prepaid_upgrade_star_count &gt; 0, then pass 0, otherwise, pass gift.upgrade_star_count.
  int53 star_count_;
  static jfieldID star_count_fieldID;

  /**
   * Default constructor for a function, which upgrades a regular gift.
   *
   * Returns object_ptr<UpgradeGiftResult>.
   */
  upgradeGift();

  /**
   * Creates a function, which upgrades a regular gift.
   *
   * Returns object_ptr<UpgradeGiftResult>.
   *
   * \param[in] business_connection_id_ Unique identifier of business connection on behalf of which to send the request; for bots only.
   * \param[in] received_gift_id_ Identifier of the gift.
   * \param[in] keep_original_details_ Pass true to keep the original gift text, sender and receiver in the upgraded gift.
   * \param[in] star_count_ The Telegram Star amount required to pay for the upgrade. It the gift has prepaid_upgrade_star_count &gt; 0, then pass 0, otherwise, pass gift.upgrade_star_count.
   */
  upgradeGift(string const &business_connection_id_, string const &received_gift_id_, bool keep_original_details_, int53 star_count_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1782136103;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<upgradeGiftResult>;

  static object_ptr<upgradeGift> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputFile;

class StickerFormat;

class file;

/**
 * Uploads a file with a sticker; returns the uploaded file.
 *
 * Returns object_ptr<File>.
 */
class uploadStickerFile final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Sticker file owner; ignored for regular users.
  int53 user_id_;
  static jfieldID user_id_fieldID;
  /// Sticker format.
  object_ptr<StickerFormat> sticker_format_;
  static jfieldID sticker_format_fieldID;
  /// File file to upload; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. See https://core.telegram.org/animated_stickers\#technical-requirements for technical requirements.
  object_ptr<InputFile> sticker_;
  static jfieldID sticker_fieldID;

  /**
   * Default constructor for a function, which uploads a file with a sticker; returns the uploaded file.
   *
   * Returns object_ptr<File>.
   */
  uploadStickerFile();

  /**
   * Creates a function, which uploads a file with a sticker; returns the uploaded file.
   *
   * Returns object_ptr<File>.
   *
   * \param[in] user_id_ Sticker file owner; ignored for regular users.
   * \param[in] sticker_format_ Sticker format.
   * \param[in] sticker_ File file to upload; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. See https://core.telegram.org/animated_stickers\#technical-requirements for technical requirements.
   */
  uploadStickerFile(int53 user_id_, object_ptr<StickerFormat> &&sticker_format_, object_ptr<InputFile> &&sticker_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 647385283;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<file>;

  static object_ptr<uploadStickerFile> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class InputInvoice;

class orderInfo;

class validatedOrderInfo;

/**
 * Validates the order information provided by a user and returns the available shipping options for a flexible invoice.
 *
 * Returns object_ptr<ValidatedOrderInfo>.
 */
class validateOrderInfo final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The invoice.
  object_ptr<InputInvoice> input_invoice_;
  static jfieldID input_invoice_fieldID;
  /// The order information, provided by the user; pass null if empty.
  object_ptr<orderInfo> order_info_;
  static jfieldID order_info_fieldID;
  /// Pass true to save the order information.
  bool allow_save_;
  static jfieldID allow_save_fieldID;

  /**
   * Default constructor for a function, which validates the order information provided by a user and returns the available shipping options for a flexible invoice.
   *
   * Returns object_ptr<ValidatedOrderInfo>.
   */
  validateOrderInfo();

  /**
   * Creates a function, which validates the order information provided by a user and returns the available shipping options for a flexible invoice.
   *
   * Returns object_ptr<ValidatedOrderInfo>.
   *
   * \param[in] input_invoice_ The invoice.
   * \param[in] order_info_ The order information, provided by the user; pass null if empty.
   * \param[in] allow_save_ Pass true to save the order information.
   */
  validateOrderInfo(object_ptr<InputInvoice> &&input_invoice_, object_ptr<orderInfo> &&order_info_, bool allow_save_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -1248305201;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<validatedOrderInfo>;

  static object_ptr<validateOrderInfo> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class MessageSource;

class ok;

/**
 * Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels).
 *
 * Returns object_ptr<Ok>.
 */
class viewMessages final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Chat identifier.
  int53 chat_id_;
  static jfieldID chat_id_fieldID;
  /// The identifiers of the messages being viewed.
  array<int53> message_ids_;
  static jfieldID message_ids_fieldID;
  /// Source of the message view; pass null to guess the source based on chat open state.
  object_ptr<MessageSource> source_;
  static jfieldID source_fieldID;
  /// Pass true to mark as read the specified messages even if the chat is closed.
  bool force_read_;
  static jfieldID force_read_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels).
   *
   * Returns object_ptr<Ok>.
   */
  viewMessages();

  /**
   * Creates a function, which informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels).
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] chat_id_ Chat identifier.
   * \param[in] message_ids_ The identifiers of the messages being viewed.
   * \param[in] source_ Source of the message view; pass null to guess the source based on chat open state.
   * \param[in] force_read_ Pass true to mark as read the specified messages even if the chat is closed.
   */
  viewMessages(int53 chat_id_, array<int53> &&message_ids_, object_ptr<MessageSource> &&source_, bool force_read_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 960236656;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<viewMessages> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class PremiumFeature;

class ok;

/**
 * Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen.
 *
 * Returns object_ptr<Ok>.
 */
class viewPremiumFeature final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The viewed premium feature.
  object_ptr<PremiumFeature> feature_;
  static jfieldID feature_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen.
   *
   * Returns object_ptr<Ok>.
   */
  viewPremiumFeature();

  /**
   * Creates a function, which informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] feature_ The viewed premium feature.
   */
  explicit viewPremiumFeature(object_ptr<PremiumFeature> &&feature_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 192950706;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<viewPremiumFeature> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the user fully viewed a sponsored chat.
 *
 * Returns object_ptr<Ok>.
 */
class viewSponsoredChat final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the sponsored chat.
  int53 sponsored_chat_unique_id_;
  static jfieldID sponsored_chat_unique_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the user fully viewed a sponsored chat.
   *
   * Returns object_ptr<Ok>.
   */
  viewSponsoredChat();

  /**
   * Creates a function, which informs TDLib that the user fully viewed a sponsored chat.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sponsored_chat_unique_id_ Unique identifier of the sponsored chat.
   */
  explicit viewSponsoredChat(int53 sponsored_chat_unique_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 1722644778;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<viewSponsoredChat> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs the server that some trending sticker sets have been viewed by the user.
 *
 * Returns object_ptr<Ok>.
 */
class viewTrendingStickerSets final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Identifiers of viewed trending sticker sets.
  array<int64> sticker_set_ids_;
  static jfieldID sticker_set_ids_fieldID;

  /**
   * Default constructor for a function, which informs the server that some trending sticker sets have been viewed by the user.
   *
   * Returns object_ptr<Ok>.
   */
  viewTrendingStickerSets();

  /**
   * Creates a function, which informs the server that some trending sticker sets have been viewed by the user.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] sticker_set_ids_ Identifiers of viewed trending sticker sets.
   */
  explicit viewTrendingStickerSets(array<int64> &&sticker_set_ids_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -952416520;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<viewTrendingStickerSets> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Informs TDLib that the user viewed a video message advertisement.
 *
 * Returns object_ptr<Ok>.
 */
class viewVideoMessageAdvertisement final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// Unique identifier of the advertisement.
  int53 advertisement_unique_id_;
  static jfieldID advertisement_unique_id_fieldID;

  /**
   * Default constructor for a function, which informs TDLib that the user viewed a video message advertisement.
   *
   * Returns object_ptr<Ok>.
   */
  viewVideoMessageAdvertisement();

  /**
   * Creates a function, which informs TDLib that the user viewed a video message advertisement.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] advertisement_unique_id_ Unique identifier of the advertisement.
   */
  explicit viewVideoMessageAdvertisement(int53 advertisement_unique_id_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = -808563006;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<viewVideoMessageAdvertisement> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

class ok;

/**
 * Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file.
 *
 * Returns object_ptr<Ok>.
 */
class writeGeneratedFilePart final : public Function {
  /**
   * Returns identifier uniquely determining a type of the object.
   * \return this->ID.
   */
  std::int32_t get_id() const final {
    return ID;
  }

 public:
  static jclass Class;
  /// The identifier of the generation process.
  int64 generation_id_;
  static jfieldID generation_id_fieldID;
  /// The offset from which to write the data to the file.
  int53 offset_;
  static jfieldID offset_fieldID;
  /// The data to write.
  bytes data_;
  static jfieldID data_fieldID;

  /**
   * Default constructor for a function, which writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file.
   *
   * Returns object_ptr<Ok>.
   */
  writeGeneratedFilePart();

  /**
   * Creates a function, which writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file.
   *
   * Returns object_ptr<Ok>.
   *
   * \param[in] generation_id_ The identifier of the generation process.
   * \param[in] offset_ The offset from which to write the data to the file.
   * \param[in] data_ The data to write.
   */
  writeGeneratedFilePart(int64 generation_id_, int53 offset_, bytes const &data_);

  /// Identifier uniquely determining a type of the object.
  static const std::int32_t ID = 214474389;

  /// Typedef for the type returned by the function.
  using ReturnType = object_ptr<ok>;

  static object_ptr<writeGeneratedFilePart> fetch(JNIEnv *env, jobject &p);

  /**
   * Helper function for to_string method. Appends string representation of the object to the storer.
   * \param[in] s Storer to which object string representation will be appended.
   * \param[in] field_name Object field_name if applicable.
   */
  void store(TlStorerToString &s, const char *field_name) const final;

  static ReturnType fetch_result(JNIEnv *env, jobject &p);

  static void init_jni_vars(JNIEnv *env);
};

}  // namespace td_api
}  // namespace td
